Message ID | 20250331230034.806124-4-willmcvicker@google.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add module support for Arm64 Exynos MCT driver | expand |
On Mon, Mar 31, 2025 at 4:00 PM 'Will McVicker' via kernel-team <kernel-team@android.com> wrote: > > From: Hosung Kim <hosung0.kim@samsung.com> > > The MCT local timers can be used as a per-cpu event timer. To prevent Can be used, or are used? If it's an option, is this change important in both cases? > the timer interrupts from migrating to other CPUs, set the flag > IRQF_PERCPU. Might be work expanding this a bit to clarify why the interrupts migrating to other cpus is undesired. > Signed-off-by: Hosung Kim <hosung0.kim@samsung.com> > [Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16] > Signed-off-by: Will McVicker <willmcvicker@google.com> thanks! -john
On 03/31/2025, John Stultz wrote: > On Mon, Mar 31, 2025 at 4:00 PM 'Will McVicker' via kernel-team > <kernel-team@android.com> wrote: > > > > From: Hosung Kim <hosung0.kim@samsung.com> > > > > The MCT local timers can be used as a per-cpu event timer. To prevent > > Can be used, or are used? If it's an option, is this change important > in both cases? > > > the timer interrupts from migrating to other CPUs, set the flag > > IRQF_PERCPU. > > Might be work expanding this a bit to clarify why the interrupts > migrating to other cpus is undesired. Let me dig into this further to figure out if the IP has a limitation where the interrupts need to be handled by the CPU the timer was triggered on or if this is just an optimization. Any chance you know this @Youngmin? Thanks, Will > > > Signed-off-by: Hosung Kim <hosung0.kim@samsung.com> > > [Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16] > > Signed-off-by: Will McVicker <willmcvicker@google.com> > > thanks! > -john
On Tue, Apr 01, 2025 at 09:36:19AM -0700, William McVicker wrote: > On 03/31/2025, John Stultz wrote: > > On Mon, Mar 31, 2025 at 4:00 PM 'Will McVicker' via kernel-team > > <kernel-team@android.com> wrote: > > > > > > From: Hosung Kim <hosung0.kim@samsung.com> > > > > > > The MCT local timers can be used as a per-cpu event timer. To prevent > > > > Can be used, or are used? If it's an option, is this change important > > in both cases? > > > > > the timer interrupts from migrating to other CPUs, set the flag > > > IRQF_PERCPU. > > > > Might be work expanding this a bit to clarify why the interrupts > > migrating to other cpus is undesired. > > Let me dig into this further to figure out if the IP has a limitation where the > interrupts need to be handled by the CPU the timer was triggered on or if this > is just an optimization. > > Any chance you know this @Youngmin? > > Thanks, > Will > Hi Will. Yes. In downstream, we’ve been using MCT as the clock event timer instead of the ARM timer. Setting this flag allows each CPU to handle its own clock events, such as scheduling interrupts. > > > > > Signed-off-by: Hosung Kim <hosung0.kim@samsung.com> > > > [Original commit from https://android.googlesource.com/kernel/gs/+/03267fad19f093bac979ca78309483e9eb3a8d16] > > > Signed-off-by: Will McVicker <willmcvicker@google.com> > > > > thanks! > > -john > >
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 05c50f2f7a7e..21ded37137d7 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -590,7 +590,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);