Skip to contentSkip to conversation

ARM: orion5x: fix legacy orion5x IRQ numbers

PATCH New Gregory CLEMENT 3 participants 4 messages Aug 15, 2015 – Aug 21, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: orion5x: fix legacy orion5x IRQ numbers

From: Benjamin Cama <[email protected]>

Since v3.18, attempts to deliver IRQ0 are rejected, breaking orion5x. Fix this by increasing all interrupts by one, as did 5d6bed2a9c8b for dove. Also, force MULTI_IRQ_HANDLER for all orion platforms (including dove) as the specific handler is needed to shift back IRQ numbers by one.

[gregory.clement at free-electrons.com]: moved the select MULTI_IRQ_HANDLER from PLAT_ORION_LEGACY to ARCH_ORION5X as it broke the build for dove.

Fixes a71b092a9c68 ("ARM: Convert handle_IRQ to use __handle_domain_irq")

---
Hi Benjamin and Detlef,

I amended the patch from Benjamin as it break the build for dove. Could you test it again wit this version?

Thanks,

Gregory

 arch/arm/Kconfig                          |  1 +
 arch/arm/mach-orion5x/include/mach/irqs.h | 64 +++++++++++++++----------------
 arch/arm/mach-orion5x/irq.c               |  4 +-
 3 files changed, 35 insertions(+), 34 deletions(-)
arch/arm/Kconfig +1 -0
index a750c1425c3a..a67e53a3ba31 100644
@@ -536,6 +536,7 @@ config ARCH_ORION5X
 	select MVEBU_MBUS
 	select PCI
 	select PLAT_ORION_LEGACY
+	select MULTI_IRQ_HANDLER
 	help
 	  Support for the following Marvell Orion 5x series SoCs:
 	  Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
arch/arm/mach-orion5x/include/mach/irqs.h +32 -32

74 lines not on this page · raw message

arch/arm/mach-orion5x/irq.c +2 -2
index cd4bac4d7e43..086ecb87d885 100644
@@ -42,7 +42,7 @@ __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs)
 	stat = readl_relaxed(MAIN_IRQ_CAUSE);
 	stat &= readl_relaxed(MAIN_IRQ_MASK);
 	if (stat) {
-		unsigned int hwirq = __fls(stat);
+		unsigned int hwirq = 1 + __fls(stat);
 		handle_IRQ(hwirq, regs);
 		return;
 	}
@@ -51,7 +51,7 @@ __exception_irq_entry orion5x_legacy_handle_irq(struct pt_regs *regs)
 
 void __init orion5x_init_irq(void)
 {
-	orion_irq_init(0, MAIN_IRQ_MASK);
+	orion_irq_init(1, MAIN_IRQ_MASK);
 
 #ifdef CONFIG_MULTI_IRQ_HANDLER
 	set_handle_irq(orion5x_legacy_handle_irq);
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 ARM: orion5x: fix legacy orion5x IRQ numbers

Hi Gregory,

Quoted 2 lines · Gregory CLEMENT

I amended the patch from Benjamin as it break the build for dove. Could you test it again wit this version?

Tested with orion5x_defconfig on 4.2.0-rc6 and with my own config on 4.1.2.
Looks good for both :-)

Thanks!
Detlef

#2 lore raw

PATCH 1/1 ARM: orion5x: fix legacy orion5x IRQ numbers

In reply to Gregory CLEMENT

Hi Gr?gory,

Le samedi 15 ao?t 2015 ? 16:17 +0200, Gregory CLEMENT a ?crit :

Quoted 2 lines

I amended the patch from Benjamin as it break the build for dove. Could you test it again wit this version?

Thanks for the fix. I don't have much time to test it, but as the dts conversion patch for my Linkstation Mini is in the series, this fix shouldn't change anything, as the dts board file uses the generic irqchip handler, isn't it?

Tell me if I missed something. Regards,
--
benjamin

#3 lore raw

PATCH 1/1 ARM: orion5x: fix legacy orion5x IRQ numbers

Hi Benjamin,

Quoted 6 lines · Benjamin Cama

Hi Gr?gory,

Le samedi 15 ao?t 2015 ? 16:17 +0200, Gregory CLEMENT a ?crit :

Quoted 2 lines

I amended the patch from Benjamin as it break the build for dove. Could you test it again wit this version?

Quoted 6 lines

Thanks for the fix. I don't have much time to test it, but as the dts conversion patch for my Linkstation Mini is in the series, this fix shouldn't change anything, as the dts board file uses the generic irqchip handler, isn't it?

Tell me if I missed something. Regards,

Detlef tested it so it's OK. I was asking you also because it a patch you wrote.

Thanks,

Gregory

Quoted 3 lines

--
benjamin

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com