diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-05-21 04:54:01 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-05-21 04:54:01 -0400 |
commit | 63dc02bde6af1e41d28ebc3774c5f094f362e8c3 (patch) | |
tree | 7978dcdc298421729ea75be54aa86b22b5751948 /arch/sh | |
parent | 7f47c7189b3e8f19a589f77a3ad169d7b691b582 (diff) |
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>
Diffstat (limited to 'arch/sh')
-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); | |||
74 | */ | 74 | */ |
75 | static struct sh_machine_vector mv_edosk7705 __initmv = { | 75 | static struct sh_machine_vector mv_edosk7705 __initmv = { |
76 | .mv_name = "EDOSK7705", | 76 | .mv_name = "EDOSK7705", |
77 | .mv_nr_irqs = 80, | ||
78 | .mv_init_irq = sh_edosk7705_init_irq, | 77 | .mv_init_irq = sh_edosk7705_init_irq, |
79 | }; | 78 | }; |
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); | |||
188 | */ | 188 | */ |
189 | struct sh_machine_vector mv_edosk7760 __initmv = { | 189 | struct sh_machine_vector mv_edosk7760 __initmv = { |
190 | .mv_name = "EDOSK7760", | 190 | .mv_name = "EDOSK7760", |
191 | .mv_nr_irqs = 128, | ||
192 | }; | 191 | }; |
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) | |||
141 | 141 | ||
142 | static struct sh_machine_vector mv_polaris __initmv = { | 142 | static struct sh_machine_vector mv_polaris __initmv = { |
143 | .mv_name = "Polaris", | 143 | .mv_name = "Polaris", |
144 | .mv_nr_irqs = 61, | ||
145 | .mv_init_irq = init_polaris_irq, | 144 | .mv_init_irq = init_polaris_irq, |
146 | }; | 145 | }; |
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) | |||
71 | */ | 71 | */ |
72 | static struct sh_machine_vector mv_snapgear __initmv = { | 72 | static struct sh_machine_vector mv_snapgear __initmv = { |
73 | .mv_name = "SnapGear SecureEdge5410", | 73 | .mv_name = "SnapGear SecureEdge5410", |
74 | .mv_nr_irqs = 72, | ||
75 | .mv_init_irq = init_snapgear_IRQ, | 74 | .mv_init_irq = init_snapgear_IRQ, |
76 | }; | 75 | }; |
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); | |||
181 | 181 | ||
182 | static struct sh_machine_vector mv_cayman __initmv = { | 182 | static struct sh_machine_vector mv_cayman __initmv = { |
183 | .mv_name = "Hitachi Cayman", | 183 | .mv_name = "Hitachi Cayman", |
184 | .mv_nr_irqs = 64, | ||
185 | .mv_ioport_map = cayman_ioport_map, | 184 | .mv_ioport_map = cayman_ioport_map, |
186 | .mv_init_irq = init_cayman_irq, | 185 | .mv_init_irq = init_cayman_irq, |
187 | }; | 186 | }; |
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); | |||
169 | static struct sh_machine_vector mv_hp6xx __initmv = { | 169 | static struct sh_machine_vector mv_hp6xx __initmv = { |
170 | .mv_name = "hp6xx", | 170 | .mv_name = "hp6xx", |
171 | .mv_setup = hp6xx_setup, | 171 | .mv_setup = hp6xx_setup, |
172 | /* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */ | ||
173 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6, | ||
174 | /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ | 172 | /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ |
175 | .mv_init_irq = hp6xx_init_irq, | 173 | .mv_init_irq = hp6xx_init_irq, |
176 | }; | 174 | }; |
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); | |||
79 | */ | 79 | */ |
80 | static struct sh_machine_vector mv_lboxre2 __initmv = { | 80 | static struct sh_machine_vector mv_lboxre2 __initmv = { |
81 | .mv_name = "L-BOX RE2", | 81 | .mv_name = "L-BOX RE2", |
82 | .mv_nr_irqs = 72, | ||
83 | .mv_init_irq = init_lboxre2_IRQ, | 82 | .mv_init_irq = init_lboxre2_IRQ, |
84 | }; | 83 | }; |
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); | |||
194 | */ | 194 | */ |
195 | static struct sh_machine_vector mv_sh4202_microdev __initmv = { | 195 | static struct sh_machine_vector mv_sh4202_microdev __initmv = { |
196 | .mv_name = "SH4-202 MicroDev", | 196 | .mv_name = "SH4-202 MicroDev", |
197 | .mv_nr_irqs = 72, | ||
198 | .mv_ioport_map = microdev_ioport_map, | 197 | .mv_ioport_map = microdev_ioport_map, |
199 | .mv_init_irq = init_microdev_irq, | 198 | .mv_init_irq = init_microdev_irq, |
200 | }; | 199 | }; |
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) | |||
94 | static struct sh_machine_vector mv_se7780 __initmv = { | 94 | static struct sh_machine_vector mv_se7780 __initmv = { |
95 | .mv_name = "Renesas SDK7780-R3" , | 95 | .mv_name = "Renesas SDK7780-R3" , |
96 | .mv_setup = sdk7780_setup, | 96 | .mv_setup = sdk7780_setup, |
97 | .mv_nr_irqs = 111, | ||
98 | .mv_init_irq = init_sdk7780_IRQ, | 97 | .mv_init_irq = init_sdk7780_IRQ, |
99 | }; | 98 | }; |
100 | 99 | ||
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) | |||
90 | 90 | ||
91 | static struct sh_machine_vector mv_se __initmv = { | 91 | static struct sh_machine_vector mv_se __initmv = { |
92 | .mv_name = "SolutionEngine", | 92 | .mv_name = "SolutionEngine", |
93 | .mv_nr_irqs = 256, | ||
94 | .mv_init_irq = init_se7206_IRQ, | 93 | .mv_init_irq = init_se7206_IRQ, |
95 | .mv_mode_pins = se7206_mode_pins, | 94 | .mv_mode_pins = se7206_mode_pins, |
96 | }; | 95 | }; |
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); | |||
184 | static struct sh_machine_vector mv_se __initmv = { | 184 | static struct sh_machine_vector mv_se __initmv = { |
185 | .mv_name = "SolutionEngine", | 185 | .mv_name = "SolutionEngine", |
186 | .mv_setup = smsc_setup, | 186 | .mv_setup = smsc_setup, |
187 | #if defined(CONFIG_CPU_SH4) | ||
188 | .mv_nr_irqs = 48, | ||
189 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) | ||
190 | .mv_nr_irqs = 32, | ||
191 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
192 | .mv_nr_irqs = 61, | ||
193 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
194 | .mv_nr_irqs = 86, | ||
195 | #elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) | ||
196 | .mv_nr_irqs = 104, | ||
197 | #endif | ||
198 | .mv_init_irq = init_se_IRQ, | 187 | .mv_init_irq = init_se_IRQ, |
199 | }; | 188 | }; |
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) | |||
92 | struct sh_machine_vector mv_se7721 __initmv = { | 92 | struct sh_machine_vector mv_se7721 __initmv = { |
93 | .mv_name = "Solution Engine 7721", | 93 | .mv_name = "Solution Engine 7721", |
94 | .mv_setup = se7721_setup, | 94 | .mv_setup = se7721_setup, |
95 | .mv_nr_irqs = 109, | ||
96 | .mv_init_irq = init_se7721_IRQ, | 95 | .mv_init_irq = init_se7721_IRQ, |
97 | }; | 96 | }; |
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); | |||
929 | static struct sh_machine_vector mv_ms7724se __initmv = { | 929 | static struct sh_machine_vector mv_ms7724se __initmv = { |
930 | .mv_name = "ms7724se", | 930 | .mv_name = "ms7724se", |
931 | .mv_init_irq = init_se7724_IRQ, | 931 | .mv_init_irq = init_se7724_IRQ, |
932 | .mv_nr_irqs = SE7724_FPGA_IRQ_BASE + SE7724_FPGA_IRQ_NR, | ||
933 | }; | 932 | }; |
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); | |||
55 | */ | 55 | */ |
56 | static struct sh_machine_vector mv_7751se __initmv = { | 56 | static struct sh_machine_vector mv_7751se __initmv = { |
57 | .mv_name = "7751 SolutionEngine", | 57 | .mv_name = "7751 SolutionEngine", |
58 | .mv_nr_irqs = 72, | ||
59 | .mv_init_irq = init_7751se_IRQ, | 58 | .mv_init_irq = init_7751se_IRQ, |
60 | }; | 59 | }; |
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) | |||
110 | static struct sh_machine_vector mv_se7780 __initmv = { | 110 | static struct sh_machine_vector mv_se7780 __initmv = { |
111 | .mv_name = "Solution Engine 7780" , | 111 | .mv_name = "Solution Engine 7780" , |
112 | .mv_setup = se7780_setup , | 112 | .mv_setup = se7780_setup , |
113 | .mv_nr_irqs = 111 , | ||
114 | .mv_init_irq = init_se7780_IRQ, | 113 | .mv_init_irq = init_se7780_IRQ, |
115 | }; | 114 | }; |
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) | |||
22 | 22 | ||
23 | static struct sh_machine_vector mv_se __initmv = { | 23 | static struct sh_machine_vector mv_se __initmv = { |
24 | .mv_name = "SolutionEngine", | 24 | .mv_name = "SolutionEngine", |
25 | .mv_nr_irqs = 108, | ||
26 | .mv_mode_pins = se7619_mode_pins, | 25 | .mv_mode_pins = se7619_mode_pins, |
27 | }; | 26 | }; |
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); | |||
101 | static struct sh_machine_vector mv_sh03 __initmv = { | 101 | static struct sh_machine_vector mv_sh03 __initmv = { |
102 | .mv_name = "Interface (CTP/PCI-SH03)", | 102 | .mv_name = "Interface (CTP/PCI-SH03)", |
103 | .mv_setup = sh03_setup, | 103 | .mv_setup = sh03_setup, |
104 | .mv_nr_irqs = 48, | ||
105 | .mv_init_irq = init_sh03_IRQ, | 104 | .mv_init_irq = init_sh03_IRQ, |
106 | }; | 105 | }; |
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) | |||
214 | static struct sh_machine_vector mv_sh7763rdp __initmv = { | 214 | static struct sh_machine_vector mv_sh7763rdp __initmv = { |
215 | .mv_name = "sh7763drp", | 215 | .mv_name = "sh7763drp", |
216 | .mv_setup = sh7763rdp_setup, | 216 | .mv_setup = sh7763rdp_setup, |
217 | .mv_nr_irqs = 112, | ||
218 | .mv_init_irq = init_sh7763rdp_IRQ, | 217 | .mv_init_irq = init_sh7763rdp_IRQ, |
219 | }; | 218 | }; |
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 @@ | |||
5 | #include <asm/machvec.h> | 5 | #include <asm/machvec.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * A sane default based on a reasonable vector table size, platforms are | 8 | * Only legacy non-sparseirq platforms have to set a reasonably sane |
9 | * advised to cap this at the hard limit that they're interested in | 9 | * value here. sparseirq platforms allocate their irq_descs on the fly, |
10 | * through the machvec. | 10 | * so will expand automatically based on the number of registered IRQs. |
11 | */ | 11 | */ |
12 | #define NR_IRQS 512 | 12 | #ifdef CONFIG_SPARSE_IRQ |
13 | #define NR_IRQS_LEGACY 8 /* Legacy external IRQ0-7 */ | 13 | # define NR_IRQS 8 |
14 | #else | ||
15 | # define NR_IRQS 512 | ||
16 | #endif | ||
14 | 17 | ||
15 | /* | 18 | /* |
16 | * This is a special IRQ number for indicating that no IRQ has been | 19 | * 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 @@ | |||
17 | struct sh_machine_vector { | 17 | struct sh_machine_vector { |
18 | void (*mv_setup)(char **cmdline_p); | 18 | void (*mv_setup)(char **cmdline_p); |
19 | const char *mv_name; | 19 | const char *mv_name; |
20 | int mv_nr_irqs; | ||
21 | 20 | ||
22 | int (*mv_irq_demux)(int irq); | 21 | int (*mv_irq_demux)(int irq); |
23 | void (*mv_init_irq)(void); | 22 | 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) | |||
234 | #ifdef CONFIG_SPARSE_IRQ | 234 | #ifdef CONFIG_SPARSE_IRQ |
235 | int __init arch_probe_nr_irqs(void) | 235 | int __init arch_probe_nr_irqs(void) |
236 | { | 236 | { |
237 | nr_irqs = sh_mv.mv_nr_irqs; | 237 | /* |
238 | return NR_IRQS_LEGACY; | 238 | * No pre-allocated IRQs. |
239 | */ | ||
240 | return 0; | ||
239 | } | 241 | } |
240 | #endif | 242 | #endif |
241 | 243 | ||
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) | |||
121 | mv_set(irq_demux); | 121 | mv_set(irq_demux); |
122 | mv_set(mode_pins); | 122 | mv_set(mode_pins); |
123 | mv_set(mem_init); | 123 | mv_set(mem_init); |
124 | |||
125 | if (!sh_mv.mv_nr_irqs) | ||
126 | sh_mv.mv_nr_irqs = NR_IRQS; | ||
127 | } | 124 | } |