Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Yicong Yang <yangyicong@huawei.com>
Cc: catalin.marinas@arm.com, akpm@linux-foundation.org,
	dianders@chromium.org, sumit.garg@linaro.org,
	kernelfans@gmail.com, lecopzer.chen@mediatek.com,
	tglx@linutronix.de, song@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	jonathan.cameron@huawei.com, zhanjie9@hisilicon.com,
	prime.zeng@hisilicon.com, yangyicong@hisilicon.com,
	linuxarm@huawei.com
Subject: Re: [RESEND PATCH v2 2/2] arm64/watchdog_hld: Add a cpufreq notifier for update watchdog thresh
Date: Fri, 27 Jun 2025 16:35:43 +0100	[thread overview]
Message-ID: <aF66T0dgV8IpvlF_@willie-the-truck> (raw)
In-Reply-To: <20250619114805.16968-3-yangyicong@huawei.com>

On Thu, Jun 19, 2025 at 07:48:05PM +0800, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@hisilicon.com>
> 
> arm64 depends on the cpufreq driver to gain the maximum cpu frequency
> to convert the watchdog_thresh to perf event period. cpufreq drivers
> like cppc_cpufreq will be initialized lately after the initializing of
> the hard lockup detector so just use a safe cpufreq which will be
> inaccurency. Use a cpufreq notifier to adjust the event's period to
> a more accurate one.
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> ---
>  arch/arm64/kernel/watchdog_hld.c | 58 ++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/arch/arm64/kernel/watchdog_hld.c b/arch/arm64/kernel/watchdog_hld.c
> index dcd25322127c..e55548cb26df 100644
> --- a/arch/arm64/kernel/watchdog_hld.c
> +++ b/arch/arm64/kernel/watchdog_hld.c
> @@ -34,3 +34,61 @@ bool __init arch_perf_nmi_is_available(void)
>  	 */
>  	return arm_pmu_irq_is_nmi();
>  }
> +
> +static int watchdog_perf_update_period(void *data)
> +{
> +	int cpu = raw_smp_processor_id();

Why raw?

Will


  parent reply	other threads:[~2025-06-27 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 11:48 [RESEND PATCH v2 0/2] Update the watchdog period according to real CPU frequency Yicong Yang
2025-06-19 11:48 ` [RESEND PATCH v2 1/2] watchdog/perf: Provide function for adjusting the event period Yicong Yang
2025-06-25 22:46   ` Doug Anderson
2025-06-27 15:35   ` Will Deacon
2025-06-30  8:07     ` Yicong Yang
2025-06-19 11:48 ` [RESEND PATCH v2 2/2] arm64/watchdog_hld: Add a cpufreq notifier for update watchdog thresh Yicong Yang
2025-06-24  2:32   ` Jie Zhan
2025-06-25 22:46   ` Doug Anderson
2025-06-27 15:35   ` Will Deacon [this message]
2025-06-30  8:38     ` Yicong Yang
2025-06-23 23:30 ` [RESEND PATCH v2 0/2] Update the watchdog period according to real CPU frequency Andrew Morton
2025-06-24 10:55   ` Yicong Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aF66T0dgV8IpvlF_@willie-the-truck \
    --to=will@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dianders@chromium.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=kernelfans@gmail.com \
    --cc=lecopzer.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=song@kernel.org \
    --cc=sumit.garg@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=yangyicong@hisilicon.com \
    --cc=yangyicong@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox