mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/exynos_mct: only use IRQF_PERCPU flag on ARM64 SoCs
@ 2025-09-04 15:32 ` Peter Griffin
  2025-09-04 17:49   ` Marek Szyprowski
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Griffin @ 2025-09-04 15:32 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Marek Szyprowski,
	Krzysztof Kozlowski, Alim Akhtar, Ingo Molnar, Hosung Kim,
	Will McVicker
  Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Tudor Ambarus,
	André Draszik, John Stultz, kernel-team, youngmin.nam,
	hoony.yu, Peter Griffin

This patch addresses a regression reported in [1] whereby CPU hotplug now
fails on little CPUs (for reasons that aren't fully understood) for Arm
32bit platforms such as Exynos 5422 used in OdroidXU3/XU4 boards.

Note: This patch makes an assumption that the exynos_mct driver is only
used on Arm 32/64 bit SoCs.

Fixes: f3cec54ee3bf ("clocksource/drivers/exynos_mct: Set local timer interrupts as percpu")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Closes: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/
Link: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/ [1]
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
Hi Marek & Krzysztof,
    
Can you test this patch on your Exynos5422 based boards and see if it
resolves the issue Marek reported of CPU hot plug failing on the little
cores of Exynos 5422 based boards?

Unfortunately I only have gs101 based Exynos hardware (which is Arm 64 bit
SoC) to test on. I can confirm CPU hotplug is functional on the little
cluster CPUs with IRQF_PERCPU flag on Pixel6/gs101 though.

Thanks,

Peter
---
---
 drivers/clocksource/exynos_mct.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 62febeb4e1decec7f5db104db395884824563915..91d79b73a96a7e8a354d803c2b497bcde92af8d8 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -532,6 +532,16 @@ static int __init exynos4_timer_resources(struct device_node *np)
 	return 0;
 }
 
+/*
+ * For reasons that aren't fully understood IRQF_PERCPU breaks CPU hotplug on
+ * little cores of ARM 32 bit SoCs like Exynos5422 used in OdroidXU3/4 boards.
+ */
+#if defined(CONFIG_ARM64) || defined(CONFIG_COMPILE_TEST)
+#define MCT_IRQ_FLAGS (IRQF_TIMER | IRQF_NOBALANCING | IRQF_PERCPU)
+#elif defined(CONFIG_ARM)
+#define MCT_IRQ_FLAGS (IRQF_TIMER | IRQF_NOBALANCING)
+#endif
+
 /**
  * exynos4_timer_interrupts - initialize MCT interrupts
  * @np: device node for MCT
@@ -602,8 +612,7 @@ static int __init exynos4_timer_interrupts(struct device_node *np,
 			irq_set_status_flags(mct_irq, IRQ_NOAUTOEN);
 			if (request_irq(mct_irq,
 					exynos4_mct_tick_isr,
-					IRQF_TIMER | IRQF_NOBALANCING |
-					IRQF_PERCPU,
+					MCT_IRQ_FLAGS,
 					pcpu_mevt->name, pcpu_mevt)) {
 				pr_err("exynos-mct: cannot register IRQ (cpu%d)\n",
 									cpu);

---
base-commit: 4ac65880ebca1b68495bd8704263b26c050ac010
change-id: 20250904-exynos-mct-arm32-cpuhp-regression-14f321e4a591

Best regards,
-- 
Peter Griffin <peter.griffin@linaro.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clocksource/drivers/exynos_mct: only use IRQF_PERCPU flag on ARM64 SoCs
  2025-09-04 15:32 ` [PATCH] clocksource/drivers/exynos_mct: only use IRQF_PERCPU flag on ARM64 SoCs Peter Griffin
@ 2025-09-04 17:49   ` Marek Szyprowski
  2025-09-05  8:15     ` Peter Griffin
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Szyprowski @ 2025-09-04 17:49 UTC (permalink / raw)
  To: Peter Griffin, Daniel Lezcano, Thomas Gleixner,
	Krzysztof Kozlowski, Alim Akhtar, Ingo Molnar, Will McVicker
  Cc: linux-kernel, linux-arm-kernel, linux-samsung-soc, Tudor Ambarus,
	André Draszik, John Stultz, kernel-team, youngmin.nam,
	hoony.yu

On 04.09.2025 17:32, Peter Griffin wrote:
> This patch addresses a regression reported in [1] whereby CPU hotplug now
> fails on little CPUs (for reasons that aren't fully understood) for Arm
> 32bit platforms such as Exynos 5422 used in OdroidXU3/XU4 boards.
>
> Note: This patch makes an assumption that the exynos_mct driver is only
> used on Arm 32/64 bit SoCs.
>
> Fixes: f3cec54ee3bf ("clocksource/drivers/exynos_mct: Set local timer interrupts as percpu")
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Closes: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/
> Link: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/ [1]
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
> Hi Marek & Krzysztof,
>      
> Can you test this patch on your Exynos5422 based boards and see if it
> resolves the issue Marek reported of CPU hot plug failing on the little
> cores of Exynos 5422 based boards?
>
> Unfortunately I only have gs101 based Exynos hardware (which is Arm 64 bit
> SoC) to test on. I can confirm CPU hotplug is functional on the little
> cluster CPUs with IRQF_PERCPU flag on Pixel6/gs101 though.

This is a duplicate of 
https://lore.kernel.org/all/20250827102645.1964659-1-m.szyprowski@samsung.com/

and yes, it fixes the reported issue.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

> Thanks,
>
> Peter
> ---
> ---
>   drivers/clocksource/exynos_mct.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> index 62febeb4e1decec7f5db104db395884824563915..91d79b73a96a7e8a354d803c2b497bcde92af8d8 100644
> --- a/drivers/clocksource/exynos_mct.c
> +++ b/drivers/clocksource/exynos_mct.c
> @@ -532,6 +532,16 @@ static int __init exynos4_timer_resources(struct device_node *np)
>   	return 0;
>   }
>   
> +/*
> + * For reasons that aren't fully understood IRQF_PERCPU breaks CPU hotplug on
> + * little cores of ARM 32 bit SoCs like Exynos5422 used in OdroidXU3/4 boards.
> + */
> +#if defined(CONFIG_ARM64) || defined(CONFIG_COMPILE_TEST)
> +#define MCT_IRQ_FLAGS (IRQF_TIMER | IRQF_NOBALANCING | IRQF_PERCPU)
> +#elif defined(CONFIG_ARM)
> +#define MCT_IRQ_FLAGS (IRQF_TIMER | IRQF_NOBALANCING)
> +#endif
> +
>   /**
>    * exynos4_timer_interrupts - initialize MCT interrupts
>    * @np: device node for MCT
> @@ -602,8 +612,7 @@ static int __init exynos4_timer_interrupts(struct device_node *np,
>   			irq_set_status_flags(mct_irq, IRQ_NOAUTOEN);
>   			if (request_irq(mct_irq,
>   					exynos4_mct_tick_isr,
> -					IRQF_TIMER | IRQF_NOBALANCING |
> -					IRQF_PERCPU,
> +					MCT_IRQ_FLAGS,
>   					pcpu_mevt->name, pcpu_mevt)) {
>   				pr_err("exynos-mct: cannot register IRQ (cpu%d)\n",
>   									cpu);
>
> ---
> base-commit: 4ac65880ebca1b68495bd8704263b26c050ac010
> change-id: 20250904-exynos-mct-arm32-cpuhp-regression-14f321e4a591
>
> Best regards,

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clocksource/drivers/exynos_mct: only use IRQF_PERCPU flag on ARM64 SoCs
  2025-09-04 17:49   ` Marek Szyprowski
@ 2025-09-05  8:15     ` Peter Griffin
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Griffin @ 2025-09-05  8:15 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Daniel Lezcano, Thomas Gleixner, Krzysztof Kozlowski,
	Alim Akhtar, Ingo Molnar, Will McVicker, linux-kernel,
	linux-arm-kernel, linux-samsung-soc, Tudor Ambarus,
	André Draszik, John Stultz, kernel-team, youngmin.nam,
	hoony.yu

Hi Marek,

On Thu, 4 Sept 2025 at 18:49, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> On 04.09.2025 17:32, Peter Griffin wrote:
> > This patch addresses a regression reported in [1] whereby CPU hotplug now
> > fails on little CPUs (for reasons that aren't fully understood) for Arm
> > 32bit platforms such as Exynos 5422 used in OdroidXU3/XU4 boards.
> >
> > Note: This patch makes an assumption that the exynos_mct driver is only
> > used on Arm 32/64 bit SoCs.
> >
> > Fixes: f3cec54ee3bf ("clocksource/drivers/exynos_mct: Set local timer interrupts as percpu")
> > Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Closes: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/
> > Link: https://lore.kernel.org/lkml/8c861182-7e90-4bbf-ac04-173d59f5af69@samsung.com/ [1]
> > Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> > ---
> > Hi Marek & Krzysztof,
> >
> > Can you test this patch on your Exynos5422 based boards and see if it
> > resolves the issue Marek reported of CPU hot plug failing on the little
> > cores of Exynos 5422 based boards?
> >
> > Unfortunately I only have gs101 based Exynos hardware (which is Arm 64 bit
> > SoC) to test on. I can confirm CPU hotplug is functional on the little
> > cluster CPUs with IRQF_PERCPU flag on Pixel6/gs101 though.
>
> This is a duplicate of
> https://lore.kernel.org/all/20250827102645.1964659-1-m.szyprowski@samsung.com/
>
> and yes, it fixes the reported issue.
>
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

Sorry I hadn't noticed your patch for this. Let's go with your fix
then as it seems more succinct.

Thanks,

Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-05  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20250904153242eucas1p12841f999bf68861f7386b0c9f3f4f60f@eucas1p1.samsung.com>
2025-09-04 15:32 ` [PATCH] clocksource/drivers/exynos_mct: only use IRQF_PERCPU flag on ARM64 SoCs Peter Griffin
2025-09-04 17:49   ` Marek Szyprowski
2025-09-05  8:15     ` Peter Griffin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®