]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog/perf: Provide function for adjusting the event period
authorYicong Yang <yangyicong@hisilicon.com>
Tue, 1 Jul 2025 11:02:13 +0000 (19:02 +0800)
committerWill Deacon <will@kernel.org>
Fri, 4 Jul 2025 12:17:30 +0000 (13:17 +0100)
commit60bc47b5a0b164082d448815d7db3066266aa3ed
tree49037ceaa09b4317f10ba5a5c5139bd56f07b274
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
watchdog/perf: Provide function for adjusting the event period

Architecture's using perf events for hard lockup detection needs to
convert the watchdog_thresh to the event's period, some architecture
for example arm64 perform this conversion using the CPU's maximum
frequency which will be acquired by cpufreq. However by the time
the lockup detector's initialized the cpufreq driver may not be
initialized, thus launch a watchdog with inaccurate period. Provide
a function hardlockup_detector_perf_adjust_period() to allowing
adjust the event period. Then architecture can update with more
accurate period if cpufreq is initialized.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20250701110214.27242-2-yangyicong@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
include/linux/nmi.h
kernel/watchdog_perf.c