diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-07-23 13:43:48 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 08:26:11 -0400 |
commit | a5decf700be1123c2da6bdab5099bce072c55cc2 (patch) | |
tree | c83a88c3b4ea9303742b72a25ecfa1bc702e694e | |
parent | 3508920f5811fcb8bdbf02943eb5ed531834bbc4 (diff) |
MIPS: Octeon: Get rid of a bunch of MSI IRQ number definitions.
MSI IRQ numbers are allocated dynamically, so there is no reason to
have all these static definitions.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1487/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/mach-cavium-octeon/irq.h | 66 | ||||
-rw-r--r-- | arch/mips/pci/msi-octeon.c | 4 |
2 files changed, 4 insertions, 66 deletions
diff --git a/arch/mips/include/asm/mach-cavium-octeon/irq.h b/arch/mips/include/asm/mach-cavium-octeon/irq.h index d32220fbf4f1..783dae747223 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/irq.h +++ b/arch/mips/include/asm/mach-cavium-octeon/irq.h | |||
@@ -172,71 +172,9 @@ | |||
172 | #ifdef CONFIG_PCI_MSI | 172 | #ifdef CONFIG_PCI_MSI |
173 | /* 152 - 215 represent the MSI interrupts 0-63 */ | 173 | /* 152 - 215 represent the MSI interrupts 0-63 */ |
174 | #define OCTEON_IRQ_MSI_BIT0 152 | 174 | #define OCTEON_IRQ_MSI_BIT0 152 |
175 | #define OCTEON_IRQ_MSI_BIT1 153 | 175 | #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 63) |
176 | #define OCTEON_IRQ_MSI_BIT2 154 | ||
177 | #define OCTEON_IRQ_MSI_BIT3 155 | ||
178 | #define OCTEON_IRQ_MSI_BIT4 156 | ||
179 | #define OCTEON_IRQ_MSI_BIT5 157 | ||
180 | #define OCTEON_IRQ_MSI_BIT6 158 | ||
181 | #define OCTEON_IRQ_MSI_BIT7 159 | ||
182 | #define OCTEON_IRQ_MSI_BIT8 160 | ||
183 | #define OCTEON_IRQ_MSI_BIT9 161 | ||
184 | #define OCTEON_IRQ_MSI_BIT10 162 | ||
185 | #define OCTEON_IRQ_MSI_BIT11 163 | ||
186 | #define OCTEON_IRQ_MSI_BIT12 164 | ||
187 | #define OCTEON_IRQ_MSI_BIT13 165 | ||
188 | #define OCTEON_IRQ_MSI_BIT14 166 | ||
189 | #define OCTEON_IRQ_MSI_BIT15 167 | ||
190 | #define OCTEON_IRQ_MSI_BIT16 168 | ||
191 | #define OCTEON_IRQ_MSI_BIT17 169 | ||
192 | #define OCTEON_IRQ_MSI_BIT18 170 | ||
193 | #define OCTEON_IRQ_MSI_BIT19 171 | ||
194 | #define OCTEON_IRQ_MSI_BIT20 172 | ||
195 | #define OCTEON_IRQ_MSI_BIT21 173 | ||
196 | #define OCTEON_IRQ_MSI_BIT22 174 | ||
197 | #define OCTEON_IRQ_MSI_BIT23 175 | ||
198 | #define OCTEON_IRQ_MSI_BIT24 176 | ||
199 | #define OCTEON_IRQ_MSI_BIT25 177 | ||
200 | #define OCTEON_IRQ_MSI_BIT26 178 | ||
201 | #define OCTEON_IRQ_MSI_BIT27 179 | ||
202 | #define OCTEON_IRQ_MSI_BIT28 180 | ||
203 | #define OCTEON_IRQ_MSI_BIT29 181 | ||
204 | #define OCTEON_IRQ_MSI_BIT30 182 | ||
205 | #define OCTEON_IRQ_MSI_BIT31 183 | ||
206 | #define OCTEON_IRQ_MSI_BIT32 184 | ||
207 | #define OCTEON_IRQ_MSI_BIT33 185 | ||
208 | #define OCTEON_IRQ_MSI_BIT34 186 | ||
209 | #define OCTEON_IRQ_MSI_BIT35 187 | ||
210 | #define OCTEON_IRQ_MSI_BIT36 188 | ||
211 | #define OCTEON_IRQ_MSI_BIT37 189 | ||
212 | #define OCTEON_IRQ_MSI_BIT38 190 | ||
213 | #define OCTEON_IRQ_MSI_BIT39 191 | ||
214 | #define OCTEON_IRQ_MSI_BIT40 192 | ||
215 | #define OCTEON_IRQ_MSI_BIT41 193 | ||
216 | #define OCTEON_IRQ_MSI_BIT42 194 | ||
217 | #define OCTEON_IRQ_MSI_BIT43 195 | ||
218 | #define OCTEON_IRQ_MSI_BIT44 196 | ||
219 | #define OCTEON_IRQ_MSI_BIT45 197 | ||
220 | #define OCTEON_IRQ_MSI_BIT46 198 | ||
221 | #define OCTEON_IRQ_MSI_BIT47 199 | ||
222 | #define OCTEON_IRQ_MSI_BIT48 200 | ||
223 | #define OCTEON_IRQ_MSI_BIT49 201 | ||
224 | #define OCTEON_IRQ_MSI_BIT50 202 | ||
225 | #define OCTEON_IRQ_MSI_BIT51 203 | ||
226 | #define OCTEON_IRQ_MSI_BIT52 204 | ||
227 | #define OCTEON_IRQ_MSI_BIT53 205 | ||
228 | #define OCTEON_IRQ_MSI_BIT54 206 | ||
229 | #define OCTEON_IRQ_MSI_BIT55 207 | ||
230 | #define OCTEON_IRQ_MSI_BIT56 208 | ||
231 | #define OCTEON_IRQ_MSI_BIT57 209 | ||
232 | #define OCTEON_IRQ_MSI_BIT58 210 | ||
233 | #define OCTEON_IRQ_MSI_BIT59 211 | ||
234 | #define OCTEON_IRQ_MSI_BIT60 212 | ||
235 | #define OCTEON_IRQ_MSI_BIT61 213 | ||
236 | #define OCTEON_IRQ_MSI_BIT62 214 | ||
237 | #define OCTEON_IRQ_MSI_BIT63 215 | ||
238 | 176 | ||
239 | #define OCTEON_IRQ_LAST 216 | 177 | #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) |
240 | #else | 178 | #else |
241 | #define OCTEON_IRQ_LAST 152 | 179 | #define OCTEON_IRQ_LAST 152 |
242 | #endif | 180 | #endif |
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c index 1e31526f0e53..5ce1a6a6494a 100644 --- a/arch/mips/pci/msi-octeon.c +++ b/arch/mips/pci/msi-octeon.c | |||
@@ -181,7 +181,7 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
181 | int number_irqs; | 181 | int number_irqs; |
182 | uint64_t bitmask; | 182 | uint64_t bitmask; |
183 | 183 | ||
184 | if ((irq < OCTEON_IRQ_MSI_BIT0) || (irq > OCTEON_IRQ_MSI_BIT63)) | 184 | if ((irq < OCTEON_IRQ_MSI_BIT0) || (irq > OCTEON_IRQ_MSI_LAST)) |
185 | panic("arch_teardown_msi_irq: Attempted to teardown illegal " | 185 | panic("arch_teardown_msi_irq: Attempted to teardown illegal " |
186 | "MSI interrupt (%d)", irq); | 186 | "MSI interrupt (%d)", irq); |
187 | irq -= OCTEON_IRQ_MSI_BIT0; | 187 | irq -= OCTEON_IRQ_MSI_BIT0; |
@@ -337,7 +337,7 @@ static int __init octeon_msi_initialize(void) | |||
337 | { | 337 | { |
338 | int irq; | 338 | int irq; |
339 | 339 | ||
340 | for (irq = OCTEON_IRQ_MSI_BIT0; irq <= OCTEON_IRQ_MSI_BIT63; irq++) { | 340 | for (irq = OCTEON_IRQ_MSI_BIT0; irq <= OCTEON_IRQ_MSI_LAST; irq++) { |
341 | set_irq_chip_and_handler(irq, &octeon_irq_chip_msi, | 341 | set_irq_chip_and_handler(irq, &octeon_irq_chip_msi, |
342 | handle_percpu_irq); | 342 | handle_percpu_irq); |
343 | } | 343 | } |