* [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection
@ 2012-06-13 17:13 Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h Jon Medhurst (Tixy)
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-13 17:13 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h
2012-06-13 17:13 [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Jon Medhurst (Tixy)
@ 2012-06-13 17:13 ` Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ Jon Medhurst (Tixy)
2012-06-14 8:55 ` [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Russell King - ARM Linux
2 siblings, 0 replies; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-13 17:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Jon Medhurst <tixy@linaro.org>
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.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
arch/arm/mach-vexpress/include/mach/irqs.h | 3 ---
arch/arm/mach-vexpress/ct-ca9x4.c | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm/mach-vexpress/include/mach/irqs.h b/arch/arm/mach-vexpress/include/mach/irqs.h
index 4b10ee7..e109c66 100644
--- a/arch/arm/mach-vexpress/include/mach/irqs.h
+++ b/arch/arm/mach-vexpress/include/mach/irqs.h
@@ -1,4 +1 @@
-#define IRQ_LOCALTIMER 29
-#define IRQ_LOCALWDOG 30
-
#define NR_IRQS 256
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index c65cc3b..123d68af 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -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)
{
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ
2012-06-13 17:13 [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h Jon Medhurst (Tixy)
@ 2012-06-13 17:13 ` Jon Medhurst (Tixy)
2012-06-13 19:23 ` Rob Herring
2012-06-14 8:55 ` [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Russell King - ARM Linux
2 siblings, 1 reply; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-13 17:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Jon Medhurst <tixy@linaro.org>
This is required to add vexpress to multiplatform kernels containing
other boards which require SPARSE_IRQ.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 84449dd..bdede09 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ
2012-06-13 17:13 ` [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ Jon Medhurst (Tixy)
@ 2012-06-13 19:23 ` Rob Herring
2012-06-14 7:32 ` Jon Medhurst (Tixy)
0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2012-06-13 19:23 UTC (permalink / raw)
To: linux-arm-kernel
On 06/13/2012 12:13 PM, Jon Medhurst (Tixy) wrote:
> From: Jon Medhurst <tixy@linaro.org>
>
> This is required to add vexpress to multiplatform kernels containing
> other boards which require SPARSE_IRQ.
>
> Signed-off-by: Jon Medhurst <tixy@linaro.org>
> ---
> arch/arm/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 84449dd..bdede09 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -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
> select NO_IOPORT
> select PLAT_VERSATILE
> select PLAT_VERSATILE_CLCD
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ
2012-06-13 19:23 ` Rob Herring
@ 2012-06-14 7:32 ` Jon Medhurst (Tixy)
0 siblings, 0 replies; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-14 7:32 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 2012-06-13 at 14:23 -0500, Rob Herring wrote:
> On 06/13/2012 12:13 PM, Jon Medhurst (Tixy) wrote:
> > From: Jon Medhurst <tixy@linaro.org>
> >
> > This is required to add vexpress to multiplatform kernels containing
> > other boards which require SPARSE_IRQ.
> >
> > Signed-off-by: Jon Medhurst <tixy@linaro.org>
> > ---
> > arch/arm/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index 84449dd..bdede09 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -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?
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.)
--
Tixy
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection
2012-06-13 17:13 [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ Jon Medhurst (Tixy)
@ 2012-06-14 8:55 ` Russell King - ARM Linux
2012-06-14 11:33 ` Jon Medhurst (Tixy)
2 siblings, 1 reply; 8+ messages in thread
From: Russell King - ARM Linux @ 2012-06-14 8:55 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 13, 2012 at 06:13:20PM +0100, Jon Medhurst (Tixy) wrote:
> 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
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection
2012-06-14 8:55 ` [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Russell King - ARM Linux
@ 2012-06-14 11:33 ` Jon Medhurst (Tixy)
2012-06-14 11:43 ` [PATCH v2] ARM: vexpress: Enable SPARSE_IRQ Jon Medhurst (Tixy)
0 siblings, 1 reply; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-14 11:33 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 2012-06-14 at 09:55 +0100, Russell King - ARM Linux wrote:
> 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 ;-)
> 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...
--
Tixy
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] ARM: vexpress: Enable SPARSE_IRQ
2012-06-14 11:33 ` Jon Medhurst (Tixy)
@ 2012-06-14 11:43 ` Jon Medhurst (Tixy)
0 siblings, 0 replies; 8+ messages in thread
From: Jon Medhurst (Tixy) @ 2012-06-14 11:43 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
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(-)
diff --git a/arch/arm/mach-vexpress/include/mach/irqs.h b/arch/arm/mach-vexpress/include/mach/irqs.h
index 4b10ee7..b64611d 100644
--- a/arch/arm/mach-vexpress/include/mach/irqs.h
+++ b/arch/arm/mach-vexpress/include/mach/irqs.h
@@ -1,4 +1,2 @@
#define IRQ_LOCALTIMER 29
#define IRQ_LOCALWDOG 30
-
-#define NR_IRQS 256
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 3ef3fda..0f477a5 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -26,6 +26,7 @@
#include "core.h"
+#include <mach/irqs.h>
#include <mach/motherboard.h>
#include <plat/clcd.h>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6f3370e..9dd9701 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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.
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-06-14 11:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 17:13 [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 1/2] ARM: vexpress: Remove IRQ defines from mach/irq.h Jon Medhurst (Tixy)
2012-06-13 17:13 ` [PATCH 2/2] ARM: vexpress: Enable selection of SPARSE_IRQ Jon Medhurst (Tixy)
2012-06-13 19:23 ` Rob Herring
2012-06-14 7:32 ` Jon Medhurst (Tixy)
2012-06-14 8:55 ` [PATCH 0/2] ARM: vexpress: Enable SPARSE_IRQ selection Russell King - ARM Linux
2012-06-14 11:33 ` Jon Medhurst (Tixy)
2012-06-14 11:43 ` [PATCH v2] ARM: vexpress: Enable SPARSE_IRQ Jon Medhurst (Tixy)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).