[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YodjucHQ3Nab5J/f@alley>
Date: Fri, 20 May 2022 11:47:37 +0200
From: Petr Mladek <pmladek@...e.com>
To: Lecopzer Chen <lecopzer.chen@...iatek.com>
Cc: linux-kernel@...r.kernel.org, acme@...nel.org,
akpm@...ux-foundation.org, alexander.shishkin@...ux.intel.com,
catalin.marinas@....com, davem@...emloft.net, jolsa@...hat.com,
jthierry@...hat.com, keescook@...omium.org, kernelfans@...il.com,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
linux-perf-users@...r.kernel.org, mark.rutland@....com,
masahiroy@...nel.org, matthias.bgg@...il.com, maz@...nel.org,
mcgrof@...nel.org, mingo@...hat.com, namhyung@...nel.org,
nixiaoming@...wei.com, peterz@...radead.org,
sparclinux@...r.kernel.org, sumit.garg@...aro.org,
wangqing@...o.com, will@...nel.org, yj.chiang@...iatek.com
Subject: Re: [PATCH v4 6/6] arm64: Enable perf events based hard lockup
detector
On Thu 2022-04-28 00:13:40, Lecopzer Chen wrote:
> With the recent feature added to enable perf events to use pseudo NMIs
> as interrupts on platforms which support GICv3 or later, its now been
> possible to enable hard lockup detector (or NMI watchdog) on arm64
> platforms. So enable corresponding support.
>
> One thing to note here is that normally lockup detector is initialized
> just after the early initcalls but PMU on arm64 comes up much later as
> device_initcall(). To cope with that, overriding watchdog_nmi_probe() to
> let the watchdog framework know PMU not ready, and inform the framework
> to re-initialize lockup detection once PMU has been initialized.
>
> [1]: http://lore.kernel.org/linux-arm-kernel/1610712101-14929-1-git-send-email-sumit.garg@linaro.org
>
> --- a/arch/arm64/kernel/perf_event.c
> +++ b/arch/arm64/kernel/perf_event.c
> @@ -1390,10 +1391,15 @@ static struct platform_driver armv8_pmu_driver = {
>
> static int __init armv8_pmu_driver_init(void)
> {
> + int ret;
> +
> if (acpi_disabled)
> - return platform_driver_register(&armv8_pmu_driver);
> + ret = platform_driver_register(&armv8_pmu_driver);
> else
> - return arm_pmu_acpi_probe(armv8_pmuv3_pmu_init);
> + ret = arm_pmu_acpi_probe(armv8_pmuv3_pmu_init);
> +
> + retry_lockup_detector_init();
Does it makes sense to call retry_lockup_detector_init() when
the above returned an error? Should it be?
if (!ret)
retry_lockup_detector_init();
> + return ret;
> }
> device_initcall(armv8_pmu_driver_init)
I am not qualified to ack the arm-specific code. But otherwise
the change looks reasonable.
Best Regards,
Petr
Powered by blists - more mailing lists