[PATCH v3 1/2] watchdog: move arm64 watchdog_hld into common code
Doug Anderson
dianders at chromium.org
Mon Oct 13 15:34:03 PDT 2025
Hi,
On Wed, Oct 8, 2025 at 8:29 PM Yunhui Cui <cuiyunhui at bytedance.com> wrote:
>
> Move the contents of arch/arm64/watchdog_hld.c to kernel/watchdog_perf.c
> to create a generic implementation that can be reused by other arch,
> such as RISC-V.
>
> Signed-off-by: Yunhui Cui <cuiyunhui at bytedance.com>
> ---
> arch/arm64/Kconfig | 2 +
> arch/arm64/kernel/Makefile | 1 -
> arch/arm64/kernel/watchdog_hld.c | 94 --------------------------------
> drivers/perf/arm_pmu.c | 10 +++-
> include/linux/perf/arm_pmu.h | 2 -
> kernel/watchdog_perf.c | 83 ++++++++++++++++++++++++++++
> lib/Kconfig.debug | 8 +++
> 7 files changed, 102 insertions(+), 98 deletions(-)
> delete mode 100644 arch/arm64/kernel/watchdog_hld.c
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b5438ff4772ce..4759e4969c4a6 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -231,6 +231,8 @@ config ARM64
> select HAVE_GCC_PLUGINS
> select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
> HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
> + select WATCHDOG_PERF_ADJUST_PERIOD if HARDLOCKUP_DETECTOR_PERF && \
> + CPU_FREQ
nit: the line limit is generally accepted to be ~100 characters now.
It would be nice not to wrap. If you really need to wrap, indent like
the wrapping above.
In any case, this seems like a reasonable thing to do to me.
Reviewed-by: Douglas Anderson <dianders at chromium.org>
More information about the linux-riscv
mailing list