summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/sys_hwprobe.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-13 16:29:11 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-16 13:13:59 +0200
commit6e6f58a170ea98e44075b761f2da42a5aec47dfb (patch)
tree9737c20afa4430d792cd6028d15f8ed2a4e37b28 /arch/riscv/kernel/sys_hwprobe.c
parent5f64b4a1ab1b0412446d42e1fc2964c2cdb60b27 (diff)
thermal: gov_bang_bang: Use governor_data to reduce overhead
After running once, the for_each_trip_desc() loop in bang_bang_manage() is pure needless overhead because it is not going to make any changes unless a new cooling device has been bound to one of the trips in the thermal zone or the system is resuming from sleep. For this reason, make bang_bang_manage() set governor_data for the thermal zone and check it upfront to decide whether or not it needs to do anything. However, governor_data needs to be reset in some cases to let bang_bang_manage() know that it should walk the trips again, so add an .update_tz() callback to the governor and make the core additionally invoke it during system resume. To avoid affecting the other users of that callback unnecessarily, add a special notification reason for system resume, THERMAL_TZ_RESUME, and also pass it to __thermal_zone_device_update() called during system resume for consistency. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Kästle <peter@piie.net> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Cc: 6.10+ <stable@vger.kernel.org> # 6.10+ Link: https://patch.msgid.link/2285575.iZASKD2KPV@rjwysocki.net
Diffstat (limited to 'arch/riscv/kernel/sys_hwprobe.c')
0 files changed, 0 insertions, 0 deletions