aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/cpu-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r--arch/mips/kernel/cpu-probe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 11c92dc53791..0cf15457ecac 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -21,6 +21,7 @@
21#include <asm/fpu.h> 21#include <asm/fpu.h>
22#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/watch.h>
24 25
25/* 26/*
26 * Not all of the MIPS CPUs have the "wait" instruction available. Moreover, 27 * Not all of the MIPS CPUs have the "wait" instruction available. Moreover,
@@ -54,14 +55,18 @@ extern void r4k_wait(void);
54 * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes 55 * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes
55 * using this version a gamble. 56 * using this version a gamble.
56 */ 57 */
57static void r4k_wait_irqoff(void) 58void r4k_wait_irqoff(void)
58{ 59{
59 local_irq_disable(); 60 local_irq_disable();
60 if (!need_resched()) 61 if (!need_resched())
61 __asm__(" .set mips3 \n" 62 __asm__(" .set push \n"
63 " .set mips3 \n"
62 " wait \n" 64 " wait \n"
63 " .set mips0 \n"); 65 " .set pop \n");
64 local_irq_enable(); 66 local_irq_enable();
67 __asm__(" .globl __pastwait \n"
68 "__pastwait: \n");
69 return;
65} 70}
66 71
67/* 72/*
@@ -673,6 +678,7 @@ static inline void spram_config(void) {}
673static inline void cpu_probe_mips(struct cpuinfo_mips *c) 678static inline void cpu_probe_mips(struct cpuinfo_mips *c)
674{ 679{
675 decode_configs(c); 680 decode_configs(c);
681 mips_probe_watch_registers(c);
676 switch (c->processor_id & 0xff00) { 682 switch (c->processor_id & 0xff00) {
677 case PRID_IMP_4KC: 683 case PRID_IMP_4KC:
678 c->cputype = CPU_4KC; 684 c->cputype = CPU_4KC;