diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-05-21 12:54:01 +0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-05-21 12:54:01 +0400 |
commit | 63dc02bde6af1e41d28ebc3774c5f094f362e8c3 (patch) | |
tree | 7978dcdc298421729ea75be54aa86b22b5751948 | |
parent | 7f47c7189b3e8f19a589f77a3ad169d7b691b582 (diff) | |
download | linux-63dc02bde6af1e41d28ebc3774c5f094f362e8c3.tar.xz |
sh: Kill off machvec IRQ hinting.
Everything is using sparseirq these days, so we have no need to
arbitrarily size nr_irqs ahead of time. The legacy IRQ pre-allocation
likewise has no meaning for us, so that's killed off too. We now depend
on nr_irqs expansion by the generic hardirq layer instead.
It's also worth noting that the majority of boards had completely bogus
values for their nr_irqs relative to their CPU and configurations, so
this ends up correcting behaviour for quite a few platforms.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/boards/board-edosk7705.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/board-edosk7760.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/board-polaris.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/board-secureedge5410.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-cayman/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-hp6xx/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-lboxre2/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-microdev/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-sdk7780/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/770x/setup.c | 11 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7721/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7751/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7780/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/board-se7619.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-sh03/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/boards/mach-sh7763rdp/setup.c | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/irq.h | 13 | ||||
-rw-r--r-- | arch/sh/include/asm/machvec.h | 1 | ||||
-rw-r--r-- | arch/sh/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/machvec.c | 3 |
22 files changed, 12 insertions, 40 deletions
diff --git a/arch/sh/boards/board-edosk7705.c b/arch/sh/boards/board-edosk7705.c index 0a531a1f6e23..5e24c17bbdad 100644 --- a/arch/sh/boards/board-edosk7705.c +++ b/arch/sh/boards/board-edosk7705.c @@ -74,6 +74,5 @@ device_initcall(init_edosk7705_devices); */ static struct sh_machine_vector mv_edosk7705 __initmv = { .mv_name = "EDOSK7705", - .mv_nr_irqs = 80, .mv_init_irq = sh_edosk7705_init_irq, }; diff --git a/arch/sh/boards/board-edosk7760.c b/arch/sh/boards/board-edosk7760.c index d4871d274fb9..bab5b9513904 100644 --- a/arch/sh/boards/board-edosk7760.c +++ b/arch/sh/boards/board-edosk7760.c @@ -188,5 +188,4 @@ device_initcall(init_edosk7760_devices); */ struct sh_machine_vector mv_edosk7760 __initmv = { .mv_name = "EDOSK7760", - .mv_nr_irqs = 128, }; diff --git a/arch/sh/boards/board-polaris.c b/arch/sh/boards/board-polaris.c index 594866356c24..37d03c097ae9 100644 --- a/arch/sh/boards/board-polaris.c +++ b/arch/sh/boards/board-polaris.c @@ -141,6 +141,5 @@ static void __init init_polaris_irq(void) static struct sh_machine_vector mv_polaris __initmv = { .mv_name = "Polaris", - .mv_nr_irqs = 61, .mv_init_irq = init_polaris_irq, }; diff --git a/arch/sh/boards/board-secureedge5410.c b/arch/sh/boards/board-secureedge5410.c index 03820c3c93d4..98b36205aa7b 100644 --- a/arch/sh/boards/board-secureedge5410.c +++ b/arch/sh/boards/board-secureedge5410.c @@ -71,6 +71,5 @@ static void __init init_snapgear_IRQ(void) */ static struct sh_machine_vector mv_snapgear __initmv = { .mv_name = "SnapGear SecureEdge5410", - .mv_nr_irqs = 72, .mv_init_irq = init_snapgear_IRQ, }; diff --git a/arch/sh/boards/mach-cayman/setup.c b/arch/sh/boards/mach-cayman/setup.c index e89e8e122a26..340fd40b381d 100644 --- a/arch/sh/boards/mach-cayman/setup.c +++ b/arch/sh/boards/mach-cayman/setup.c @@ -181,7 +181,6 @@ extern void init_cayman_irq(void); static struct sh_machine_vector mv_cayman __initmv = { .mv_name = "Hitachi Cayman", - .mv_nr_irqs = 64, .mv_ioport_map = cayman_ioport_map, .mv_init_irq = init_cayman_irq, }; diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c index db34cad1b76c..05797b33f68e 100644 --- a/arch/sh/boards/mach-hp6xx/setup.c +++ b/arch/sh/boards/mach-hp6xx/setup.c @@ -169,8 +169,6 @@ device_initcall(hp6xx_devices_setup); static struct sh_machine_vector mv_hp6xx __initmv = { .mv_name = "hp6xx", .mv_setup = hp6xx_setup, - /* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */ - .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6, /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ .mv_init_irq = hp6xx_init_irq, }; diff --git a/arch/sh/boards/mach-lboxre2/setup.c b/arch/sh/boards/mach-lboxre2/setup.c index 79b4e0d77b71..6660622aa457 100644 --- a/arch/sh/boards/mach-lboxre2/setup.c +++ b/arch/sh/boards/mach-lboxre2/setup.c @@ -79,6 +79,5 @@ device_initcall(lboxre2_devices_setup); */ static struct sh_machine_vector mv_lboxre2 __initmv = { .mv_name = "L-BOX RE2", - .mv_nr_irqs = 72, .mv_init_irq = init_lboxre2_IRQ, }; diff --git a/arch/sh/boards/mach-microdev/setup.c b/arch/sh/boards/mach-microdev/setup.c index d8a747291e03..6c66ee4d842b 100644 --- a/arch/sh/boards/mach-microdev/setup.c +++ b/arch/sh/boards/mach-microdev/setup.c @@ -194,7 +194,6 @@ device_initcall(microdev_devices_setup); */ static struct sh_machine_vector mv_sh4202_microdev __initmv = { .mv_name = "SH4-202 MicroDev", - .mv_nr_irqs = 72, .mv_ioport_map = microdev_ioport_map, .mv_init_irq = init_microdev_irq, }; diff --git a/arch/sh/boards/mach-sdk7780/setup.c b/arch/sh/boards/mach-sdk7780/setup.c index 4da38db4b5fe..2241659c3299 100644 --- a/arch/sh/boards/mach-sdk7780/setup.c +++ b/arch/sh/boards/mach-sdk7780/setup.c @@ -94,7 +94,6 @@ static void __init sdk7780_setup(char **cmdline_p) static struct sh_machine_vector mv_se7780 __initmv = { .mv_name = "Renesas SDK7780-R3" , .mv_setup = sdk7780_setup, - .mv_nr_irqs = 111, .mv_init_irq = init_sdk7780_IRQ, }; diff --git a/arch/sh/boards/mach-se/7206/setup.c b/arch/sh/boards/mach-se/7206/setup.c index 8ab8330e3fd1..68883ec95682 100644 --- a/arch/sh/boards/mach-se/7206/setup.c +++ b/arch/sh/boards/mach-se/7206/setup.c @@ -90,7 +90,6 @@ static int se7206_mode_pins(void) static struct sh_machine_vector mv_se __initmv = { .mv_name = "SolutionEngine", - .mv_nr_irqs = 256, .mv_init_irq = init_se7206_IRQ, .mv_mode_pins = se7206_mode_pins, }; diff --git a/arch/sh/boards/mach-se/770x/setup.c b/arch/sh/boards/mach-se/770x/setup.c index 31330c65c0ce..9759d6ba7ffb 100644 --- a/arch/sh/boards/mach-se/770x/setup.c +++ b/arch/sh/boards/mach-se/770x/setup.c @@ -184,16 +184,5 @@ device_initcall(se_devices_setup); static struct sh_machine_vector mv_se __initmv = { .mv_name = "SolutionEngine", .mv_setup = smsc_setup, -#if defined(CONFIG_CPU_SH4) - .mv_nr_irqs = 48, -#elif defined(CONFIG_CPU_SUBTYPE_SH7708) - .mv_nr_irqs = 32, -#elif defined(CONFIG_CPU_SUBTYPE_SH7709) - .mv_nr_irqs = 61, -#elif defined(CONFIG_CPU_SUBTYPE_SH7705) - .mv_nr_irqs = 86, -#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) - .mv_nr_irqs = 104, -#endif .mv_init_irq = init_se_IRQ, }; diff --git a/arch/sh/boards/mach-se/7721/setup.c b/arch/sh/boards/mach-se/7721/setup.c index 7416ad7ee53a..a0b3dba34ebf 100644 --- a/arch/sh/boards/mach-se/7721/setup.c +++ b/arch/sh/boards/mach-se/7721/setup.c @@ -92,6 +92,5 @@ static void __init se7721_setup(char **cmdline_p) struct sh_machine_vector mv_se7721 __initmv = { .mv_name = "Solution Engine 7721", .mv_setup = se7721_setup, - .mv_nr_irqs = 109, .mv_init_irq = init_se7721_IRQ, }; diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 479cdf876fda..dd931e36daf8 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -929,5 +929,4 @@ device_initcall(devices_setup); static struct sh_machine_vector mv_ms7724se __initmv = { .mv_name = "ms7724se", .mv_init_irq = init_se7724_IRQ, - .mv_nr_irqs = SE7724_FPGA_IRQ_BASE + SE7724_FPGA_IRQ_NR, }; diff --git a/arch/sh/boards/mach-se/7751/setup.c b/arch/sh/boards/mach-se/7751/setup.c index 4ed60c5e221f..820f4e7ba0d2 100644 --- a/arch/sh/boards/mach-se/7751/setup.c +++ b/arch/sh/boards/mach-se/7751/setup.c @@ -55,6 +55,5 @@ device_initcall(se7751_devices_setup); */ static struct sh_machine_vector mv_7751se __initmv = { .mv_name = "7751 SolutionEngine", - .mv_nr_irqs = 72, .mv_init_irq = init_7751se_IRQ, }; diff --git a/arch/sh/boards/mach-se/7780/setup.c b/arch/sh/boards/mach-se/7780/setup.c index 6f7c207138e1..ae5a1d84fdf8 100644 --- a/arch/sh/boards/mach-se/7780/setup.c +++ b/arch/sh/boards/mach-se/7780/setup.c @@ -110,6 +110,5 @@ static void __init se7780_setup(char **cmdline_p) static struct sh_machine_vector mv_se7780 __initmv = { .mv_name = "Solution Engine 7780" , .mv_setup = se7780_setup , - .mv_nr_irqs = 111 , .mv_init_irq = init_se7780_IRQ, }; diff --git a/arch/sh/boards/mach-se/board-se7619.c b/arch/sh/boards/mach-se/board-se7619.c index 82b6d4a5dc02..958bcd7aacc5 100644 --- a/arch/sh/boards/mach-se/board-se7619.c +++ b/arch/sh/boards/mach-se/board-se7619.c @@ -22,6 +22,5 @@ static int se7619_mode_pins(void) static struct sh_machine_vector mv_se __initmv = { .mv_name = "SolutionEngine", - .mv_nr_irqs = 108, .mv_mode_pins = se7619_mode_pins, }; diff --git a/arch/sh/boards/mach-sh03/setup.c b/arch/sh/boards/mach-sh03/setup.c index d4f79b2a6514..f582dab59343 100644 --- a/arch/sh/boards/mach-sh03/setup.c +++ b/arch/sh/boards/mach-sh03/setup.c @@ -101,6 +101,5 @@ device_initcall(sh03_devices_setup); static struct sh_machine_vector mv_sh03 __initmv = { .mv_name = "Interface (CTP/PCI-SH03)", .mv_setup = sh03_setup, - .mv_nr_irqs = 48, .mv_init_irq = init_sh03_IRQ, }; diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index 36e8b88cd04e..b7c75298dfb5 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c @@ -214,6 +214,5 @@ static void __init sh7763rdp_setup(char **cmdline_p) static struct sh_machine_vector mv_sh7763rdp __initmv = { .mv_name = "sh7763drp", .mv_setup = sh7763rdp_setup, - .mv_nr_irqs = 112, .mv_init_irq = init_sh7763rdp_IRQ, }; diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index 2a62017eb275..0e4f532e4737 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h @@ -5,12 +5,15 @@ #include <asm/machvec.h> /* - * A sane default based on a reasonable vector table size, platforms are - * advised to cap this at the hard limit that they're interested in - * through the machvec. + * Only legacy non-sparseirq platforms have to set a reasonably sane + * value here. sparseirq platforms allocate their irq_descs on the fly, + * so will expand automatically based on the number of registered IRQs. */ -#define NR_IRQS 512 -#define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */ +#ifdef CONFIG_SPARSE_IRQ +# define NR_IRQS 8 +#else +# define NR_IRQS 512 +#endif /* * This is a special IRQ number for indicating that no IRQ has been diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index 57c5c3d0f39f..eb9c20d971dd 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h @@ -17,7 +17,6 @@ struct sh_machine_vector { void (*mv_setup)(char **cmdline_p); const char *mv_name; - int mv_nr_irqs; int (*mv_irq_demux)(int irq); void (*mv_init_irq)(void); diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index a3ee91971129..dadce735f746 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c @@ -234,8 +234,10 @@ void __init init_IRQ(void) #ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs(void) { - nr_irqs = sh_mv.mv_nr_irqs; - return NR_IRQS_LEGACY; + /* + * No pre-allocated IRQs. + */ + return 0; } #endif diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c index 3d722e49db08..ec05f491c347 100644 --- a/arch/sh/kernel/machvec.c +++ b/arch/sh/kernel/machvec.c @@ -121,7 +121,4 @@ void __init sh_mv_setup(void) mv_set(irq_demux); mv_set(mode_pins); mv_set(mem_init); - - if (!sh_mv.mv_nr_irqs) - sh_mv.mv_nr_irqs = NR_IRQS; } |