diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 15 | ||||
-rw-r--r-- | arch/mips/ddb5xxx/ddb5477/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/emma2rh/markeins/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/gt64120/ev64120/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/gt64120/wrppmc/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/jazz/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/genex.S | 16 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 2 | ||||
-rw-r--r-- | arch/mips/momentum/ocelot_c/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/philips/pnx8550/common/int.c | 7 | ||||
-rw-r--r-- | arch/mips/qemu/q-smp.c | 7 | ||||
-rw-r--r-- | arch/mips/sgi-ip22/ip22-int.c | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip32/ip32-irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sni/pcimt.c | 2 | ||||
-rw-r--r-- | arch/mips/sni/pcit.c | 4 | ||||
-rw-r--r-- | arch/mips/tx4927/common/tx4927_irq.c | 2 |
17 files changed, 49 insertions, 24 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5f29018a6533..656f0ca52782 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -542,6 +542,8 @@ config QEMU | |||
542 | select SYS_SUPPORTS_LITTLE_ENDIAN | 542 | select SYS_SUPPORTS_LITTLE_ENDIAN |
543 | select ARCH_SPARSEMEM_ENABLE | 543 | select ARCH_SPARSEMEM_ENABLE |
544 | select GENERIC_HARDIRQS_NO__DO_IRQ | 544 | select GENERIC_HARDIRQS_NO__DO_IRQ |
545 | select NR_CPUS_DEFAULT_1 | ||
546 | select SYS_SUPPORTS_SMP | ||
545 | help | 547 | help |
546 | Qemu is a software emulator which among other architectures also | 548 | Qemu is a software emulator which among other architectures also |
547 | can simulate a MIPS32 4Kc system. This patch adds support for the | 549 | can simulate a MIPS32 4Kc system. This patch adds support for the |
@@ -1805,6 +1807,9 @@ config SMP | |||
1805 | config SYS_SUPPORTS_SMP | 1807 | config SYS_SUPPORTS_SMP |
1806 | bool | 1808 | bool |
1807 | 1809 | ||
1810 | config NR_CPUS_DEFAULT_1 | ||
1811 | bool | ||
1812 | |||
1808 | config NR_CPUS_DEFAULT_2 | 1813 | config NR_CPUS_DEFAULT_2 |
1809 | bool | 1814 | bool |
1810 | 1815 | ||
@@ -1825,8 +1830,9 @@ config NR_CPUS_DEFAULT_64 | |||
1825 | 1830 | ||
1826 | config NR_CPUS | 1831 | config NR_CPUS |
1827 | int "Maximum number of CPUs (2-64)" | 1832 | int "Maximum number of CPUs (2-64)" |
1828 | range 2 64 | 1833 | range 1 64 if NR_CPUS_DEFAULT_1 |
1829 | depends on SMP | 1834 | depends on SMP |
1835 | default "1" if NR_CPUS_DEFAULT_1 | ||
1830 | default "2" if NR_CPUS_DEFAULT_2 | 1836 | default "2" if NR_CPUS_DEFAULT_2 |
1831 | default "4" if NR_CPUS_DEFAULT_4 | 1837 | default "4" if NR_CPUS_DEFAULT_4 |
1832 | default "8" if NR_CPUS_DEFAULT_8 | 1838 | default "8" if NR_CPUS_DEFAULT_8 |
@@ -1837,10 +1843,13 @@ config NR_CPUS | |||
1837 | This allows you to specify the maximum number of CPUs which this | 1843 | This allows you to specify the maximum number of CPUs which this |
1838 | kernel will support. The maximum supported value is 32 for 32-bit | 1844 | kernel will support. The maximum supported value is 32 for 32-bit |
1839 | kernel and 64 for 64-bit kernels; the minimum value which makes | 1845 | kernel and 64 for 64-bit kernels; the minimum value which makes |
1840 | sense is 2. | 1846 | sense is 1 for Qemu (useful only for kernel debugging purposes) |
1847 | and 2 for all others. | ||
1841 | 1848 | ||
1842 | This is purely to save memory - each supported CPU adds | 1849 | This is purely to save memory - each supported CPU adds |
1843 | approximately eight kilobytes to the kernel image. | 1850 | approximately eight kilobytes to the kernel image. For best |
1851 | performance should round up your number of processors to the next | ||
1852 | power of two. | ||
1844 | 1853 | ||
1845 | # | 1854 | # |
1846 | # Timer Interrupt Frequency Configuration | 1855 | # Timer Interrupt Frequency Configuration |
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c index 2b23234a5b95..faa4a506bf82 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq.c +++ b/arch/mips/ddb5xxx/ddb5477/irq.c | |||
@@ -194,7 +194,7 @@ static void vrc5477_irq_dispatch(void) | |||
194 | 194 | ||
195 | asmlinkage void plat_irq_dispatch(void) | 195 | asmlinkage void plat_irq_dispatch(void) |
196 | { | 196 | { |
197 | unsigned int pending = read_c0_cause() & read_c0_status(); | 197 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; |
198 | 198 | ||
199 | if (pending & STATUSF_IP7) | 199 | if (pending & STATUSF_IP7) |
200 | do_IRQ(CPU_IRQ_BASE + 7); | 200 | do_IRQ(CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c index e26630026375..6bcf6a06367a 100644 --- a/arch/mips/emma2rh/markeins/irq.c +++ b/arch/mips/emma2rh/markeins/irq.c | |||
@@ -115,7 +115,7 @@ void __init arch_init_irq(void) | |||
115 | 115 | ||
116 | asmlinkage void plat_irq_dispatch(void) | 116 | asmlinkage void plat_irq_dispatch(void) |
117 | { | 117 | { |
118 | unsigned int pending = read_c0_status() & read_c0_cause(); | 118 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
119 | 119 | ||
120 | if (pending & STATUSF_IP7) | 120 | if (pending & STATUSF_IP7) |
121 | do_IRQ(CPU_IRQ_BASE + 7); | 121 | do_IRQ(CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c index 04572b9c9642..64e4c80b6139 100644 --- a/arch/mips/gt64120/ev64120/irq.c +++ b/arch/mips/gt64120/ev64120/irq.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | asmlinkage void plat_irq_dispatch(void) | 49 | asmlinkage void plat_irq_dispatch(void) |
50 | { | 50 | { |
51 | unsigned int pending = read_c0_status() & read_c0_cause(); | 51 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
52 | 52 | ||
53 | if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ | 53 | if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ |
54 | do_IRQ(4); | 54 | do_IRQ(4); |
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c index d3d96591780e..06177bf5b1d6 100644 --- a/arch/mips/gt64120/wrppmc/irq.c +++ b/arch/mips/gt64120/wrppmc/irq.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | asmlinkage void plat_irq_dispatch(void) | 33 | asmlinkage void plat_irq_dispatch(void) |
34 | { | 34 | { |
35 | unsigned int pending = read_c0_status() & read_c0_cause(); | 35 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
36 | 36 | ||
37 | if (pending & STATUSF_IP7) | 37 | if (pending & STATUSF_IP7) |
38 | do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ | 38 | do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */ |
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c index 295892e4ce53..015cf4bb51dd 100644 --- a/arch/mips/jazz/irq.c +++ b/arch/mips/jazz/irq.c | |||
@@ -122,7 +122,7 @@ static void ll_local_dev(void) | |||
122 | 122 | ||
123 | asmlinkage void plat_irq_dispatch(void) | 123 | asmlinkage void plat_irq_dispatch(void) |
124 | { | 124 | { |
125 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; | 125 | unsigned int pending = read_c0_cause() & read_c0_status(); |
126 | 126 | ||
127 | if (pending & IE_IRQ5) | 127 | if (pending & IE_IRQ5) |
128 | write_c0_compare(0); | 128 | write_c0_compare(0); |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index aacd4a005c5f..83843a229be7 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -181,13 +181,13 @@ NESTED(except_vec_vi, 0, sp) | |||
181 | * during service by SMTC kernel, we also want to | 181 | * during service by SMTC kernel, we also want to |
182 | * pass the IM value to be cleared. | 182 | * pass the IM value to be cleared. |
183 | */ | 183 | */ |
184 | EXPORT(except_vec_vi_mori) | 184 | FEXPORT(except_vec_vi_mori) |
185 | ori a0, $0, 0 | 185 | ori a0, $0, 0 |
186 | #endif /* CONFIG_MIPS_MT_SMTC */ | 186 | #endif /* CONFIG_MIPS_MT_SMTC */ |
187 | EXPORT(except_vec_vi_lui) | 187 | FEXPORT(except_vec_vi_lui) |
188 | lui v0, 0 /* Patched */ | 188 | lui v0, 0 /* Patched */ |
189 | j except_vec_vi_handler | 189 | j except_vec_vi_handler |
190 | EXPORT(except_vec_vi_ori) | 190 | FEXPORT(except_vec_vi_ori) |
191 | ori v0, 0 /* Patched */ | 191 | ori v0, 0 /* Patched */ |
192 | .set pop | 192 | .set pop |
193 | END(except_vec_vi) | 193 | END(except_vec_vi) |
@@ -220,7 +220,17 @@ NESTED(except_vec_vi_handler, 0, sp) | |||
220 | _ehb | 220 | _ehb |
221 | #endif /* CONFIG_MIPS_MT_SMTC */ | 221 | #endif /* CONFIG_MIPS_MT_SMTC */ |
222 | CLI | 222 | CLI |
223 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
224 | move s0, v0 | ||
225 | #ifdef CONFIG_MIPS_MT_SMTC | ||
226 | move s1, a0 | ||
227 | #endif | ||
223 | TRACE_IRQS_OFF | 228 | TRACE_IRQS_OFF |
229 | #ifdef CONFIG_MIPS_MT_SMTC | ||
230 | move a0, s1 | ||
231 | #endif | ||
232 | move v0, s0 | ||
233 | #endif | ||
224 | 234 | ||
225 | LONG_L s0, TI_REGS($28) | 235 | LONG_L s0, TI_REGS($28) |
226 | LONG_S sp, TI_REGS($28) | 236 | LONG_S sp, TI_REGS($28) |
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 1acdf091c258..88e9c2a7a2f9 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -145,7 +145,7 @@ static void __init console_config(void) | |||
145 | char parity = '\0', bits = '\0', flow = '\0'; | 145 | char parity = '\0', bits = '\0', flow = '\0'; |
146 | char *s; | 146 | char *s; |
147 | 147 | ||
148 | if ((strstr(prom_getcmdline(), "console=ttyS")) == NULL) { | 148 | if ((strstr(prom_getcmdline(), "console=")) == NULL) { |
149 | s = prom_getenv("modetty0"); | 149 | s = prom_getenv("modetty0"); |
150 | if (s) { | 150 | if (s) { |
151 | while (*s >= '0' && *s <= '9') | 151 | while (*s >= '0' && *s <= '9') |
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c index 40472f7944d7..844d566c9de3 100644 --- a/arch/mips/momentum/ocelot_c/irq.c +++ b/arch/mips/momentum/ocelot_c/irq.c | |||
@@ -64,7 +64,7 @@ extern void ll_cpci_irq(void); | |||
64 | 64 | ||
65 | asmlinkage void plat_irq_dispatch(void) | 65 | asmlinkage void plat_irq_dispatch(void) |
66 | { | 66 | { |
67 | unsigned int pending = read_c0_cause() & read_c0_status(); | 67 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; |
68 | 68 | ||
69 | if (pending & STATUSF_IP0) | 69 | if (pending & STATUSF_IP0) |
70 | do_IRQ(0); | 70 | do_IRQ(0); |
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c index b1c4805a0b92..aad03429a5e3 100644 --- a/arch/mips/philips/pnx8550/common/int.c +++ b/arch/mips/philips/pnx8550/common/int.c | |||
@@ -83,16 +83,15 @@ static void timer_irqdispatch(int irq) | |||
83 | 83 | ||
84 | asmlinkage void plat_irq_dispatch(void) | 84 | asmlinkage void plat_irq_dispatch(void) |
85 | { | 85 | { |
86 | unsigned int pending = read_c0_status() & read_c0_cause(); | 86 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
87 | 87 | ||
88 | if (pending & STATUSF_IP2) | 88 | if (pending & STATUSF_IP2) |
89 | hw0_irqdispatch(2); | 89 | hw0_irqdispatch(2); |
90 | else if (pending & STATUSF_IP7) { | 90 | else if (pending & STATUSF_IP7) { |
91 | if (read_c0_config7() & 0x01c0) | 91 | if (read_c0_config7() & 0x01c0) |
92 | timer_irqdispatch(7); | 92 | timer_irqdispatch(7); |
93 | } | 93 | } else |
94 | 94 | spurious_interrupt(); | |
95 | spurious_interrupt(); | ||
96 | } | 95 | } |
97 | 96 | ||
98 | static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) | 97 | static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) |
diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c index 5a12354cd576..786bbfa214d1 100644 --- a/arch/mips/qemu/q-smp.c +++ b/arch/mips/qemu/q-smp.c | |||
@@ -46,3 +46,10 @@ void __init prom_prepare_cpus(unsigned int max_cpus) | |||
46 | void prom_boot_secondary(int cpu, struct task_struct *idle) | 46 | void prom_boot_secondary(int cpu, struct task_struct *idle) |
47 | { | 47 | { |
48 | } | 48 | } |
49 | |||
50 | void __init plat_smp_setup(void) | ||
51 | { | ||
52 | } | ||
53 | void __init plat_prepare_cpus(unsigned int max_cpus) | ||
54 | { | ||
55 | } | ||
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index b454924aeb56..18348321795d 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -237,7 +237,7 @@ extern void indy_8254timer_irq(void); | |||
237 | 237 | ||
238 | asmlinkage void plat_irq_dispatch(void) | 238 | asmlinkage void plat_irq_dispatch(void) |
239 | { | 239 | { |
240 | unsigned int pending = read_c0_cause(); | 240 | unsigned int pending = read_c0_status() & read_c0_cause(); |
241 | 241 | ||
242 | /* | 242 | /* |
243 | * First we check for r4k counter/timer IRQ. | 243 | * First we check for r4k counter/timer IRQ. |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index 8c450d9e8696..fb9da9acf53f 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -454,7 +454,7 @@ static void ip32_irq5(void) | |||
454 | 454 | ||
455 | asmlinkage void plat_irq_dispatch(void) | 455 | asmlinkage void plat_irq_dispatch(void) |
456 | { | 456 | { |
457 | unsigned int pending = read_c0_cause(); | 457 | unsigned int pending = read_c0_status() & read_c0_cause(); |
458 | 458 | ||
459 | if (likely(pending & IE_IRQ0)) | 459 | if (likely(pending & IE_IRQ0)) |
460 | ip32_irq0(); | 460 | ip32_irq0(); |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 148239446e6e..0e6a13c0bd0e 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -421,7 +421,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
421 | * blasting the high 32 bits. | 421 | * blasting the high 32 bits. |
422 | */ | 422 | */ |
423 | 423 | ||
424 | pending = read_c0_cause() & read_c0_status(); | 424 | pending = read_c0_cause() & read_c0_status() & ST0_IM; |
425 | 425 | ||
426 | #ifdef CONFIG_SIBYTE_SB1250_PROF | 426 | #ifdef CONFIG_SIBYTE_SB1250_PROF |
427 | if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ | 427 | if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index 39e5b4abc555..8e8593b64f6a 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -333,7 +333,7 @@ static void pcimt_hwint3(void) | |||
333 | 333 | ||
334 | static void sni_pcimt_hwint(void) | 334 | static void sni_pcimt_hwint(void) |
335 | { | 335 | { |
336 | u32 pending = (read_c0_cause() & read_c0_status()); | 336 | u32 pending = read_c0_cause() & read_c0_status(); |
337 | 337 | ||
338 | if (pending & C_IRQ5) | 338 | if (pending & C_IRQ5) |
339 | do_IRQ (MIPS_CPU_IRQ_BASE + 7); | 339 | do_IRQ (MIPS_CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c index 8d6b3d5b13a1..1dfc3f00bbd3 100644 --- a/arch/mips/sni/pcit.c +++ b/arch/mips/sni/pcit.c | |||
@@ -271,7 +271,7 @@ static void pcit_hwint0(void) | |||
271 | 271 | ||
272 | static void sni_pcit_hwint(void) | 272 | static void sni_pcit_hwint(void) |
273 | { | 273 | { |
274 | u32 pending = (read_c0_cause() & read_c0_status()); | 274 | u32 pending = read_c0_cause() & read_c0_status(); |
275 | 275 | ||
276 | if (pending & C_IRQ1) | 276 | if (pending & C_IRQ1) |
277 | pcit_hwint1(); | 277 | pcit_hwint1(); |
@@ -285,7 +285,7 @@ static void sni_pcit_hwint(void) | |||
285 | 285 | ||
286 | static void sni_pcit_hwint_cplus(void) | 286 | static void sni_pcit_hwint_cplus(void) |
287 | { | 287 | { |
288 | u32 pending = (read_c0_cause() & read_c0_status()); | 288 | u32 pending = read_c0_cause() & read_c0_status(); |
289 | 289 | ||
290 | if (pending & C_IRQ0) | 290 | if (pending & C_IRQ0) |
291 | pcit_hwint0(); | 291 | pcit_hwint0(); |
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c index e7f3e5b84dcf..3d25d010f3d5 100644 --- a/arch/mips/tx4927/common/tx4927_irq.c +++ b/arch/mips/tx4927/common/tx4927_irq.c | |||
@@ -416,7 +416,7 @@ static int tx4927_irq_nested(void) | |||
416 | 416 | ||
417 | asmlinkage void plat_irq_dispatch(void) | 417 | asmlinkage void plat_irq_dispatch(void) |
418 | { | 418 | { |
419 | unsigned int pending = read_c0_status() & read_c0_cause(); | 419 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
420 | 420 | ||
421 | if (pending & STATUSF_IP7) /* cpu timer */ | 421 | if (pending & STATUSF_IP7) /* cpu timer */ |
422 | do_IRQ(TX4927_IRQ_CPU_TIMER); | 422 | do_IRQ(TX4927_IRQ_CPU_TIMER); |