Make mach/irqs.h optional
Subsystems (9)
cover Make mach/irqs.h optional
From: Rob Herring <[email protected]>
This series removes the include of mach/irqs.h from asm/irq.h when SPARSE_IRQ is selected. Platforms which select SPARSE_IRQ have been updated.
This breaks platforms where SPARSE_IRQ is user selectable. This is on purpose so that SPARSE_IRQ gets properly supported. We could push HAVE_SPARSE_IRQ option down to the platforms that select it if that is preferred. But as recent experience has shown, perhaps breaking platforms is the only way to get some platforms updated.
Platforms either need to set nr_irqs in their machine desc or all irqchips used by a platform need to allocate their irq_descs. There cannot be a mixture. Once this is done, the platforms can select SPARSE_IRQ. shmobile does the latter, and mnp and pxa do the former.
I've built all defconfigs, but don't have any of the affected platforms to boot test. I think shmobile is the main platform that needs testing here.
This series is available here:git://sources.calxeda.com/kernel/linux.git sparse_irq
Rob
Rob Herring (10):
rtc: sa1100: include mach/irqs.h instead of asm/irq.h
sound: pxa2xx-ac97: include mach/irqs.h directly
ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
ARM: it8152: explicitly include mach/irqs.h
sh: intc: remove dependency on NR_IRQS
ARM: mmp: remove NR_IRQS
ARM: pxa: remove NR_IRQS
ARM: shmobile: remove NR_IRQS
ARM: only include mach/irqs.h for !SPARSE_IRQ
ARM: highbank: select SPARSE_IRQ and remove irqs.h
arch/arm/Kconfig | 1 + arch/arm/include/asm/hardware/it8152.h | 3 +++ arch/arm/include/asm/irq.h | 8 ++++++-- arch/arm/include/asm/mc146818rtc.h | 1 - arch/arm/mach-highbank/highbank.c | 1 - arch/arm/mach-highbank/include/mach/irqs.h | 6 ------ arch/arm/mach-mmp/avengers_lite.c | 1 + arch/arm/mach-mmp/include/mach/irqs.h | 2 -- arch/arm/mach-mmp/irq-mmp2.c | 1 + arch/arm/mach-mmp/jasper.c | 1 + arch/arm/mach-mmp/tavorevb.c | 1 + arch/arm/mach-pxa/capc7117.c | 1 + arch/arm/mach-pxa/cm-x300.c | 1 + arch/arm/mach-pxa/colibri-pxa270.c | 2 ++ arch/arm/mach-pxa/colibri-pxa300.c | 1 + arch/arm/mach-pxa/colibri-pxa320.c | 1 + arch/arm/mach-pxa/corgi.c | 3 +++ arch/arm/mach-pxa/csb726.c | 1 + arch/arm/mach-pxa/devices.c | 1 + arch/arm/mach-pxa/em-x270.c | 2 ++ arch/arm/mach-pxa/gumstix.c | 1 + arch/arm/mach-pxa/h5000.c | 1 + arch/arm/mach-pxa/himalaya.c | 1 + arch/arm/mach-pxa/icontrol.c | 1 + arch/arm/mach-pxa/idp.c | 1 + arch/arm/mach-pxa/include/mach/irqs.h | 2 +- arch/arm/mach-pxa/mioa701.c | 1 + arch/arm/mach-pxa/mp900.c | 1 + arch/arm/mach-pxa/palmld.c | 1 + arch/arm/mach-pxa/palmt5.c | 1 + arch/arm/mach-pxa/palmtc.c | 1 + arch/arm/mach-pxa/palmte2.c | 1 + arch/arm/mach-pxa/palmtreo.c | 2 ++ arch/arm/mach-pxa/palmtx.c | 1 + arch/arm/mach-pxa/palmz72.c | 1 + arch/arm/mach-pxa/raumfeld.c | 3 +++ arch/arm/mach-pxa/saar.c | 1 + arch/arm/mach-pxa/spitz.c | 3 +++ arch/arm/mach-pxa/stargate2.c | 1 + arch/arm/mach-pxa/tavorevb.c | 1 + arch/arm/mach-pxa/time.c | 1 + arch/arm/mach-pxa/trizeps4.c | 2 ++ arch/arm/mach-pxa/viper.c | 1 + arch/arm/mach-pxa/vpac270.c | 1 + arch/arm/mach-pxa/xcep.c | 1 + arch/arm/mach-pxa/z2.c | 1 + arch/arm/mach-shmobile/board-g3evm.c | 1 + arch/arm/mach-shmobile/board-g4evm.c | 1 + arch/arm/mach-shmobile/board-kota2.c | 1 + arch/arm/mach-shmobile/board-mackerel.c | 1 + arch/arm/mach-shmobile/include/mach/irqs.h | 2 -- arch/arm/mach-shmobile/intc-sh7367.c | 1 + arch/arm/mach-shmobile/intc-sh7372.c | 1 + arch/arm/mach-shmobile/intc-sh7377.c | 1 + arch/arm/mach-shmobile/intc-sh73a0.c | 1 + arch/arm/mach-shmobile/setup-sh7367.c | 1 + arch/arm/mach-shmobile/setup-sh7372.c | 1 + arch/arm/mach-shmobile/setup-sh7377.c | 1 + arch/arm/mach-shmobile/setup-sh73a0.c | 1 + drivers/rtc/rtc-sa1100.c | 2 +- drivers/sh/intc/balancing.c | 2 +- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/handle.c | 2 +- drivers/sh/intc/internals.h | 9 +++++++++ drivers/sh/intc/virq.c | 2 +- sound/arm/pxa2xx-ac97-lib.c | 2 +- 66 files changed, 86 insertions(+), 21 deletions(-) delete mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
Signature · 1 line
1.7.5.4
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
From: Rob Herring <[email protected]>
Since asm/irq.h may not include mach/irqs.h, include mach/irqs.h directly.
--- drivers/rtc/rtc-sa1100.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/rtc/rtc-sa1100.c +1 -1
@@ -33,7 +33,7 @@#include <linux/io.h> #include <mach/hardware.h> -#include <asm/irq.h> +#include <mach/irqs.h> #define RTC_DEF_DIVIDER (32768 - 1)#define RTC_DEF_TRIM 0
Signature · 1 line
1.7.5.4
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 3 lines · Rob Herring
From: Rob Herring <[email protected]>
Since
asm/irq.hmay not includemach/irqs.h, includemach/irqs.hdirectly.
Rather than doing this, we should be eliminating the need for these old drivers to include mach/irqs.h at all.
Adding the resources to the platform device, and then using at least the IRQ resource(s) would be a definite step forward (and a relatively easy one to do.)
Quoted 22 lines
Signed-off-by Rob Herring <[email protected]>--- drivers/rtc/rtc-sa1100.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/rtc/rtc-sa1100.c +1
-1@@ -33,7 +33,7 @@#include <linux/io.h> #include <mach/hardware.h> -#include <asm/irq.h> +#include <mach/irqs.h> #define RTC_DEF_DIVIDER (32768 - 1)#define RTC_DEF_TRIM 0Signature · 1 line
1.7.5.4
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 12 lines · Russell King - ARM Linux
Quoted 3 lines · Rob Herring
From: Rob Herring <[email protected]>
Since
asm/irq.hmay not includemach/irqs.h, includemach/irqs.hdirectly.Rather than doing this, we should be eliminating the need for these old drivers to include
mach/irqs.hat all.Adding the resources to the platform device, and then using at least the IRQ resource(s) would be a definite step forward (and a relatively easy one to do.)
Well, this has just happened in 3.3. So I can now drop this one I think.
Rob
Quoted 22 lines
Quoted 22 lines
Signed-off-by Rob Herring <[email protected]>--- drivers/rtc/rtc-sa1100.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/rtc/rtc-sa1100.c +1
-1@@ -33,7 +33,7 @@#include <linux/io.h> #include <mach/hardware.h> -#include <asm/irq.h> +#include <mach/irqs.h> #define RTC_DEF_DIVIDER (32768 - 1)#define RTC_DEF_TRIM 0Signature · 1 line
1.7.5.4
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 9 lines · Rob Herring
Quoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Rob Herring
From: Rob Herring <[email protected]>
Since
asm/irq.hmay not includemach/irqs.h, includemach/irqs.hdirectly.Rather than doing this, we should be eliminating the need for these old drivers to include
mach/irqs.hat all.
Quoted 6 lines
Quoted 4 lines
Adding the resources to the platform device, and then using at least the IRQ resource(s) would be a definite step forward (and a relatively easy one to do.)
Well, this has just happened in 3.3. So I can now drop this one I think.
Another problem that resources solve (and your original patch didn't make it any better nor worse) has to do with include file search paths. Once we start building more than one SOC in the kernel, we won't be able to support the inclusion of <mach/whatever.h> from driver code anymore since this could refer to more than one instances of arch/arm/mach-*/include/mach/whatever.h.
Nicolas
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 6 lines · Nicolas Pitre
Another problem that resources solve (and your original patch didn't make it any better nor worse) has to do with include file search paths. Once we start building more than one SOC in the kernel, we won't be able to support the inclusion of <
mach/whatever.h> from driver code anymore since this could refer to more than one instances ofarch/arm/mach-*/include/mach/whatever.h.
As a general principle, yes. We're going to run into some big horrible problem cases with it though. The biggest few areas I think will be the USB host drivers, ALSA ASoC board specifics and PCMCIA board specifics.
I don't particularly see the SA-11x0 code having that sorted out in short time - we have too many cases where we share registers throughout the code in all sorts of places. Eg, things like the peripheral controller registers and the watchdog stuff accesses the OS timer registers directly.
Things will gradually get better over time - the StrongARM code still has at least two interested parties on it (one being for Simpad, the other being me.)
I've been toying with a DMA engine driver for the SA11x0 recently (because I wanted a platform to chase up my idea of providing a generic virtual DMA channel library to the DMA engine code). This includes converting the IrDA driver to use it and resurecting the audio on the Assabet via the UDA1341.
We're going to need this library - if we're going to see people moving their private DMA engine APIs over to the established one, we'll see multiple reimplementations of this all over the place (just like we have in amba-pl08x and others.)
Why put so much work into a mostly dead platform? Well, it's one of the few decent platforms which I have, which actually has working DMA hardware. Why audio? It's one of those which provides a significant stress test on DMA stuff being correct. Why IrDA? It can reconfigure a DMA channel (eg, burst size) on the fly when it switches between SIR/FIR mode.
It may be 12 years old but it's still a very useful platform to develop non-hardware specific features on!
I've also been adding GPIO support to PCMCIA soc-common. That helps to remove some open-coded platform specifics from drivers/pcmcia, but doesn't entirely eliminate them. If this progresses sufficiently, we may be able to get rid of a fair number of platform files in there.
Obviously, patches haven't been posted yet... I'll probably push some of the patch sets shortly after -rc1 hits.
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 8 lines · Russell King - ARM Linux
Why put so much work into a mostly dead platform? Well, it's one of the few decent platforms which I have, which actually has working DMA hardware. Why audio? It's one of those which provides a significant stress test on DMA stuff being correct. Why IrDA? It can reconfigure a DMA channel (eg, burst size) on the fly when it switches between SIR/FIR mode.
It may be 12 years old but it's still a very useful platform to develop non-hardware specific features on!
Absolutely. Having a simple (by today's standard) platform to develop new interfaces is certainly a good way to make sure things work in practice, and that provides a nice examples for others to follow.
Nicolas
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
In reply to Nicolas PitreNicolas,
Quoted 16 lines · Nicolas Pitre
Quoted 14 lines · Rob Herring
Quoted 12 lines · Russell King - ARM Linux
Quoted 3 lines · Rob Herring
From: Rob Herring <[email protected]>
Since
asm/irq.hmay not includemach/irqs.h, includemach/irqs.hdirectly.Rather than doing this, we should be eliminating the need for these old drivers to include
mach/irqs.hat all.Adding the resources to the platform device, and then using at least the IRQ resource(s) would be a definite step forward (and a relatively easy one to do.)
Quoted 8 lines
Quoted 1 line
Well, this has just happened in 3.3. So I can now drop this one I think.
Another problem that resources solve (and your original patch didn't make it any better nor worse) has to do with include file search paths. Once we start building more than one SOC in the kernel, we won't be able to support the inclusion of <
mach/whatever.h> from driver code anymore since this could refer to more than one instances ofarch/arm/mach-*/include/mach/whatever.h.
I'm fully aware of this issue and was not trying to solve that here. On the positive side, it does help highlight drivers which are not single kernel ready by explicitly including mach headers which is easily searched for.
I'm finding some new breakage as I rebase to the latest mainline (gpio-pxa.c). So the next version may have a few more fixes like this one.
Rob
RFC PATCH 1/10 rtc: sa1100: include mach/irqs.h instead of asm/irq.h
Quoted 9 lines · Rob Herring
Quoted 6 lines · Nicolas Pitre
Another problem that resources solve (and your original patch didn't make it any better nor worse) has to do with include file search paths. Once we start building more than one SOC in the kernel, we won't be able to support the inclusion of <
mach/whatever.h> from driver code anymore since this could refer to more than one instances ofarch/arm/mach-*/include/mach/whatever.h.I'm fully aware of this issue and was not trying to solve that here.
I know you are aware (maybe I should have mentioned it explicitly). This comment was more for the wider audience.
Nicolas
RFC PATCH 2/10 sound: pxa2xx-ac97: include mach/irqs.h directly
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation of removing mach/irqs.h include from asm/irq.h, include mach/irqs.h directly.
--- sound/arm/pxa2xx-ac97-lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/pxa2xx-ac97-lib.c +1 -1
@@ -21,7 +21,7 @@#include <sound/ac97_codec.h> #include <sound/pxa2xx-lib.h> -#include <asm/irq.h> +#include <mach/irqs.h> #include <mach/regs-ac97.h> #include <mach/audio.h>
Signature · 1 line
1.7.5.4
RFC PATCH 3/10 ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
The include of mach/irqs.h isn't needed, so remove it. Compiled CMOS rtc driver.
--- arch/arm/include/asm/mc146818rtc.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/include/asm/mc146818rtc.h +0 -1
@@ -5,7 +5,6 @@#define _ASM_MC146818RTC_H#include <linux/io.h> -#include <mach/irqs.h> #ifndef RTC_PORT #define RTC_PORT (x) (0x70 + (x))
Signature · 1 line
1.7.5.4
RFC PATCH 3/10 ARM: mc146818rtc: remove unnecessary include of mach/irqs.h
Quoted 4 lines · Rob Herring
From: Rob Herring <[email protected]>
The include of
mach/irqs.hisn't needed, so remove it. Compiled CMOS rtc driver.
I'm not sure how safe this is - there are some drivers using mc146818rtc.h which get their IRQ via this header file (it's known as RTC_IRQ.) So we need to verify that nothing breaks as a result of that definition going away when this file is included.
It looks like it's just drivers/char/rtc.c, which we don't use anymore on ARM. So this should be safe.
It might be worth adding:
#define RTC_IRQ BUILD_BUG_ON(true)
or something like that, to catch any users of it (even though that'll then cause drivers/char/rtc.c to fail if built on ARM, which it shouldn't be.)
RFC PATCH 4/10 ARM: it8152: explicitly include mach/irqs.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation to make mach/irqs.h optional, directly include mach/irq.h to get IRQ_BOARD_START.
--- arch/arm/include/asm/hardware/it8152.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/include/asm/hardware/it8152.h +3 -0
@@ -9,6 +9,9 @@#ifndef __ASM_HARDWARE_IT8152_H#define __ASM_HARDWARE_IT8152_H + +#include <mach/irqs.h> +extern void __iomem *it8152_base_address;#define IT8152_IO_BASE (it8152_base_address + 0x03e00000)
Signature · 1 line
1.7.5.4
RFC PATCH 4/10 ARM: it8152: explicitly include mach/irqs.h
Quoted 15 lines · Rob Herring
From: Rob Herring <[email protected]>
In preparation to make
mach/irqs.hoptional, directly includemach/irq.hto getIRQ_BOARD_START.Signed-off-by Rob Herring <[email protected]>--- arch/arm/include/asm/hardware/it8152.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/include/asm/hardware/it8152.h +0
-0
arch/arm/include/asm/hardware/it8152.h line 14
Quoted 6 lines
arch/arm/include/asm/hardware/it8152.h +3
-0@@ -9,6 +9,9 @@#ifndef __ASM_HARDWARE_IT8152_H#define __ASM_HARDWARE_IT8152_H + +#include <mach/irqs.h> +
This include is needed for IRQ_BOARD_START which could also be problematic outside a single mach dir. The IT8152 is only used on 1 family of pxa2xx boards. The part and board with it are EOL as well, so we're not going to see new users of this code. Perhaps the it8152 code should just be moved into mach-pxa?
Rob
RFC PATCH 4/10 ARM: it8152: explicitly include mach/irqs.h
Quoted 17 lines · Rob Herring
Quoted 16 lines · Rob Herring
From: Rob Herring <[email protected]>
In preparation to make
mach/irqs.hoptional, directly includemach/irq.hto getIRQ_BOARD_START.Signed-off-by Rob Herring <[email protected]>--- arch/arm/include/asm/hardware/it8152.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/include/asm/hardware/it8152.h +0
-0@@ -9,6 +9,9 @@
Quoted 11 lines
arch/arm/include/asm/hardware/it8152.h line 14
Quoted 5 lines
arch/arm/include/asm/hardware/it8152.h +3
-0#ifndef __ASM_HARDWARE_IT8152_H#define __ASM_HARDWARE_IT8152_H + +#include <mach/irqs.h> +This include is needed for
IRQ_BOARD_STARTwhich could also be problematic outside a single mach dir. The IT8152 is only used on 1 family of pxa2xx boards. The part and board with it are EOL as well, so we're not going to see new users of this code. Perhaps the it8152 code should just be moved into mach-pxa?
No no. Any reason will be good to do the same for other stuff and we really don't want to go back there. If anything it is the needed defines that need to move closer to the driver code not the other way around.
And by the time the EOL'd boards are really getting into the way of cleanups we could do one of two things: simply leave them alone and prevent them from participating into a multi-SOC kernel config. Or add a #error "Do you care about me?" in them (and remove them from any defconfig) and see if anyone notices. If not then we just delete them.
Nicolas
RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
In reply to Rob HerringFrom: Rob Herring <[email protected]>
SH intc has a compile time dependency on NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-time NR_IRQS setting. SH has NR_IRQS set to 512 and shmobile has NR_IRQS set to 1024, so we are using the maximum.
--- drivers/sh/intc/balancing.c | 2 +- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/handle.c | 2 +- drivers/sh/intc/internals.h | 9 +++++++++ drivers/sh/intc/virq.c | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-)
drivers/sh/intc/balancing.c +1 -1
@@ -9,7 +9,7 @@*/ #include "internals.h" -static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];void intc_balancing_enable (unsigned int irq) {
drivers/sh/intc/core.c +1 -1
@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;* - this needs to be at least 2 for 5-bit priorities on 7780 */ static unsigned int default_prio_level =2 ;/* 2 - 16 */ -static unsigned int intc_prio_level[NR_IRQS ];/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS ];/* for now */ unsigned int intc_get_dfl_prio_level (void ) {
drivers/sh/intc/handle.c +1 -1
@@ -13,7 +13,7 @@#include <linux/spinlock.h> #include "internals.h" -static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];static intc_enum __init intc_grp_id (struct intc_desc *desc,intc_enum enum_id)
drivers/sh/intc/internals.h +9 -0
@@ -6,6 +6,15 @@#include <linux/radix-tree.h> #include <linux/device.h> +#define INTC_NR_IRQS 1024 + +#ifndef evt2irq +#define evt2irq (evt) (((evt) >> 5) - 16) +#endif +#ifndef irq2evt +#define irq2evt (irq) (((irq) + 16) << 5) +#endif +#define _INTC_MK (fn, mode, addr_e, addr_d, width, shift) \ ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ ((addr_e) << 16) | ((addr_d << 24)))
drivers/sh/intc/virq.c +1 -1
@@ -17,7 +17,7 @@#include <linux/export.h> #include "internals.h" -static struct intc_map_entry intc_irq_xlate[NR_IRQS ]; +static struct intc_map_entry intc_irq_xlate[INTC_NR_IRQS ];struct intc_virq_list {unsigned int irq;
Signature · 1 line
1.7.5.4
RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
Hi,
2012/1/14 Rob Herring <[email protected]>:
Quoted 63 lines
From: Rob Herring <[email protected]>
SH intc has a compile time dependency on
NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-timeNR_IRQSsetting. SH hasNR_IRQSset to 512 and shmobile hasNR_IRQSset to 1024, so we are using the maximum.Signed-off-by Rob Herring <[email protected]>---
?drivers/sh/intc/balancing.c | ? ?2 +- ?drivers/sh/intc/core.c ? ? ?| ? ?2 +- ?drivers/sh/intc/handle.c ? ?| ? ?2 +- ?drivers/sh/intc/internals.h | ? ?9 +++++++++ ?drivers/sh/intc/virq.c ? ? ?| ? ?2 +-?5 files changed, 13 insertions(+), 4 deletions(-)
drivers/sh/intc/balancing.c +0
-0@@ -9,7 +9,7 @@?*/
?#include "internals.h"drivers/sh/intc/balancing.c +1
-1-static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];?void
intc_balancing_enable(unsigned int irq)
?{drivers/sh/intc/core.c +0
-0@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;?* - this needs to be at least 2 for 5-bit priorities on 7780 ?*/
?static unsigned intdefault_prio_level= 2; ? ?/* 2 - 16 */drivers/sh/intc/core.c +1
-1-static unsigned int intc_prio_level[NR_IRQS]; ?/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS]; ? ? /* for now */?unsigned int
intc_get_dfl_prio_level(void)
?{drivers/sh/intc/handle.c +0
-0@@ -13,7 +13,7 @@?#include <
linux/spinlock.h>
?#include "internals.h"drivers/sh/intc/handle.c +1
-1-static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];?static
intc_enum__initintc_grp_id(struct intc_desc *desc, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?intc_enum enum_id)drivers/sh/intc/internals.h +0
-0@@ -6,6 +6,15 @@?#include <
linux/radix-tree.h>
?#include <linux/device.h>
Quoted 1 line
+#define
INTC_NR_IRQS? 1024
On SH, INTC_NR_IRQS ( NR_IRQS ) is using to by arch/sh/kernel/machvec.c. And, this is defined by arch/sh/include/asm/irq.h.
You need to remove or rename from these.
drivers/sh/intc/internals.h line 17
Quoted 8 lines
drivers/sh/intc/internals.h +8
-0+ +#ifndef evt2irq +#define evt2irq (evt) ? ? ? ? ? ?(((evt) >> 5) - 16) +#endif +#ifndef irq2evt +#define irq2evt (irq) ? ? ? ? ? ?(((irq) + 16) << 5) +#endif +
These are defined in arch/arm/mach-shmobile/include/mach/irqs.h and arch/sh/include/asm/irq.h.
I propose that linux/sh_intc.h defines these.
Best regards,
Nobuhiro
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
Quoted 66 lines · Nobuhiro Iwamatsu
Hi,
2012/1/14 Rob Herring <[email protected]>:
Quoted 63 lines
From: Rob Herring <[email protected]>
SH intc has a compile time dependency on
NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-timeNR_IRQSsetting. SH hasNR_IRQSset to 512 and shmobile hasNR_IRQSset to 1024, so we are using the maximum.Signed-off-by Rob Herring <[email protected]>--- drivers/sh/intc/balancing.c | 2 +- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/handle.c | 2 +- drivers/sh/intc/internals.h | 9 +++++++++ drivers/sh/intc/virq.c | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-)drivers/sh/intc/balancing.c +1
-1@@ -9,7 +9,7 @@*/ #include "internals.h" -static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];void intc_balancing_enable (unsigned int irq) {drivers/sh/intc/core.c +1
-1@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;* - this needs to be at least 2 for 5-bit priorities on 7780 */ static unsigned int default_prio_level =2 ;/* 2 - 16 */ -static unsigned int intc_prio_level[NR_IRQS ];/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS ];/* for now */ unsigned int intc_get_dfl_prio_level (void ) {drivers/sh/intc/handle.c +1
-1@@ -13,7 +13,7 @@#include <linux/spinlock.h> #include "internals.h" -static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];static intc_enum __init intc_grp_id (struct intc_desc *desc,intc_enum enum_id)drivers/sh/intc/internals.h +0
-0@@ -6,6 +6,15 @@#include <linux/radix-tree.h> #include <linux/device.h>
Quoted 6 lines
drivers/sh/intc/internals.h line 9
Quoted 1 line
drivers/sh/intc/internals.h +1
-0+#define INTC_NR_IRQS 1024On SH,
INTC_NR_IRQS(NR_IRQS) is using to byarch/sh/kernel/machvec.c. And, this is defined byarch/sh/include/asm/irq.h.
You need to remove or rename from these.
machvec.c will still pickup NR_IRQS from arch/sh/include/asm/irq.h, so there is no change there. The value here is increased from 512 for SH to 1024, but that should not have any functional impact only array storage space. Where it is used is a bit of a hack as the comment indicates. The only other easy way to fix it I see is with an #ifdef CONFIG_SH or CONFIG_ARM here. I welcome patches if you've got better ideas.
Quoted 12 lines
drivers/sh/intc/internals.h line 17
Quoted 8 lines
drivers/sh/intc/internals.h +8
-0+ +#ifndef evt2irq +#define evt2irq (evt) (((evt) >> 5) - 16) +#endif +#ifndef irq2evt +#define irq2evt (irq) (((irq) + 16) << 5) +#endif +These are defined in
arch/arm/mach-shmobile/include/mach/irqs.handarch/sh/include/asm/irq.h.
Quoted 2 lines
I propose that
linux/sh_intc.hdefines these.
Agreed. I will combine both versions there.
Rob
Quoted 3 lines
Best regards,
Nobuhiro
RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
2012/1/17 Rob Herring <[email protected]>:
Quoted 74 lines · Nobuhiro Iwamatsu
Quoted 66 lines
Hi,
2012/1/14 Rob Herring <[email protected]>:
Quoted 63 lines
From: Rob Herring <[email protected]>
SH intc has a compile time dependency on
NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-timeNR_IRQSsetting. SH hasNR_IRQSset to 512 and shmobile hasNR_IRQSset to 1024, so we are using the maximum.Signed-off-by Rob Herring <[email protected]>---
?drivers/sh/intc/balancing.c | ? ?2 +- ?drivers/sh/intc/core.c ? ? ?| ? ?2 +- ?drivers/sh/intc/handle.c ? ?| ? ?2 +- ?drivers/sh/intc/internals.h | ? ?9 +++++++++ ?drivers/sh/intc/virq.c ? ? ?| ? ?2 +-?5 files changed, 13 insertions(+), 4 deletions(-)
drivers/sh/intc/balancing.c +0
-0@@ -9,7 +9,7 @@?*/
?#include "internals.h"drivers/sh/intc/balancing.c +1
-1-static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];?void
intc_balancing_enable(unsigned int irq)
?{drivers/sh/intc/core.c +0
-0@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;?* - this needs to be at least 2 for 5-bit priorities on 7780 ?*/
?static unsigned intdefault_prio_level= 2; ? ?/* 2 - 16 */drivers/sh/intc/core.c +1
-1-static unsigned int intc_prio_level[NR_IRQS]; ?/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS]; ? ? /* for now */?unsigned int
intc_get_dfl_prio_level(void)
?{drivers/sh/intc/handle.c +0
-0@@ -13,7 +13,7 @@?#include <
linux/spinlock.h>
?#include "internals.h"drivers/sh/intc/handle.c +1
-1-static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];?static
intc_enum__initintc_grp_id(struct intc_desc *desc, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?intc_enum enum_id)drivers/sh/intc/internals.h +0
-0@@ -6,6 +6,15 @@?#include <
linux/radix-tree.h>
?#include <linux/device.h>Quoted 6 lines
Quoted 1 line
+#define
INTC_NR_IRQS? 1024On SH,
INTC_NR_IRQS(NR_IRQS) ?is using to byarch/sh/kernel/machvec.c. And, this is defined byarch/sh/include/asm/irq.h.
You need to remove or rename from these.
Quoted 7 lines
machvec.cwill still pickupNR_IRQSfromarch/sh/include/asm/irq.h, so there is no change there. The value here is increased from 512 for SH to 1024, but that should not have any functional impact only array storage space. Where it is used is a bit of a hack as the comment indicates. The only other easy way to fix it I see is with an #ifdefCONFIG_SHorCONFIG_ARMhere. I welcome patches if you've got better ideas.
I also cared about the problem from which array increases in SH. Since drivers/sh/intc/internals.h is referred to only from intc function, it needs to define INTC_NR_IRQS as other places.
How is it that defines by Kconfig?
I created a patch on your patch. Could you give comment?
Best regards,
Nobuhiro
------
arch/sh/include/asm/irq.h +0 -1
@@ -9,7 +9,6 @@* advised to cap this at the hard limit that they're interested in * through the machvec. */ -#define NR_IRQS 512#define NR_IRQS_LEGACY 8/* Legacy external IRQ0-7 */ /*
arch/sh/kernel/machvec.c +1 -1
@@ -123,5 +123,5 @@ void __init sh_mv_setup(void)mv_set (mem_init);if (!sh_mv.mv_nr_irqs) - sh_mv.mv_nr_irqs =NR_IRQS ; + sh_mv.mv_nr_irqs =CONFIG_SH_NR_IRQS ; }
drivers/sh/intc/Kconfig +6 -0
@@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG between system IRQs and the per-controller id tables. If in doubt, say N. + +config SH_NR_IRQS + int + depends on ARCH_SHMOBILE || SUPERH + default 1024 if ARCH_SHMOBILE + default 512 if SUPERH
drivers/sh/intc/internals.h +1 -1
@@ -6,7 +6,7 @@#include <linux/radix-tree.h> #include <linux/device.h> -#define INTC_NR_IRQS 1024 +#define INTC_NR_IRQS CONFIG_SH_NR_IRQS#ifndef evt2irq#define evt2irq (evt) (((evt) >> 5) - 16)
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
Quoted 137 lines · Nobuhiro Iwamatsu
2012/1/17 Rob Herring <[email protected]>:
Quoted 74 lines · Nobuhiro Iwamatsu
Quoted 66 lines
Hi,
2012/1/14 Rob Herring <[email protected]>:
Quoted 63 lines
From: Rob Herring <[email protected]>
SH intc has a compile time dependency on
NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-timeNR_IRQSsetting. SH hasNR_IRQSset to 512 and shmobile hasNR_IRQSset to 1024, so we are using the maximum.Signed-off-by Rob Herring <[email protected]>--- drivers/sh/intc/balancing.c | 2 +- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/handle.c | 2 +- drivers/sh/intc/internals.h | 9 +++++++++ drivers/sh/intc/virq.c | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-)drivers/sh/intc/balancing.c +1
-1@@ -9,7 +9,7 @@*/ #include "internals.h" -static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];void intc_balancing_enable (unsigned int irq) {drivers/sh/intc/core.c +1
-1@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;* - this needs to be at least 2 for 5-bit priorities on 7780 */ static unsigned int default_prio_level =2 ;/* 2 - 16 */ -static unsigned int intc_prio_level[NR_IRQS ];/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS ];/* for now */ unsigned int intc_get_dfl_prio_level (void ) {drivers/sh/intc/handle.c +1
-1@@ -13,7 +13,7 @@#include <linux/spinlock.h> #include "internals.h" -static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];static intc_enum __init intc_grp_id (struct intc_desc *desc,intc_enum enum_id)drivers/sh/intc/internals.h +0
-0@@ -6,6 +6,15 @@#include <linux/radix-tree.h> #include <linux/device.h> Quoted 6 lines
drivers/sh/intc/internals.h line 9
Quoted 1 line
drivers/sh/intc/internals.h +1
-0+#define INTC_NR_IRQS 1024On SH,
INTC_NR_IRQS(NR_IRQS) is using to byarch/sh/kernel/machvec.c. And, this is defined byarch/sh/include/asm/irq.h.
You need to remove or rename from these.Quoted 7 lines
machvec.cwill still pickupNR_IRQSfromarch/sh/include/asm/irq.h, so there is no change there. The value here is increased from 512 for SH to 1024, but that should not have any functional impact only array storage space. Where it is used is a bit of a hack as the comment indicates. The only other easy way to fix it I see is with an #ifdefCONFIG_SHorCONFIG_ARMhere. I welcome patches if you've got better ideas.I also cared about the problem from which array increases in SH. Since
drivers/sh/intc/internals.his referred to only from intc function, it needs to defineINTC_NR_IRQSas other places.How is it that defines by
Kconfig?
I created a patch on your patch. Could you give comment?Best regards,
Nobuhiro------
arch/sh/include/asm/irq.h +0
-1@@ -9,7 +9,6 @@* advised to cap this at the hard limit that they're interested in * through the machvec. */ -#define NR_IRQS 512#define NR_IRQS_LEGACY 8/* Legacy external IRQ0-7 */ /* arch/sh/kernel/machvec.c +1
-1@@ -123,5 +123,5 @@ void __init sh_mv_setup(void)mv_set (mem_init);if (!sh_mv.mv_nr_irqs) - sh_mv.mv_nr_irqs =NR_IRQS ; + sh_mv.mv_nr_irqs =CONFIG_SH_NR_IRQS ; }drivers/sh/intc/Kconfig +6
-0@@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG between system IRQs and the per-controller id tables. If in doubt, say N. + +config SH_NR_IRQS + int + depends on ARCH_SHMOBILE || SUPERH + default 1024 if ARCH_SHMOBILE + default 512 if SUPERHdrivers/sh/intc/internals.h +0
-0
drivers/sh/intc/internals.h line 12
Quoted 8 lines
drivers/sh/intc/internals.h +1
-1@@ -6,7 +6,7 @@#include <linux/radix-tree.h> #include <linux/device.h> -#define INTC_NR_IRQS 1024 +#define INTC_NR_IRQS CONFIG_SH_NR_IRQS#ifndef evt2irq#define evt2irq (evt) (((evt) >> 5) - 16)
If we went this route I wonder if it would be better for this to be more generic and have CONFIG_NR_IRQS like powerpc. However, I don't see having CONFIG_NR_IRQS as being that useful in the SPARSE_IRQ case. Plus it would be a much more invasive. I think I'll just add this to linux/sh_intc.h:
#ifdef CONFIG_SUPERH
#define INTC_NR_IRQS 512
#else
#define INTC_NR_IRQS 1024
#endif
Rob
RFC PATCH 5/10 sh: intc: remove dependency on NR_IRQS
2012/1/18 Rob Herring <[email protected]>:
Quoted 153 lines · Nobuhiro Iwamatsu
Quoted 142 lines
2012/1/17 Rob Herring <[email protected]>:
Quoted 74 lines · Nobuhiro Iwamatsu
Quoted 66 lines
Hi,
2012/1/14 Rob Herring <[email protected]>:
Quoted 63 lines
From: Rob Herring <[email protected]>
SH intc has a compile time dependency on
NR_IRQS. Make this dependency a local define so that shmobile (and ARM in general) can have run-timeNR_IRQSsetting. SH hasNR_IRQSset to 512 and shmobile hasNR_IRQSset to 1024, so we are using the maximum.Signed-off-by Rob Herring <[email protected]>---
?drivers/sh/intc/balancing.c | ? ?2 +- ?drivers/sh/intc/core.c ? ? ?| ? ?2 +- ?drivers/sh/intc/handle.c ? ?| ? ?2 +- ?drivers/sh/intc/internals.h | ? ?9 +++++++++ ?drivers/sh/intc/virq.c ? ? ?| ? ?2 +-?5 files changed, 13 insertions(+), 4 deletions(-)
drivers/sh/intc/balancing.c +0
-0@@ -9,7 +9,7 @@?*/
?#include "internals.h"drivers/sh/intc/balancing.c +1
-1-static unsigned long dist_handle[NR_IRQS ]; +static unsigned long dist_handle[INTC_NR_IRQS ];?void
intc_balancing_enable(unsigned int irq)
?{drivers/sh/intc/core.c +0
-0@@ -42,7 +42,7 @@ unsigned int nr_intc_controllers;?* - this needs to be at least 2 for 5-bit priorities on 7780 ?*/
?static unsigned intdefault_prio_level= 2; ? ?/* 2 - 16 */drivers/sh/intc/core.c +1
-1-static unsigned int intc_prio_level[NR_IRQS]; ?/* for now */ +static unsigned int intc_prio_level[INTC_NR_IRQS]; ? ? /* for now */?unsigned int
intc_get_dfl_prio_level(void)
?{drivers/sh/intc/handle.c +0
-0@@ -13,7 +13,7 @@?#include <
linux/spinlock.h>
?#include "internals.h"drivers/sh/intc/handle.c +1
-1-static unsigned long ack_handle[NR_IRQS ]; +static unsigned long ack_handle[INTC_NR_IRQS ];?static
intc_enum__initintc_grp_id(struct intc_desc *desc, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?intc_enum enum_id)drivers/sh/intc/internals.h +0
-0@@ -6,6 +6,15 @@?#include <
linux/radix-tree.h>
?#include <linux/device.h>Quoted 6 lines
Quoted 1 line
+#define
INTC_NR_IRQS? 1024On SH,
INTC_NR_IRQS(NR_IRQS) ?is using to byarch/sh/kernel/machvec.c. And, this is defined byarch/sh/include/asm/irq.h.
You need to remove or rename from these.Quoted 7 lines
machvec.cwill still pickupNR_IRQSfromarch/sh/include/asm/irq.h, so there is no change there. The value here is increased from 512 for SH to 1024, but that should not have any functional impact only array storage space. Where it is used is a bit of a hack as the comment indicates. The only other easy way to fix it I see is with an #ifdefCONFIG_SHorCONFIG_ARMhere. I welcome patches if you've got better ideas.I also cared about the problem from which array increases in SH. Since
drivers/sh/intc/internals.his referred to only from intc function, it needs to defineINTC_NR_IRQSas other places.How is it that defines by
Kconfig?
I created a patch on your patch. Could you give comment?Best regards,
? Nobuhiro------
arch/sh/include/asm/irq.h +0
-0@@ -9,7 +9,6 @@? * advised to cap this at the hard limit that they're interested in ? * through the machvec.
? */
-#defineNR_IRQS? ? ? ? ? ? ? ? ? ? ?512
?#defineNR_IRQS_LEGACY? ? ? ? ? ? ? 8 ? ? ? /* Legacy external IRQ0-7 */?/*
arch/sh/kernel/machvec.c +1
-1@@ -123,5 +123,5 @@ void __init sh_mv_setup(void) ? ? ? mv_set(mem_init); ? ? ? if (!sh_mv.mv_nr_irqs) - ? ? ? ? ? ? sh_mv.mv_nr_irqs = NR_IRQS; + ? ? ? ? ? ? sh_mv.mv_nr_irqs = CONFIG_SH_NR_IRQS; ?}drivers/sh/intc/Kconfig +0
-0@@ -33,3 +33,9 @@ config INTC_MAPPING_DEBUG? ? ? ? between system IRQs and the per-controller id tables.
? ? ? ? If in doubt, say N.
drivers/sh/intc/Kconfig +6
-0+ +config SH_NR_IRQS + ? ? int + ? ? depends on ARCH_SHMOBILE || SUPERH + ? ? default 1024 if ARCH_SHMOBILE + ? ? default 512 if SUPERHdrivers/sh/intc/internals.h +0
-0@@ -6,7 +6,7 @@?#include <
linux/radix-tree.h>
?#include <linux/device.h>drivers/sh/intc/internals.h +1
-1-#define INTC_NR_IRQS 1024 +#define INTC_NR_IRQS CONFIG_SH_NR_IRQSQuoted 3 lines
?#ifndef evt2irq
?#define evt2irq(evt) ? ? ? ? ? ?(((evt) >> 5) - 16)If we went this route I wonder if it would be better for this to be more generic and have
CONFIG_NR_IRQSlike powerpc. However, I don't see havingCONFIG_NR_IRQSas being that useful in theSPARSE_IRQcase. Plus it would be a much more invasive. I think I'll just add this tolinux/sh_intc.h:
Quoted 6 lines
#ifdef
CONFIG_SUPERH
#defineINTC_NR_IRQS? 512
#else
#defineINTC_NR_IRQS? 1024
#endif
I think that this is good.
Best regards,
Nobuhiro
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6RFC PATCH 6/10 ARM: mmp: remove NR_IRQS
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove NR_IRQS and add a per machine .nr_irqs setting.
--- arch/arm/mach-mmp/avengers_lite.c | 1 + arch/arm/mach-mmp/include/mach/irqs.h | 2 -- arch/arm/mach-mmp/irq-mmp2.c | 1 + arch/arm/mach-mmp/jasper.c | 1 + arch/arm/mach-mmp/tavorevb.c | 1 + 5 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-mmp/avengers_lite.c +1 -0
@@ -43,6 +43,7 @@ static void __init avengers_lite_init(void)MACHINE_START (AVENGERS_LITE ,"PXA168 Avengers lite Development Platform" ) .map_io = mmp_map_io, + .nr_irqs = IRQ_BOARD_START, .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = avengers_lite_init,
arch/arm/mach-mmp/include/mach/irqs.h +0 -2
@@ -224,6 +224,4 @@#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO) -#define NR_IRQS (IRQ_BOARD_START) -#endif /* __ASM_MACH_IRQS_H */
arch/arm/mach-mmp/irq-mmp2.c +1 -0
@@ -15,6 +15,7 @@#include <linux/irq.h> #include <linux/io.h> +#include <mach/irqs.h> #include <mach/regs-icu.h> #include <mach/mmp2.h>
arch/arm/mach-mmp/jasper.c +1 -0
@@ -19,6 +19,7 @@#include <linux/mfd/max8925.h> #include <linux/interrupt.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/addr-map.h>
arch/arm/mach-mmp/tavorevb.c +1 -0
@@ -102,6 +102,7 @@ static void __init tavorevb_init(void)MACHINE_START (TAVOREVB ,"PXA910 Evaluation Board (aka TavorEVB)" ) .map_io = mmp_map_io, + .nr_irqs = IRQ_BOARD_START, .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = tavorevb_init,
Signature · 1 line
1.7.5.4
RFC PATCH 6/10 ARM: mmp: remove NR_IRQS
Quoted 5 lines · Rob Herring
From: Rob Herring <[email protected]>
Remove
NR_IRQSand add a per machine .nr_irqs setting.Signed-off-by Rob Herring <[email protected]>
While it is true that NR_IRQS was defined in terms of IRQ_BOARD_START down in the confines of mach/irqs.h, I don't think IRQ_BOARD_START is such a good macro name to spread around for what it should mean. Perhaps MMP_MAX_IRQS or the like would be more self describing.
Quoted 70 lines
--- arch/arm/mach-mmp/avengers_lite.c | 1 + arch/arm/mach-mmp/include/mach/irqs.h | 2 -- arch/arm/mach-mmp/irq-mmp2.c | 1 + arch/arm/mach-mmp/jasper.c | 1 + arch/arm/mach-mmp/tavorevb.c | 1 + 5 files changed, 4 insertions(+), 2 deletions(-)arch/arm/mach-mmp/avengers_lite.c +1
-0@@ -43,6 +43,7 @@ static void __init avengers_lite_init(void)MACHINE_START (AVENGERS_LITE ,"PXA168 Avengers lite Development Platform" ) .map_io = mmp_map_io, + .nr_irqs = IRQ_BOARD_START, .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = avengers_lite_init,arch/arm/mach-mmp/include/mach/irqs.h +0
-2@@ -224,6 +224,4 @@#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO) -#define NR_IRQS (IRQ_BOARD_START) -#endif /* __ASM_MACH_IRQS_H */ arch/arm/mach-mmp/irq-mmp2.c +1
-0@@ -15,6 +15,7 @@#include <linux/irq.h> #include <linux/io.h> +#include <mach/irqs.h> #include <mach/regs-icu.h> #include <mach/mmp2.h> arch/arm/mach-mmp/jasper.c +1
-0@@ -19,6 +19,7 @@#include <linux/mfd/max8925.h> #include <linux/interrupt.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <mach/addr-map.h> arch/arm/mach-mmp/tavorevb.c +1
-0@@ -102,6 +102,7 @@ static void __init tavorevb_init(void)MACHINE_START (TAVOREVB ,"PXA910 Evaluation Board (aka TavorEVB)" ) .map_io = mmp_map_io, + .nr_irqs = IRQ_BOARD_START, .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = tavorevb_init,Signature · 1 line
1.7.5.4
RFC PATCH 7/10 ARM: pxa: remove NR_IRQS
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove NR_IRQS and add a per machine .nr_irqs setting.
--- arch/arm/mach-pxa/capc7117.c | 1 + arch/arm/mach-pxa/cm-x300.c | 1 + arch/arm/mach-pxa/colibri-pxa270.c | 2 ++ arch/arm/mach-pxa/colibri-pxa300.c | 1 + arch/arm/mach-pxa/colibri-pxa320.c | 1 + arch/arm/mach-pxa/corgi.c | 3 +++ arch/arm/mach-pxa/csb726.c | 1 + arch/arm/mach-pxa/devices.c | 1 + arch/arm/mach-pxa/em-x270.c | 2 ++ arch/arm/mach-pxa/gumstix.c | 1 + arch/arm/mach-pxa/h5000.c | 1 + arch/arm/mach-pxa/himalaya.c | 1 + arch/arm/mach-pxa/icontrol.c | 1 + arch/arm/mach-pxa/idp.c | 1 + arch/arm/mach-pxa/include/mach/irqs.h | 2 +- arch/arm/mach-pxa/mioa701.c | 1 + arch/arm/mach-pxa/mp900.c | 1 + arch/arm/mach-pxa/palmld.c | 1 + arch/arm/mach-pxa/palmt5.c | 1 + arch/arm/mach-pxa/palmtc.c | 1 + arch/arm/mach-pxa/palmte2.c | 1 + arch/arm/mach-pxa/palmtreo.c | 2 ++ arch/arm/mach-pxa/palmtx.c | 1 + arch/arm/mach-pxa/palmz72.c | 1 + arch/arm/mach-pxa/raumfeld.c | 3 +++ arch/arm/mach-pxa/saar.c | 1 + arch/arm/mach-pxa/spitz.c | 3 +++ arch/arm/mach-pxa/stargate2.c | 1 + arch/arm/mach-pxa/tavorevb.c | 1 + arch/arm/mach-pxa/time.c | 1 + arch/arm/mach-pxa/trizeps4.c | 2 ++ arch/arm/mach-pxa/viper.c | 1 + arch/arm/mach-pxa/vpac270.c | 1 + arch/arm/mach-pxa/xcep.c | 1 + arch/arm/mach-pxa/z2.c | 1 + 35 files changed, 45 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/capc7117.c +1 -0
@@ -150,6 +150,7 @@ MACHINE_START(CAPC7117, "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM") .atag_offset = 0x100, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/cm-x300.c +1 -0
@@ -853,6 +853,7 @@ static void __init cm_x300_fixup(struct tag *tags, char **cmdline,MACHINE_START (CM_X300 ,"CM-X300 module" ) .atag_offset = 0x100, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/colibri-pxa270.c +2 -0
@@ -310,6 +310,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270") .atag_offset = 0x100, .init_machine = colibri_pxa270_init, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
@@ -320,6 +321,7 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC") .atag_offset = 0x100, .init_machine = colibri_pxa270_income_init, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/colibri-pxa300.c +1 -0
@@ -186,6 +186,7 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") .atag_offset = 0x100, .init_machine = colibri_pxa300_init, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/colibri-pxa320.c +1 -0
@@ -256,6 +256,7 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320") .atag_offset = 0x100, .init_machine = colibri_pxa320_init, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/corgi.c +3 -0
@@ -721,6 +721,7 @@ static void __init fixup_corgi(struct tag *tags, char **cmdline,MACHINE_START (CORGI ,"SHARP Corgi" ) .fixup = fixup_corgi, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .init_machine = corgi_init,
@@ -733,6 +734,7 @@ MACHINE_ENDMACHINE_START (SHEPHERD ,"SHARP Shepherd" ) .fixup = fixup_corgi, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .init_machine = corgi_init,
@@ -745,6 +747,7 @@ MACHINE_ENDMACHINE_START (HUSKY ,"SHARP Husky" ) .fixup = fixup_corgi, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .init_machine = corgi_init,
arch/arm/mach-pxa/csb726.c +1 -0
@@ -274,6 +274,7 @@ static void __init csb726_init(void)MACHINE_START (CSB726 ,"Cogent CSB726" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .init_machine = csb726_init,
arch/arm/mach-pxa/devices.c +1 -0
@@ -12,6 +12,7 @@#include <mach/pxafb.h> #include <mach/mmc.h> #include <mach/irda.h> +#include <mach/irqs.h> #include <mach/ohci.h> #include <plat/pxa27x_keypad.h> #include <mach/camera.h>
arch/arm/mach-pxa/em-x270.c +2 -0
@@ -1301,6 +1301,7 @@ static void __init em_x270_init(void)MACHINE_START (EM_X270 ,"Compulab EM-X270" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
@@ -1311,6 +1312,7 @@ MACHINE_ENDMACHINE_START (EXEDA ,"Compulab eXeda" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/gumstix.c +1 -0
@@ -235,6 +235,7 @@ static void __init gumstix_init(void)MACHINE_START (GUMSTIX ,"Gumstix" ) .atag_offset = 0x100, /* match u-boot bi_boot_params */ .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/h5000.c +1 -0
@@ -205,6 +205,7 @@ static void __init h5000_init(void)MACHINE_START (H5400 ,"HP iPAQ H5000" ) .atag_offset = 0x100, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/himalaya.c +1 -0
@@ -160,6 +160,7 @@ static void __init himalaya_init(void)MACHINE_START (HIMALAYA ,"HTC Himalaya" ) .atag_offset = 0x100, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .init_machine = himalaya_init,
arch/arm/mach-pxa/icontrol.c +1 -0
@@ -193,6 +193,7 @@ static void __init icontrol_init(void)MACHINE_START (ICONTROL ,"iControl/SafeTcam boards using Embedian MXM-8x10 CoM" ) .atag_offset = 0x100, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/idp.c +1 -0
@@ -195,6 +195,7 @@ static void __init idp_map_io(void)MACHINE_START (PXA_IDP ,"Vibren PXA255 IDP" )/* Maintainer: Vibren Technologies */ .map_io = idp_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/include/mach/irqs.h +1 -1
@@ -100,7 +100,7 @@*/ #define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_NR_BUILTIN_GPIO) -#define NR_IRQS (IRQ_BOARD_START) +#define PXA_NR_IRQS (IRQ_BOARD_START)#ifndef __ASSEMBLY__struct irq_data ;
arch/arm/mach-pxa/mioa701.c +1 -0
@@ -758,6 +758,7 @@ MACHINE_START(MIOA701, "MIO A701") .atag_offset = 0x100, .restart_mode = 's', .map_io = &pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = &pxa27x_init_irq, .handle_irq = &pxa27x_handle_irq, .init_machine = mioa701_machine_init,
arch/arm/mach-pxa/mp900.c +1 -0
@@ -95,6 +95,7 @@ MACHINE_START(NEC_MP900, "MobilePro900/C") .atag_offset = 0x220100, .timer = &pxa_timer, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .init_machine = mp900c_init,
arch/arm/mach-pxa/palmld.c +1 -0
@@ -344,6 +344,7 @@ static void __init palmld_init(void)MACHINE_START (PALMLD ,"Palm LifeDrive" ) .atag_offset = 0x100, .map_io = palmld_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmt5.c +1 -0
@@ -205,6 +205,7 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5") .atag_offset = 0x100, .map_io = pxa27x_map_io, .reserve = palmt5_reserve, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmtc.c +1 -0
@@ -539,6 +539,7 @@ static void __init palmtc_init(void)MACHINE_START (PALMTC ,"Palm Tungsten|C" ) .atag_offset = 0x100, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmte2.c +1 -0
@@ -358,6 +358,7 @@ static void __init palmte2_init(void)MACHINE_START (PALMTE2 ,"Palm Tungsten|E2" ) .atag_offset = 0x100, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmtreo.c +2 -0
@@ -448,6 +448,7 @@ MACHINE_START(TREO680, "Palm Treo 680") .atag_offset = 0x100, .map_io = pxa27x_map_io, .reserve = treo_reserve, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
@@ -461,6 +462,7 @@ MACHINE_START(CENTRO, "Palm Centro 685") .atag_offset = 0x100, .map_io = pxa27x_map_io, .reserve = treo_reserve, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmtx.c +1 -0
@@ -366,6 +366,7 @@ static void __init palmtx_init(void)MACHINE_START (PALMTX ,"Palm T|X" ) .atag_offset = 0x100, .map_io = palmtx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/palmz72.c +1 -0
@@ -401,6 +401,7 @@ static void __init palmz72_init(void)MACHINE_START (PALMZ72 ,"Palm Zire72" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/raumfeld.c +3 -0
@@ -1090,6 +1090,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller") .atag_offset = 0x100, .init_machine = raumfeld_controller_init, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
@@ -1102,6 +1103,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector") .atag_offset = 0x100, .init_machine = raumfeld_connector_init, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
@@ -1114,6 +1116,7 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker") .atag_offset = 0x100, .init_machine = raumfeld_speaker_init, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/saar.c +1 -0
@@ -598,6 +598,7 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")/* Maintainer: Eric Miao <[email protected]> */ .atag_offset = 0x100, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/spitz.c +3 -0
@@ -984,6 +984,7 @@ MACHINE_START(SPITZ, "SHARP Spitz") .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .init_machine = spitz_init,
@@ -997,6 +998,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi") .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .init_machine = spitz_init,
@@ -1010,6 +1012,7 @@ MACHINE_START(AKITA, "SHARP Akita") .restart_mode = 'g', .fixup = spitz_fixup, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .init_machine = spitz_init,
arch/arm/mach-pxa/stargate2.c +1 -0
@@ -1000,6 +1000,7 @@ static void __init stargate2_init(void)#ifdef CONFIG_MACH_INTELMOTE2 MACHINE_START (INTELMOTE2 ,"IMOTE 2" ) .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/tavorevb.c +1 -0
@@ -491,6 +491,7 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")/* Maintainer: Eric Miao <[email protected]> */ .atag_offset = 0x100, .map_io = pxa3xx_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa3xx_init_irq, .handle_irq = pxa3xx_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/time.c +1 -0
@@ -22,6 +22,7 @@#include <asm/mach/time.h> #include <asm/sched_clock.h> #include <mach/regs-ost.h> +#include <mach/irqs.h> /* * This is PXA's sched_clock implementation. This has a resolution
arch/arm/mach-pxa/trizeps4.c +2 -0
@@ -558,6 +558,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module") .atag_offset = 0x100, .init_machine = trizeps4_init, .map_io = trizeps4_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
@@ -569,6 +570,7 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module") .atag_offset = 0x100, .init_machine = trizeps4_init, .map_io = trizeps4_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/viper.c +1 -0
@@ -994,6 +994,7 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")/* Maintainer: Marc Zyngier <[email protected]> */ .atag_offset = 0x100, .map_io = viper_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = viper_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/vpac270.c +1 -0
@@ -718,6 +718,7 @@ static void __init vpac270_init(void)MACHINE_START (VPAC270 ,"Voipac PXA270" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/xcep.c +1 -0
@@ -182,6 +182,7 @@ MACHINE_START(XCEP, "Iskratel XCEP") .atag_offset = 0x100, .init_machine = xcep_init, .map_io = pxa25x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa25x_init_irq, .handle_irq = pxa25x_handle_irq, .timer = &pxa_timer,
arch/arm/mach-pxa/z2.c +1 -0
@@ -721,6 +721,7 @@ static void __init z2_init(void)MACHINE_START (ZIPIT2 ,"Zipit Z2" ) .atag_offset = 0x100, .map_io = pxa27x_map_io, + .nr_irqs = PXA_NR_IRQS, .init_irq = pxa27x_init_irq, .handle_irq = pxa27x_handle_irq, .timer = &pxa_timer,
Signature · 1 line
1.7.5.4
RFC PATCH 8/10 ARM: shmobile: remove NR_IRQS
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove NR_IRQS and explicitly include mach/irqs.h as needed. shmobile properly allocates irq_descs for each irqchip, so setting .nr_irqs for each machine is not needed.
--- arch/arm/mach-shmobile/board-g3evm.c | 1 + arch/arm/mach-shmobile/board-g4evm.c | 1 + arch/arm/mach-shmobile/board-kota2.c | 1 + arch/arm/mach-shmobile/board-mackerel.c | 1 + arch/arm/mach-shmobile/include/mach/irqs.h | 2 -- arch/arm/mach-shmobile/intc-sh7367.c | 1 + arch/arm/mach-shmobile/intc-sh7372.c | 1 + arch/arm/mach-shmobile/intc-sh7377.c | 1 + arch/arm/mach-shmobile/intc-sh73a0.c | 1 + arch/arm/mach-shmobile/setup-sh7367.c | 1 + arch/arm/mach-shmobile/setup-sh7372.c | 1 + arch/arm/mach-shmobile/setup-sh7377.c | 1 + arch/arm/mach-shmobile/setup-sh73a0.c | 1 + 13 files changed, 12 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/board-g3evm.c +1 -0
@@ -33,6 +33,7 @@#include <linux/input.h> #include <linux/input/sh_keysc.h> #include <linux/dma-mapping.h> +#include <mach/irqs.h> #include <mach/sh7367.h> #include <mach/common.h> #include <asm/mach-types.h>
arch/arm/mach-shmobile/board-g4evm.c +1 -0
@@ -34,6 +34,7 @@#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/gpio.h> #include <linux/dma-mapping.h> +#include <mach/irqs.h> #include <mach/sh7377.h> #include <mach/common.h> #include <asm/mach-types.h>
arch/arm/mach-shmobile/board-kota2.c +1 -0
@@ -39,6 +39,7 @@#include <linux/mfd/tmio.h> #include <linux/mmc/sh_mobile_sdhi.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <mach/sh73a0.h> #include <mach/common.h> #include <asm/mach-types.h>
arch/arm/mach-shmobile/board-mackerel.c +1 -0
@@ -55,6 +55,7 @@#include <sound/sh_fsi.h> #include <mach/common.h> +#include <mach/irqs.h> #include <mach/sh7372.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/include/mach/irqs.h +0 -2
@@ -1,8 +1,6 @@#ifndef __ASM_MACH_IRQS_H#define __ASM_MACH_IRQS_H -#define NR_IRQS 1024 -/* GIC */ #define gic_spi (nr) ((nr) + 32)
arch/arm/mach-shmobile/intc-sh7367.c +1 -0
@@ -23,6 +23,7 @@#include <linux/io.h> #include <linux/sh_intc.h> #include <mach/intc.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/intc-sh7372.c +1 -0
@@ -23,6 +23,7 @@#include <linux/io.h> #include <linux/sh_intc.h> #include <mach/intc.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/intc-sh7377.c +1 -0
@@ -23,6 +23,7 @@#include <linux/io.h> #include <linux/sh_intc.h> #include <mach/intc.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/intc-sh73a0.c +1 -0
@@ -23,6 +23,7 @@#include <linux/io.h> #include <linux/sh_intc.h> #include <mach/intc.h> +#include <mach/irqs.h> #include <mach/sh73a0.h> #include <asm/hardware/gic.h> #include <asm/mach-types.h>
arch/arm/mach-shmobile/setup-sh7367.c +1 -0
@@ -29,6 +29,7 @@#include <linux/serial_sci.h> #include <linux/sh_timer.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/setup-sh7372.c +1 -0
@@ -32,6 +32,7 @@#include <linux/sh_timer.h> #include <linux/pm_domain.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <mach/sh7372.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/setup-sh7377.c +1 -0
@@ -30,6 +30,7 @@#include <linux/sh_intc.h> #include <linux/sh_timer.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-shmobile/setup-sh73a0.c +1 -0
@@ -31,6 +31,7 @@#include <linux/sh_intc.h> #include <linux/sh_timer.h> #include <mach/hardware.h> +#include <mach/irqs.h> #include <mach/sh73a0.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
Signature · 1 line
1.7.5.4
RFC PATCH 9/10 ARM: only include mach/irqs.h for !SPARSE_IRQ
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Make mach/irqs.h optional for SPARSE_IRQ. With this change irqs.h can be removed by converting platforms over to sparse irq.
This intentionally breaks platforms that enable SPARSE_IRQ.
--- arch/arm/include/asm/irq.h | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/include/asm/irq.h +6 -2
@@ -1,14 +1,18 @@#ifndef __ASM_ARM_IRQ_H#define __ASM_ARM_IRQ_H +#define NR_IRQS_LEGACY 16 + +#ifndef CONFIG_SPARSE_IRQ #include <mach/irqs.h> +#else +#define NR_IRQS NR_IRQS_LEGACY +#endif #ifndef irq_canonicalize#define irq_canonicalize (i) (i)#endif -#define NR_IRQS_LEGACY 16 -/* * Use this value to indicate lack of interrupt * capability
Signature · 1 line
1.7.5.4
RFC PATCH 10/10 ARM: highbank: select SPARSE_IRQ and remove irqs.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
irqs.h is optional now for SPARSE_IRQ, so select it and remove mach/irqs.h from highbank.
--- arch/arm/Kconfig | 1 + arch/arm/mach-highbank/highbank.c | 1 - arch/arm/mach-highbank/include/mach/irqs.h | 6 ------ 3 files changed, 1 insertions(+), 7 deletions(-) delete mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
arch/arm/Kconfig +1 -0
@@ -350,6 +350,7 @@ config ARCH_HIGHBANK select GENERIC_CLOCKEVENTS select HAVE_ARM_SCU select HAVE_SMP + select SPARSE_IRQ select USE_OF help Support for the Calxeda Highbank SoC based boards.
arch/arm/mach-highbank/highbank.c +0 -1
@@ -34,7 +34,6 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/time.h> -#include <mach/irqs.h> #include "core.h" #include "sysregs.h"
arch/arm/mach-highbank/include/mach/irqs.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef __MACH_IRQS_H -#define __MACH_IRQS_H - -#define NR_IRQS 192 - -#endif
Signature · 1 line
1.7.5.4
cover Make mach/irqs.h optional
In reply to Rob HerringQuoted 11 lines · Rob Herring
From: Rob Herring <[email protected]>
This series removes the include of
mach/irqs.hfromasm/irq.hwhenSPARSE_IRQis selected. Platforms which selectSPARSE_IRQhave been updated.This breaks platforms where
SPARSE_IRQis user selectable. This is on purpose so thatSPARSE_IRQgets properly supported. We could pushHAVE_SPARSE_IRQoption down to the platforms that select it if that is preferred. But as recent experience has shown, perhaps breaking platforms is the only way to get some platforms updated.
Nice one Rob! Patch below to remove irqs.h for picoxcell too if you could add that one to your series.
Jamie
8<---
Quoted 1 line
From
2d07b017bb06be86bd01686f98c699f1eff0ac10Mon Sep 17 00:00:00 2001
From: Jamie Iles <[email protected]>
Date: Fri, 13 Jan 2012 17:40:05 +0000
Subject: [PATCH] ARM: picoxcell: remove mach/irqs.h
picoxcell uses SPARSE_IRQ which means we don't need a mach/irqs.h anymore so kill it off.
--- arch/arm/mach-picoxcell/include/mach/irqs.h | 20 -------------------- 1 files changed, 0 insertions(+), 20 deletions(-) delete mode 100644 arch/arm/mach-picoxcell/include/mach/irqs.h
arch/arm/mach-picoxcell/include/mach/irqs.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* Copyright (c) 2011 Picochip Ltd., Jamie Iles -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -*/ -#ifndef __MACH_IRQS_H -#define __MACH_IRQS_H - -/* We dynamically allocate our irq_desc's. */ -#define NR_IRQS 0 - -#endif /* __MACH_IRQS_H */
Signature · 1 line
1.7.5.4