From: Hosung Kim <hosung0.kim@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@samsung.com>
[Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16]
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Youngmin Nam <youngmin.nam@samsung.com>
Tested-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
---
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);
--
2.50.0.rc2.761.g2dc52ea45b-goog
On 20.06.2025 20:17, Will McVicker wrote: > From: Hosung Kim <hosung0.kim@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@samsung.com> > [Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16] > Reviewed-by: Peter Griffin <peter.griffin@linaro.org> > Reviewed-by: Youngmin Nam <youngmin.nam@samsung.com> > Tested-by: Youngmin Nam <youngmin.nam@samsung.com> > Signed-off-by: Will McVicker <willmcvicker@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
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: f3cec54ee3bfd50b90b9f3b7110b9357be97babe
Gitweb: https://git.kernel.org/tip/f3cec54ee3bfd50b90b9f3b7110b9357be97babe
Author: Hosung Kim <hosung0.kim@samsung.com>
AuthorDate: Fri, 20 Jun 2025 11:17:06 -07:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 25 Jul 2025 12:05:39 +02:00
clocksource/drivers/exynos_mct: Set local timer interrupts as percpu
To allow the CPU to handle its own clock events, we need to set the
IRQF_PERCPU flag. This prevents the local timer interrupts from
migrating to other CPUs.
Original commit from:
https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Youngmin Nam <youngmin.nam@samsung.com>
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Youngmin Nam <youngmin.nam@samsung.com>
Link: https://lore.kernel.org/r/20250620181719.1399856-4-willmcvicker@google.com
---
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 96361d5..a5ef7d6 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);
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: 10934da577f627a97db18cf05dbe0c3c1b4a68d6
Gitweb: https://git.kernel.org/tip/10934da577f627a97db18cf05dbe0c3c1b4a68d6
Author: Hosung Kim <hosung0.kim@samsung.com>
AuthorDate: Fri, 20 Jun 2025 11:17:06 -07:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 15 Jul 2025 13:00:50 +02:00
clocksource/drivers/exynos_mct: Set local timer interrupts as percpu
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@samsung.com>
[Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16]
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Youngmin Nam <youngmin.nam@samsung.com>
Tested-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
Link: https://lore.kernel.org/r/20250620181719.1399856-4-willmcvicker@google.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
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 96361d5..a5ef7d6 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);
© 2016 - 2025 Red Hat, Inc.