ARM: vexpress: Enable SPARSE_IRQ selection
Subsystems (3)
cover ARM: vexpress: Enable SPARSE_IRQ selection
To enable vexpress to be included in multiplatform kernels containing boards which require SPARSE_IRQ, we need to also support this option. This turns out to be very simple...
[PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ
PATCH 1/2 ARM: vexpress: Remove IRQ defines from mach/irq.h
From: Jon Medhurst <[email protected]>
The irq numbers are only used in one place so remove these defines and hardcode the value at the location it is used.
This leaves mach/irq.h only containing NR_IRQ and so it is safe when it gets dropped from inclusion when SPARSE_IRQ is defined.
--- arch/arm/mach-vexpress/include/mach/irqs.h | 3 --- arch/arm/mach-vexpress/ct-ca9x4.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
arch/arm/mach-vexpress/include/mach/irqs.h +0 -3
@@ -1,4 +1 @@ -#define IRQ_LOCALTIMER 29 -#define IRQ_LOCALWDOG 30 -#define NR_IRQS 256
arch/arm/mach-vexpress/ct-ca9x4.c +1 -1
@@ -45,7 +45,7 @@ static void __init ct_ca9x4_map_io(void) }#ifdef CONFIG_HAVE_ARM_TWD -static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, IRQ_LOCALTIMER); +static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, A9_MPCORE_TWD, 29);static void __init ca9x4_twd_init (void ) {
Signature · 1 line
1.7.10
PATCH 2/2 ARM: vexpress: Enable selection of SPARSE_IRQ
In reply to Jon Medhurst (Tixy)From: Jon Medhurst <[email protected]>
This is required to add vexpress to multiplatform kernels containing other boards which require SPARSE_IRQ.
--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
@@ -311,6 +311,7 @@ config ARCH_VEXPRESS select HAVE_CLK select HAVE_PATA_PLATFORM select ICST + select MAY_HAVE_SPARSE_IRQ select NO_IOPORT select PLAT_VERSATILE select PLAT_VERSATILE_CLCD
Signature · 1 line
1.7.10
PATCH 2/2 ARM: vexpress: Enable selection of SPARSE_IRQ
Quoted 15 lines · Jon Medhurst (Tixy)
From: Jon Medhurst <[email protected]>
This is required to add vexpress to multiplatform kernels containing other boards which require
SPARSE_IRQ.Signed-off-by Jon Medhurst <[email protected]>--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARCH_VEXPRESS · line 314
Quoted 4 lines
arch/arm/Kconfig +1
-0@@ -311,6 +311,7 @@ config ARCH_VEXPRESS select HAVE_CLK select HAVE_PATA_PLATFORM select ICST + select MAY_HAVE_SPARSE_IRQ
Why not always select SPARSE_IRQ and remove mach/irqs.h?
Rob
Quoted 3 lines
arch/arm/Kconfig +0
-0select NO_IOPORT select PLAT_VERSATILE select PLAT_VERSATILE_CLCD
PATCH 2/2 ARM: vexpress: Enable selection of SPARSE_IRQ
Quoted 11 lines · Rob Herring
Quoted 10 lines · Jon Medhurst (Tixy)
From: Jon Medhurst <[email protected]>
This is required to add vexpress to multiplatform kernels containing other boards which require
SPARSE_IRQ.Signed-off-by Jon Medhurst <[email protected]>--- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
arch/arm/Kconfig config ARCH_VEXPRESS · line 314
Quoted 9 lines
arch/arm/Kconfig +1
-0@@ -311,6 +311,7 @@ config ARCH_VEXPRESS select HAVE_CLK select HAVE_PATA_PLATFORM select ICST + select MAY_HAVE_SPARSE_IRQWhy not always select
SPARSE_IRQand removemach/irqs.h?
I did consider that but my conservative side won out. If there are no real downsides to sparse irqs that people would object to then I'm happy to unconditionally enable it. (I'll post a v2 patch that does this.)
Signature · 1 line
Tixy
cover ARM: vexpress: Enable SPARSE_IRQ selection
In reply to Jon Medhurst (Tixy)Quoted 6 lines · Jon Medhurst (Tixy)
To enable vexpress to be included in multiplatform kernels containing boards which require
SPARSE_IRQ, we need to also support this option. This turns out to be very simple...[PATCH 1/2] ARM: vexpress: Remove IRQ defines from
mach/irq.h[PATCH 2/2] ARM: vexpress: Enable selection ofSPARSE_IRQ
So you're relying on the GIC IRQs starting at 0, and so that the local timer interrupt stays at 29 ? And the local timer interrupt is now just some random number buried in some C file.
cover ARM: vexpress: Enable SPARSE_IRQ selection
Quoted 2 lines · Russell King - ARM Linux
So you're relying on the GIC IRQs starting at 0, and so that the local timer interrupt stays at 29 ?
Well, the existing code already did that ;-)
Quoted 2 lines
And the local timer interrupt is now
just some random number buried in some C file.
Yes, that did leave a bit of a bad taste, I guess in the back of my mind I had the (erroneous?) thought that this non-device-tree code would be going away soon.
However, for the purpose of enabling sparse irqs, we don't actually need to mess with the IRQ defines so I'll follow up with an alternative patch which leaves them alone...
Signature · 1 line
Tixy
PATCH v2 1/1 ARM: vexpress: Enable SPARSE_IRQ
To enable vexpress to be included in multiplatform kernels containing boards which require SPARSE_IRQ, we need to also support this option. This turns out to be very simple...
We remove NR_IRQS from mach/irq.h as that is unused with SPARSE_IRQ and include this header directly in ct-ca9x4.c as it will no longer be included via asm/irq.h.
--- arch/arm/mach-vexpress/include/mach/irqs.h | 2 -- arch/arm/mach-vexpress/ct-ca9x4.c | 1 + arch/arm/Kconfig | 1 + 3 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-vexpress/include/mach/irqs.h +0 -2
@@ -1,4 +1,2 @@#define IRQ_LOCALTIMER 29#define IRQ_LOCALWDOG 30 - -#define NR_IRQS 256
arch/arm/mach-vexpress/ct-ca9x4.c +1 -0
@@ -26,6 +26,7 @@#include "core.h" +#include <mach/irqs.h> #include <mach/motherboard.h> #include <plat/clcd.h>
arch/arm/Kconfig +1 -0
@@ -314,6 +314,7 @@ config ARCH_VEXPRESS select NO_IOPORT select PLAT_VERSATILE select PLAT_VERSATILE_CLCD + select SPARSE_IRQ help This enables support for the ARM Ltd Versatile Express boards.
Signature · 1 line
1.7.10