clocksource/exynos_mct: irq_pipeline: set clockevent IRQs
Subsystems (2)
PATCH 1/1 clocksource/exynos_mct: irq_pipeline: set clockevent IRQs
From: Jan Kiszka <[email protected]>
The MCT driver only fills clock_event_device::irq for the local timers in SPI mode. In PPI mode (samsung,exynos4412-mct), the per-CPU tick devices were left with IRQ 0, so the proxy tick device never switched the local timer interrupt to out-of-band mode, and the in-band tick ran on registers which were never saved, making every tick look like a user mode tick on ARM. The global comparator device had the same omission.
--- drivers/clocksource/exynos_mct.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/exynos_mct.c +2 -0
@@ -350,6 +350,7 @@ static irqreturn_t exynos4_mct_comp_isr(int irq, void *dev_id)static int exynos4_clockevent_init (void ) { mct_comp_device.cpumask =cpumask_of (0 ); + mct_comp_device.irq = mct_irqs[MCT_G0_IRQ ];clockevents_config_and_register (&mct_comp_device, clk_rate,0xf ,0xffffffff ); if (request_irq(mct_irqs[MCT_G0_IRQ], exynos4_mct_comp_isr,
@@ -487,6 +488,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu)irq_force_affinity (evt->irq,cpumask_of (cpu));enable_irq (evt->irq); }else { + evt->irq = mct_irqs[MCT_L0_IRQ ];enable_percpu_irq (mct_irqs[MCT_L0_IRQ ],0 ); } clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),
Signature · 1 line
2.47.3
Philippe Gerum
AppliedQuoted 29 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
The MCT driver only fills
clock_event_device::irqfor the local timers in SPI mode. In PPI mode (samsung,exynos4412-mct), the per-CPU tick devices were left with IRQ 0, so the proxy tick device never switched the local timer interrupt to out-of-band mode, and the in-band tick ran on registers which were never saved, making every tick look like a user mode tick on ARM. The global comparator device had the same omission.Assisted-by opencode:Opus-5.5Signed-off-by Jan Kiszka <[email protected]>--- drivers/clocksource/exynos_mct.c | 2 ++ 1 file changed, 2 insertions(+)drivers/clocksource/exynos_mct.c +1
-0@@ -350,6 +350,7 @@ static irqreturn_t exynos4_mct_comp_isr(int irq, void *dev_id)static int exynos4_clockevent_init (void ) { mct_comp_device.cpumask =cpumask_of (0 ); + mct_comp_device.irq = mct_irqs[MCT_G0_IRQ ];clockevents_config_and_register (&mct_comp_device, clk_rate,0xf ,0xffffffff ); if (request_irq(mct_irqs[MCT_G0_IRQ], exynos4_mct_comp_isr,
drivers/clocksource/exynos_mct.c static int exynos4_mct_starting_cpu(unsigned int cpu) · line 494
Quoted 7 lines
drivers/clocksource/exynos_mct.c +1
-0@@ -487,6 +488,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu)irq_force_affinity (evt->irq,cpumask_of (cpu));enable_irq (evt->irq); }else { + evt->irq = mct_irqs[MCT_L0_IRQ ];enable_percpu_irq (mct_irqs[MCT_L0_IRQ ],0 ); } clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),
Merged, thanks.
Signature · 1 line
Philippe.
Quoted 32 lines · Philippe Gerum
Quoted 30 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
The MCT driver only fills
clock_event_device::irqfor the local timers in SPI mode. In PPI mode (samsung,exynos4412-mct), the per-CPU tick devices were left with IRQ 0, so the proxy tick device never switched the local timer interrupt to out-of-band mode, and the in-band tick ran on registers which were never saved, making every tick look like a user mode tick on ARM. The global comparator device had the same omission.Assisted-by opencode:Opus-5.5Signed-off-by Jan Kiszka <[email protected]>--- drivers/clocksource/exynos_mct.c | 2 ++ 1 file changed, 2 insertions(+)drivers/clocksource/exynos_mct.c +1
-0@@ -350,6 +350,7 @@ static irqreturn_t exynos4_mct_comp_isr(int irq, void *dev_id)static int exynos4_clockevent_init (void ) { mct_comp_device.cpumask =cpumask_of (0 ); + mct_comp_device.irq = mct_irqs[MCT_G0_IRQ ];clockevents_config_and_register (&mct_comp_device, clk_rate,0xf ,0xffffffff ); if (request_irq(mct_irqs[MCT_G0_IRQ], exynos4_mct_comp_isr,@@ -487,6 +488,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu)irq_force_affinity (evt->irq,cpumask_of (cpu));
Quoted 9 lines
drivers/clocksource/exynos_mct.c static int exynos4_mct_starting_cpu(unsigned int cpu) · line 494
Quoted 6 lines
drivers/clocksource/exynos_mct.c +1
-0enable_irq (evt->irq); }else { + evt->irq = mct_irqs[MCT_L0_IRQ ];enable_percpu_irq (mct_irqs[MCT_L0_IRQ ],0 ); } clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),Merged, thanks.
Thanks for merging the first bits. Do you plan to push soon, or are more merges or tests on the list first?
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center
Quoted 43 lines · Jan Kiszka
Quoted 32 lines · Philippe Gerum
Quoted 30 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
The MCT driver only fills
clock_event_device::irqfor the local timers in SPI mode. In PPI mode (samsung,exynos4412-mct), the per-CPU tick devices were left with IRQ 0, so the proxy tick device never switched the local timer interrupt to out-of-band mode, and the in-band tick ran on registers which were never saved, making every tick look like a user mode tick on ARM. The global comparator device had the same omission.Assisted-by opencode:Opus-5.5Signed-off-by Jan Kiszka <[email protected]>--- drivers/clocksource/exynos_mct.c | 2 ++ 1 file changed, 2 insertions(+)drivers/clocksource/exynos_mct.c +1
-0@@ -350,6 +350,7 @@ static irqreturn_t exynos4_mct_comp_isr(int irq, void *dev_id)static int exynos4_clockevent_init (void ) { mct_comp_device.cpumask =cpumask_of (0 ); + mct_comp_device.irq = mct_irqs[MCT_G0_IRQ ];clockevents_config_and_register (&mct_comp_device, clk_rate,0xf ,0xffffffff ); if (request_irq(mct_irqs[MCT_G0_IRQ], exynos4_mct_comp_isr,@@ -487,6 +488,7 @@ static int exynos4_mct_starting_cpu(unsigned int cpu)irq_force_affinity (evt->irq,cpumask_of (cpu));Quoted 9 lines
drivers/clocksource/exynos_mct.c static int exynos4_mct_starting_cpu(unsigned int cpu) · line 494
Quoted 6 lines
drivers/clocksource/exynos_mct.c +1
-0enable_irq (evt->irq); }else { + evt->irq = mct_irqs[MCT_L0_IRQ ];enable_percpu_irq (mct_irqs[MCT_L0_IRQ ],0 ); } clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),Merged, thanks.
Quoted 3 lines
Thanks for merging the first bits. Do you plan to push soon, or are more merges or tests on the list first?
Still two patches to review first.
Signature · 1 line
Philippe.