[PATCH v4 3/6] clocksource/drivers/exynos_mct: Set local timer interrupts as percpu

Marek Szyprowski m.szyprowski at samsung.com
Tue Aug 26 06:51:45 PDT 2025


On 20.06.2025 20:17, Will McVicker wrote:
> From: Hosung Kim <hosung0.kim at samsung.com>
>
> To allow the CPU to handle it's own clock events, we need to set the
> IRQF_PERCPU flag. This prevents the local timer interrupts from
> migrating to other CPUs.
>
> Signed-off-by: Hosung Kim <hosung0.kim at samsung.com>
> [Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16]
> Reviewed-by: Peter Griffin <peter.griffin at linaro.org>
> Reviewed-by: Youngmin Nam <youngmin.nam at samsung.com>
> Tested-by: Youngmin Nam <youngmin.nam at samsung.com>
> Signed-off-by: Will McVicker <willmcvicker at google.com>

This patch has been merged some time ago to v6.17-rc1 as commit 
f3cec54ee3bf ("clocksource/drivers/exynos_mct: Set local timer 
interrupts as percpu"). Recently I found that it breaks CPU hotplug 
support for some 'little' cores on Exynos5422 based boards, like 
OdroidXU3/XU4:

# for i in /sys/devices/system/cpu/cpu[1-9]; do echo 0 >$i/online; done
# for i in /sys/devices/system/cpu/cpu[1-9]; do echo 1 >$i/online; done
[  117.100195] CPU2: failed to come online
-bash: echo: write error: Input/output error
[  118.140426] CPU3: failed to come online
-bash: echo: write error: Input/output error
[  118.148428] CPU4: detected I-Cache line size mismatch, workaround 
enabled
[  118.169613] CPU5: detected I-Cache line size mismatch, workaround 
enabled
[  118.216802] CPU6: detected I-Cache line size mismatch, workaround 
enabled
[  118.283725] CPU7: detected I-Cache line size mismatch, workaround 
enabled
#

Frankly speaking I have no idea why this happens. CPU hotplug was always 
broken for the CPU0, but this is not relevant for this case. Maybe this 
PERCPU flag should be applied only on ARM64-based boards to avoid 
affecting legacy ARM 32bit cases?

> ---
>   drivers/clocksource/exynos_mct.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
> index 96361d5dc57d..a5ef7d64b1c2 100644
> --- a/drivers/clocksource/exynos_mct.c
> +++ b/drivers/clocksource/exynos_mct.c
> @@ -596,7 +596,8 @@ 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_TIMER | IRQF_NOBALANCING |
> +					IRQF_PERCPU,
>   					pcpu_mevt->name, pcpu_mevt)) {
>   				pr_err("exynos-mct: cannot register IRQ (cpu%d)\n",
>   									cpu);

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




More information about the linux-arm-kernel mailing list