diff options
-rw-r--r-- | arch/mips/kernel/smtc.c | 6 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 13 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 20 | ||||
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_int.c | 8 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 50 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_int.c | 14 | ||||
-rw-r--r-- | arch/mips/mips-boards/sead/sead_int.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/sead/sead_setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/sim/sim_int.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/sim/sim_time.c | 8 | ||||
-rw-r--r-- | drivers/net/mipsnet.c | 2 | ||||
-rw-r--r-- | include/asm-mips/irq.h | 9 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/atlasint.h | 6 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/maltaint.h | 6 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/seadint.h | 7 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/simint.h | 4 |
16 files changed, 73 insertions, 86 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 21eb5993a19f..2e011470c347 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -13,9 +13,9 @@ | |||
13 | #include <asm/system.h> | 13 | #include <asm/system.h> |
14 | #include <asm/hardirq.h> | 14 | #include <asm/hardirq.h> |
15 | #include <asm/hazards.h> | 15 | #include <asm/hazards.h> |
16 | #include <asm/irq.h> | ||
16 | #include <asm/mmu_context.h> | 17 | #include <asm/mmu_context.h> |
17 | #include <asm/smp.h> | 18 | #include <asm/smp.h> |
18 | #include <asm/mips-boards/maltaint.h> | ||
19 | #include <asm/mipsregs.h> | 19 | #include <asm/mipsregs.h> |
20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
21 | #include <asm/time.h> | 21 | #include <asm/time.h> |
@@ -614,7 +614,7 @@ int setup_irq_smtc(unsigned int irq, struct irqaction * new, | |||
614 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG | 614 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG |
615 | unsigned int vpe = current_cpu_data.vpe_id; | 615 | unsigned int vpe = current_cpu_data.vpe_id; |
616 | 616 | ||
617 | vpemask[vpe][irq - MIPSCPU_INT_BASE] = 1; | 617 | vpemask[vpe][irq - MIPS_CPU_IRQ_BASE] = 1; |
618 | #endif | 618 | #endif |
619 | irq_hwmask[irq] = hwmask; | 619 | irq_hwmask[irq] = hwmask; |
620 | 620 | ||
@@ -822,7 +822,7 @@ void ipi_decode(struct smtc_ipi *pipi) | |||
822 | switch (type_copy) { | 822 | switch (type_copy) { |
823 | case SMTC_CLOCK_TICK: | 823 | case SMTC_CLOCK_TICK: |
824 | irq_enter(); | 824 | irq_enter(); |
825 | kstat_this_cpu.irqs[MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR]++; | 825 | kstat_this_cpu.irqs[MIPS_CPU_IRQ_BASE + cp0_perfcount_irq]++; |
826 | /* Invoke Clock "Interrupt" */ | 826 | /* Invoke Clock "Interrupt" */ |
827 | ipi_timer_latch[dest_copy] = 0; | 827 | ipi_timer_latch[dest_copy] = 0; |
828 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG | 828 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 7def1ff3da94..d48d1d5bea0a 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -200,10 +200,15 @@ EXPORT_SYMBOL(null_perf_irq); | |||
200 | EXPORT_SYMBOL(perf_irq); | 200 | EXPORT_SYMBOL(perf_irq); |
201 | 201 | ||
202 | /* | 202 | /* |
203 | * Timer interrupt | ||
204 | */ | ||
205 | int cp0_compare_irq; | ||
206 | |||
207 | /* | ||
203 | * Performance counter IRQ or -1 if shared with timer | 208 | * Performance counter IRQ or -1 if shared with timer |
204 | */ | 209 | */ |
205 | int mipsxx_perfcount_irq; | 210 | int cp0_perfcount_irq; |
206 | EXPORT_SYMBOL(mipsxx_perfcount_irq); | 211 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); |
207 | 212 | ||
208 | /* | 213 | /* |
209 | * Possibly handle a performance counter interrupt. | 214 | * Possibly handle a performance counter interrupt. |
@@ -213,12 +218,12 @@ static inline int handle_perf_irq (int r2) | |||
213 | { | 218 | { |
214 | /* | 219 | /* |
215 | * The performance counter overflow interrupt may be shared with the | 220 | * The performance counter overflow interrupt may be shared with the |
216 | * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a | 221 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a |
217 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | 222 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) |
218 | * and we can't reliably determine if a counter interrupt has also | 223 | * and we can't reliably determine if a counter interrupt has also |
219 | * happened (!r2) then don't check for a timer interrupt. | 224 | * happened (!r2) then don't check for a timer interrupt. |
220 | */ | 225 | */ |
221 | return (mipsxx_perfcount_irq < 0) && | 226 | return (cp0_perfcount_irq < 0) && |
222 | perf_irq() == IRQ_HANDLED && | 227 | perf_irq() == IRQ_HANDLED && |
223 | !r2; | 228 | !r2; |
224 | } | 229 | } |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index a7a17eb9bfcd..b1233644fcca 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1350,9 +1350,6 @@ void __init per_cpu_trap_init(void) | |||
1350 | if (!secondaryTC) { | 1350 | if (!secondaryTC) { |
1351 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1351 | #endif /* CONFIG_MIPS_MT_SMTC */ |
1352 | 1352 | ||
1353 | /* | ||
1354 | * Interrupt handling. | ||
1355 | */ | ||
1356 | if (cpu_has_veic || cpu_has_vint) { | 1353 | if (cpu_has_veic || cpu_has_vint) { |
1357 | write_c0_ebase (ebase); | 1354 | write_c0_ebase (ebase); |
1358 | /* Setting vector spacing enables EI/VI mode */ | 1355 | /* Setting vector spacing enables EI/VI mode */ |
@@ -1366,6 +1363,23 @@ void __init per_cpu_trap_init(void) | |||
1366 | } else | 1363 | } else |
1367 | set_c0_cause(CAUSEF_IV); | 1364 | set_c0_cause(CAUSEF_IV); |
1368 | } | 1365 | } |
1366 | |||
1367 | /* | ||
1368 | * Before R2 both interrupt numbers were fixed to 7, so on R2 only: | ||
1369 | * | ||
1370 | * o read IntCtl.IPTI to determine the timer interrupt | ||
1371 | * o read IntCtl.IPPCI to determine the performance counter interrupt | ||
1372 | */ | ||
1373 | if (cpu_has_mips_r2) { | ||
1374 | cp0_compare_irq = (read_c0_intctl () >> 29) & 7; | ||
1375 | cp0_perfcount_irq = -1; | ||
1376 | } else { | ||
1377 | cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ; | ||
1378 | cp0_perfcount_irq = (read_c0_intctl () >> 26) & 7; | ||
1379 | if (cp0_perfcount_irq != cp0_compare_irq) | ||
1380 | cp0_perfcount_irq = -1; | ||
1381 | } | ||
1382 | |||
1369 | #ifdef CONFIG_MIPS_MT_SMTC | 1383 | #ifdef CONFIG_MIPS_MT_SMTC |
1370 | } | 1384 | } |
1371 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1385 | #endif /* CONFIG_MIPS_MT_SMTC */ |
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index 9f49da95aacf..6c8f0255e85d 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c | |||
@@ -189,7 +189,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
189 | if (irq == MIPSCPU_INT_ATLAS) | 189 | if (irq == MIPSCPU_INT_ATLAS) |
190 | atlas_hw0_irqdispatch(); | 190 | atlas_hw0_irqdispatch(); |
191 | else if (irq >= 0) | 191 | else if (irq >= 0) |
192 | do_IRQ(MIPSCPU_INT_BASE + irq); | 192 | do_IRQ(MIPS_CPU_IRQ_BASE + irq); |
193 | else | 193 | else |
194 | spurious_interrupt(); | 194 | spurious_interrupt(); |
195 | } | 195 | } |
@@ -261,11 +261,11 @@ void __init arch_init_irq(void) | |||
261 | } else if (cpu_has_vint) { | 261 | } else if (cpu_has_vint) { |
262 | set_vi_handler (MIPSCPU_INT_ATLAS, atlas_hw0_irqdispatch); | 262 | set_vi_handler (MIPSCPU_INT_ATLAS, atlas_hw0_irqdispatch); |
263 | #ifdef CONFIG_MIPS_MT_SMTC | 263 | #ifdef CONFIG_MIPS_MT_SMTC |
264 | setup_irq_smtc (MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, | 264 | setup_irq_smtc (MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, |
265 | &atlasirq, (0x100 << MIPSCPU_INT_ATLAS)); | 265 | &atlasirq, (0x100 << MIPSCPU_INT_ATLAS)); |
266 | #else /* Not SMTC */ | 266 | #else /* Not SMTC */ |
267 | setup_irq(MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, &atlasirq); | 267 | setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq); |
268 | #endif /* CONFIG_MIPS_MT_SMTC */ | 268 | #endif /* CONFIG_MIPS_MT_SMTC */ |
269 | } else | 269 | } else |
270 | setup_irq(MIPSCPU_INT_BASE + MIPSCPU_INT_ATLAS, &atlasirq); | 270 | setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq); |
271 | } | 271 | } |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 8f1000f51b3d..c45d556aa96b 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -54,7 +54,7 @@ | |||
54 | unsigned long cpu_khz; | 54 | unsigned long cpu_khz; |
55 | 55 | ||
56 | static int mips_cpu_timer_irq; | 56 | static int mips_cpu_timer_irq; |
57 | extern int mipsxx_perfcount_irq; | 57 | extern int cp0_perfcount_irq; |
58 | extern void smtc_timer_broadcast(int); | 58 | extern void smtc_timer_broadcast(int); |
59 | 59 | ||
60 | static void mips_timer_dispatch(void) | 60 | static void mips_timer_dispatch(void) |
@@ -64,7 +64,7 @@ static void mips_timer_dispatch(void) | |||
64 | 64 | ||
65 | static void mips_perf_dispatch(void) | 65 | static void mips_perf_dispatch(void) |
66 | { | 66 | { |
67 | do_IRQ(mipsxx_perfcount_irq); | 67 | do_IRQ(cp0_perfcount_irq); |
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
@@ -82,12 +82,12 @@ static inline int handle_perf_irq (int r2) | |||
82 | { | 82 | { |
83 | /* | 83 | /* |
84 | * The performance counter overflow interrupt may be shared with the | 84 | * The performance counter overflow interrupt may be shared with the |
85 | * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a | 85 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a |
86 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | 86 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) |
87 | * and we can't reliably determine if a counter interrupt has also | 87 | * and we can't reliably determine if a counter interrupt has also |
88 | * happened (!r2) then don't check for a timer interrupt. | 88 | * happened (!r2) then don't check for a timer interrupt. |
89 | */ | 89 | */ |
90 | return (mipsxx_perfcount_irq < 0) && | 90 | return (cp0_perfcount_irq < 0) && |
91 | perf_irq() == IRQ_HANDLED && | 91 | perf_irq() == IRQ_HANDLED && |
92 | !r2; | 92 | !r2; |
93 | } | 93 | } |
@@ -259,42 +259,31 @@ static struct irqaction perf_irqaction = { | |||
259 | 259 | ||
260 | void __init plat_perf_setup(struct irqaction *irq) | 260 | void __init plat_perf_setup(struct irqaction *irq) |
261 | { | 261 | { |
262 | int hwint = 0; | 262 | cp0_perfcount_irq = -1; |
263 | mipsxx_perfcount_irq = -1; | ||
264 | 263 | ||
265 | #ifdef MSC01E_INT_BASE | 264 | #ifdef MSC01E_INT_BASE |
266 | if (cpu_has_veic) { | 265 | if (cpu_has_veic) { |
267 | set_vi_handler (MSC01E_INT_PERFCTR, mips_perf_dispatch); | 266 | set_vi_handler (MSC01E_INT_PERFCTR, mips_perf_dispatch); |
268 | mipsxx_perfcount_irq = MSC01E_INT_BASE + MSC01E_INT_PERFCTR; | 267 | cp0_perfcount_irq = MSC01E_INT_BASE + MSC01E_INT_PERFCTR; |
269 | } else | 268 | } else |
270 | #endif | 269 | #endif |
271 | if (cpu_has_mips_r2) { | 270 | if (cp0_perfcount_irq >= 0) { |
272 | /* | 271 | if (cpu_has_vint) |
273 | * Read IntCtl.IPPCI to determine the performance | 272 | set_vi_handler(cp0_perfcount_irq, mips_perf_dispatch); |
274 | * counter interrupt | ||
275 | */ | ||
276 | hwint = (read_c0_intctl () >> 26) & 7; | ||
277 | if (hwint != MIPSCPU_INT_CPUCTR) { | ||
278 | if (cpu_has_vint) | ||
279 | set_vi_handler (hwint, mips_perf_dispatch); | ||
280 | mipsxx_perfcount_irq = MIPSCPU_INT_BASE + hwint; | ||
281 | } | ||
282 | } | ||
283 | if (mipsxx_perfcount_irq >= 0) { | ||
284 | #ifdef CONFIG_MIPS_MT_SMTC | 273 | #ifdef CONFIG_MIPS_MT_SMTC |
285 | setup_irq_smtc(mipsxx_perfcount_irq, irq, 0x100 << hwint); | 274 | setup_irq_smtc(cp0_perfcount_irq, irq, |
275 | 0x100 << cp0_perfcount_irq); | ||
286 | #else | 276 | #else |
287 | setup_irq(mipsxx_perfcount_irq, irq); | 277 | setup_irq(cp0_perfcount_irq, irq); |
288 | #endif /* CONFIG_MIPS_MT_SMTC */ | 278 | #endif /* CONFIG_MIPS_MT_SMTC */ |
289 | #ifdef CONFIG_SMP | 279 | #ifdef CONFIG_SMP |
290 | set_irq_handler(mipsxx_perfcount_irq, handle_percpu_irq); | 280 | set_irq_handler(cp0_perfcount_irq, handle_percpu_irq); |
291 | #endif | 281 | #endif |
292 | } | 282 | } |
293 | } | 283 | } |
294 | 284 | ||
295 | void __init plat_timer_setup(struct irqaction *irq) | 285 | void __init plat_timer_setup(struct irqaction *irq) |
296 | { | 286 | { |
297 | int hwint = 0; | ||
298 | #ifdef MSC01E_INT_BASE | 287 | #ifdef MSC01E_INT_BASE |
299 | if (cpu_has_veic) { | 288 | if (cpu_has_veic) { |
300 | set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); | 289 | set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); |
@@ -303,22 +292,15 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
303 | else | 292 | else |
304 | #endif | 293 | #endif |
305 | { | 294 | { |
306 | if (cpu_has_mips_r2) | ||
307 | /* | ||
308 | * Read IntCtl.IPTI to determine the timer interrupt | ||
309 | */ | ||
310 | hwint = (read_c0_intctl () >> 29) & 7; | ||
311 | else | ||
312 | hwint = MIPSCPU_INT_CPUCTR; | ||
313 | if (cpu_has_vint) | 295 | if (cpu_has_vint) |
314 | set_vi_handler (hwint, mips_timer_dispatch); | 296 | set_vi_handler(cp0_compare_irq, mips_timer_dispatch); |
315 | mips_cpu_timer_irq = MIPSCPU_INT_BASE + hwint; | 297 | mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; |
316 | } | 298 | } |
317 | 299 | ||
318 | /* we are using the cpu counter for timer interrupts */ | 300 | /* we are using the cpu counter for timer interrupts */ |
319 | irq->handler = mips_timer_interrupt; /* we use our own handler */ | 301 | irq->handler = mips_timer_interrupt; /* we use our own handler */ |
320 | #ifdef CONFIG_MIPS_MT_SMTC | 302 | #ifdef CONFIG_MIPS_MT_SMTC |
321 | setup_irq_smtc(mips_cpu_timer_irq, irq, 0x100 << hwint); | 303 | setup_irq_smtc(mips_cpu_timer_irq, irq, 0x100 << cp0_compare_irq); |
322 | #else | 304 | #else |
323 | setup_irq(mips_cpu_timer_irq, irq); | 305 | setup_irq(mips_cpu_timer_irq, irq); |
324 | #endif /* CONFIG_MIPS_MT_SMTC */ | 306 | #endif /* CONFIG_MIPS_MT_SMTC */ |
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 1668cc21d5b5..c78d48349600 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c | |||
@@ -257,7 +257,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
257 | if (irq == MIPSCPU_INT_I8259A) | 257 | if (irq == MIPSCPU_INT_I8259A) |
258 | malta_hw0_irqdispatch(); | 258 | malta_hw0_irqdispatch(); |
259 | else if (irq > 0) | 259 | else if (irq > 0) |
260 | do_IRQ(MIPSCPU_INT_BASE + irq); | 260 | do_IRQ(MIPS_CPU_IRQ_BASE + irq); |
261 | else | 261 | else |
262 | spurious_interrupt(); | 262 | spurious_interrupt(); |
263 | } | 263 | } |
@@ -326,17 +326,17 @@ void __init arch_init_irq(void) | |||
326 | set_vi_handler (MIPSCPU_INT_I8259A, malta_hw0_irqdispatch); | 326 | set_vi_handler (MIPSCPU_INT_I8259A, malta_hw0_irqdispatch); |
327 | set_vi_handler (MIPSCPU_INT_COREHI, corehi_irqdispatch); | 327 | set_vi_handler (MIPSCPU_INT_COREHI, corehi_irqdispatch); |
328 | #ifdef CONFIG_MIPS_MT_SMTC | 328 | #ifdef CONFIG_MIPS_MT_SMTC |
329 | setup_irq_smtc (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq, | 329 | setup_irq_smtc (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq, |
330 | (0x100 << MIPSCPU_INT_I8259A)); | 330 | (0x100 << MIPSCPU_INT_I8259A)); |
331 | setup_irq_smtc (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, | 331 | setup_irq_smtc (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, |
332 | &corehi_irqaction, (0x100 << MIPSCPU_INT_COREHI)); | 332 | &corehi_irqaction, (0x100 << MIPSCPU_INT_COREHI)); |
333 | #else /* Not SMTC */ | 333 | #else /* Not SMTC */ |
334 | setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq); | 334 | setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq); |
335 | setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); | 335 | setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); |
336 | #endif /* CONFIG_MIPS_MT_SMTC */ | 336 | #endif /* CONFIG_MIPS_MT_SMTC */ |
337 | } | 337 | } |
338 | else { | 338 | else { |
339 | setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_I8259A, &i8259irq); | 339 | setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_I8259A, &i8259irq); |
340 | setup_irq (MIPSCPU_INT_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); | 340 | setup_irq (MIPS_CPU_IRQ_BASE+MIPSCPU_INT_COREHI, &corehi_irqaction); |
341 | } | 341 | } |
342 | } | 342 | } |
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c index c4b9de3a7f27..9ca0f82f1360 100644 --- a/arch/mips/mips-boards/sead/sead_int.c +++ b/arch/mips/mips-boards/sead/sead_int.c | |||
@@ -106,7 +106,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
106 | irq = irq_ffs(pending); | 106 | irq = irq_ffs(pending); |
107 | 107 | ||
108 | if (irq >= 0) | 108 | if (irq >= 0) |
109 | do_IRQ(MIPSCPU_INT_BASE + irq); | 109 | do_IRQ(MIPS_CPU_IRQ_BASE + irq); |
110 | else | 110 | else |
111 | spurious_interrupt(); | 111 | spurious_interrupt(); |
112 | } | 112 | } |
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index 811aba100605..bb801409d39b 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c | |||
@@ -68,7 +68,7 @@ static void __init serial_init(void) | |||
68 | #else | 68 | #else |
69 | s.iobase = SEAD_UART0_REGS_BASE+3; | 69 | s.iobase = SEAD_UART0_REGS_BASE+3; |
70 | #endif | 70 | #endif |
71 | s.irq = MIPSCPU_INT_BASE + MIPSCPU_INT_UART0; | 71 | s.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_UART0; |
72 | s.uartclk = SEAD_BASE_BAUD * 16; | 72 | s.uartclk = SEAD_BASE_BAUD * 16; |
73 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; | 73 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; |
74 | s.iotype = UPIO_PORT; | 74 | s.iotype = UPIO_PORT; |
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c index 15ac0655c1ff..766e0159ee5b 100644 --- a/arch/mips/mips-boards/sim/sim_int.c +++ b/arch/mips/mips-boards/sim/sim_int.c | |||
@@ -77,7 +77,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
77 | irq = irq_ffs(pending); | 77 | irq = irq_ffs(pending); |
78 | 78 | ||
79 | if (irq > 0) | 79 | if (irq > 0) |
80 | do_IRQ(MIPSCPU_INT_BASE + irq); | 80 | do_IRQ(MIPS_CPU_IRQ_BASE + irq); |
81 | else | 81 | else |
82 | spurious_interrupt(); | 82 | spurious_interrupt(); |
83 | } | 83 | } |
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index d3a21c741514..7224ffe31d36 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c | |||
@@ -71,8 +71,8 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id) | |||
71 | 71 | ||
72 | int vpflags = dvpe(); | 72 | int vpflags = dvpe(); |
73 | write_c0_compare (read_c0_count() - 1); | 73 | write_c0_compare (read_c0_count() - 1); |
74 | clear_c0_cause(0x100 << MIPSCPU_INT_CPUCTR); | 74 | clear_c0_cause(0x100 << cp0_compare_irq); |
75 | set_c0_status(0x100 << MIPSCPU_INT_CPUCTR); | 75 | set_c0_status(0x100 << cp0_compare_irq); |
76 | irq_enable_hazard(); | 76 | irq_enable_hazard(); |
77 | evpe(vpflags); | 77 | evpe(vpflags); |
78 | 78 | ||
@@ -183,8 +183,8 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
183 | } | 183 | } |
184 | else { | 184 | else { |
185 | if (cpu_has_vint) | 185 | if (cpu_has_vint) |
186 | set_vi_handler(MIPSCPU_INT_CPUCTR, mips_timer_dispatch); | 186 | set_vi_handler(cp0_compare_irq, mips_timer_dispatch); |
187 | mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR; | 187 | mips_cpu_timer_irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; |
188 | } | 188 | } |
189 | 189 | ||
190 | /* we are using the cpu counter for timer interrupts */ | 190 | /* we are using the cpu counter for timer interrupts */ |
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c index 638a279ec505..9853c74f6bbf 100644 --- a/drivers/net/mipsnet.c +++ b/drivers/net/mipsnet.c | |||
@@ -240,7 +240,7 @@ static int __init mipsnet_probe(struct device *dev) | |||
240 | * TODO: probe for these or load them from PARAM | 240 | * TODO: probe for these or load them from PARAM |
241 | */ | 241 | */ |
242 | netdev->base_addr = 0x4200; | 242 | netdev->base_addr = 0x4200; |
243 | netdev->irq = MIPSCPU_INT_BASE + MIPSCPU_INT_MB0 + | 243 | netdev->irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB0 + |
244 | inl(mipsnet_reg_address(netdev, interruptInfo)); | 244 | inl(mipsnet_reg_address(netdev, interruptInfo)); |
245 | 245 | ||
246 | // Get the io region now, get irq on open() | 246 | // Get the io region now, get irq on open() |
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index 91803ba30ff2..3ca6a076124d 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h | |||
@@ -72,4 +72,13 @@ extern int allocate_irqno(void); | |||
72 | extern void alloc_legacy_irqno(void); | 72 | extern void alloc_legacy_irqno(void); |
73 | extern void free_irqno(unsigned int irq); | 73 | extern void free_irqno(unsigned int irq); |
74 | 74 | ||
75 | /* | ||
76 | * Before R2 the timer and performance counter interrupts were both fixed to | ||
77 | * IE7. Since R2 their number has to be read from the c0_intctl register. | ||
78 | */ | ||
79 | #define CP0_LEGACY_COMPARE_IRQ 7 | ||
80 | |||
81 | extern int cp0_compare_irq; | ||
82 | extern int cp0_perfcount_irq; | ||
83 | |||
75 | #endif /* _ASM_IRQ_H */ | 84 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-mips/mips-boards/atlasint.h b/include/asm-mips/mips-boards/atlasint.h index 76add42e486e..93ba1c1b2a4f 100644 --- a/include/asm-mips/mips-boards/atlasint.h +++ b/include/asm-mips/mips-boards/atlasint.h | |||
@@ -28,11 +28,6 @@ | |||
28 | 28 | ||
29 | #include <irq.h> | 29 | #include <irq.h> |
30 | 30 | ||
31 | /* | ||
32 | * Interrupts 0..7 are used for Atlas CPU interrupts (nonEIC mode) | ||
33 | */ | ||
34 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
35 | |||
36 | /* CPU interrupt offsets */ | 31 | /* CPU interrupt offsets */ |
37 | #define MIPSCPU_INT_SW0 0 | 32 | #define MIPSCPU_INT_SW0 0 |
38 | #define MIPSCPU_INT_SW1 1 | 33 | #define MIPSCPU_INT_SW1 1 |
@@ -42,7 +37,6 @@ | |||
42 | #define MIPSCPU_INT_MB2 4 | 37 | #define MIPSCPU_INT_MB2 4 |
43 | #define MIPSCPU_INT_MB3 5 | 38 | #define MIPSCPU_INT_MB3 5 |
44 | #define MIPSCPU_INT_MB4 6 | 39 | #define MIPSCPU_INT_MB4 6 |
45 | #define MIPSCPU_INT_CPUCTR 7 | ||
46 | 40 | ||
47 | /* | 41 | /* |
48 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts | 42 | * Interrupts 8..39 are used for Atlas interrupt controller interrupts |
diff --git a/include/asm-mips/mips-boards/maltaint.h b/include/asm-mips/mips-boards/maltaint.h index 9180d6466113..7461318f1cd1 100644 --- a/include/asm-mips/mips-boards/maltaint.h +++ b/include/asm-mips/mips-boards/maltaint.h | |||
@@ -32,11 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | #define MALTA_INT_BASE 0 | 33 | #define MALTA_INT_BASE 0 |
34 | 34 | ||
35 | /* | ||
36 | * Interrupts 16..23 are used for Malta CPU interrupts (nonEIC mode) | ||
37 | */ | ||
38 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
39 | |||
40 | /* CPU interrupt offsets */ | 35 | /* CPU interrupt offsets */ |
41 | #define MIPSCPU_INT_SW0 0 | 36 | #define MIPSCPU_INT_SW0 0 |
42 | #define MIPSCPU_INT_SW1 1 | 37 | #define MIPSCPU_INT_SW1 1 |
@@ -49,7 +44,6 @@ | |||
49 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 44 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
50 | #define MIPSCPU_INT_MB4 6 | 45 | #define MIPSCPU_INT_MB4 6 |
51 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 | 46 | #define MIPSCPU_INT_CORELO MIPSCPU_INT_MB4 |
52 | #define MIPSCPU_INT_CPUCTR 7 | ||
53 | 47 | ||
54 | /* | 48 | /* |
55 | * Interrupts 64..127 are used for Soc-it Classic interrupts | 49 | * Interrupts 64..127 are used for Soc-it Classic interrupts |
diff --git a/include/asm-mips/mips-boards/seadint.h b/include/asm-mips/mips-boards/seadint.h index 4f6a3933699d..e710bae07340 100644 --- a/include/asm-mips/mips-boards/seadint.h +++ b/include/asm-mips/mips-boards/seadint.h | |||
@@ -22,14 +22,7 @@ | |||
22 | 22 | ||
23 | #include <irq.h> | 23 | #include <irq.h> |
24 | 24 | ||
25 | /* | ||
26 | * Interrupts 0..7 are used for SEAD CPU interrupts | ||
27 | */ | ||
28 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
29 | |||
30 | #define MIPSCPU_INT_UART0 2 | 25 | #define MIPSCPU_INT_UART0 2 |
31 | #define MIPSCPU_INT_UART1 3 | 26 | #define MIPSCPU_INT_UART1 3 |
32 | 27 | ||
33 | #define MIPSCPU_INT_CPUCTR 7 | ||
34 | |||
35 | #endif /* !(_MIPS_SEADINT_H) */ | 28 | #endif /* !(_MIPS_SEADINT_H) */ |
diff --git a/include/asm-mips/mips-boards/simint.h b/include/asm-mips/mips-boards/simint.h index 54f2fe621d69..8ef6db76d5c1 100644 --- a/include/asm-mips/mips-boards/simint.h +++ b/include/asm-mips/mips-boards/simint.h | |||
@@ -21,15 +21,11 @@ | |||
21 | 21 | ||
22 | #define SIM_INT_BASE 0 | 22 | #define SIM_INT_BASE 0 |
23 | #define MIPSCPU_INT_MB0 2 | 23 | #define MIPSCPU_INT_MB0 2 |
24 | #define MIPSCPU_INT_BASE MIPS_CPU_IRQ_BASE | ||
25 | #define MIPS_CPU_TIMER_IRQ 7 | 24 | #define MIPS_CPU_TIMER_IRQ 7 |
26 | 25 | ||
27 | 26 | ||
28 | #define MIPSCPU_INT_CPUCTR 7 | ||
29 | |||
30 | #define MSC01E_INT_BASE 64 | 27 | #define MSC01E_INT_BASE 64 |
31 | 28 | ||
32 | #define MIPSCPU_INT_CPUCTR 7 | ||
33 | #define MSC01E_INT_CPUCTR 11 | 29 | #define MSC01E_INT_CPUCTR 11 |
34 | 30 | ||
35 | #endif | 31 | #endif |