diff options
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 335a6ae3d594..e621fda8ab37 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -45,18 +45,7 @@ static void r39xx_wait(void) | |||
45 | local_irq_enable(); | 45 | local_irq_enable(); |
46 | } | 46 | } |
47 | 47 | ||
48 | /* | 48 | extern void r4k_wait(void); |
49 | * There is a race when WAIT instruction executed with interrupt | ||
50 | * enabled. | ||
51 | * But it is implementation-dependent wheter the pipelie restarts when | ||
52 | * a non-enabled interrupt is requested. | ||
53 | */ | ||
54 | static void r4k_wait(void) | ||
55 | { | ||
56 | __asm__(" .set mips3 \n" | ||
57 | " wait \n" | ||
58 | " .set mips0 \n"); | ||
59 | } | ||
60 | 49 | ||
61 | /* | 50 | /* |
62 | * This variant is preferable as it allows testing need_resched and going to | 51 | * This variant is preferable as it allows testing need_resched and going to |
@@ -65,14 +54,18 @@ static void r4k_wait(void) | |||
65 | * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes | 54 | * interrupt is requested" restriction in the MIPS32/MIPS64 architecture makes |
66 | * using this version a gamble. | 55 | * using this version a gamble. |
67 | */ | 56 | */ |
68 | static void r4k_wait_irqoff(void) | 57 | void r4k_wait_irqoff(void) |
69 | { | 58 | { |
70 | local_irq_disable(); | 59 | local_irq_disable(); |
71 | if (!need_resched()) | 60 | if (!need_resched()) |
72 | __asm__(" .set mips3 \n" | 61 | __asm__(" .set push \n" |
62 | " .set mips3 \n" | ||
73 | " wait \n" | 63 | " wait \n" |
74 | " .set mips0 \n"); | 64 | " .set pop \n"); |
75 | local_irq_enable(); | 65 | local_irq_enable(); |
66 | __asm__(" .globl __pastwait \n" | ||
67 | "__pastwait: \n"); | ||
68 | return; | ||
76 | } | 69 | } |
77 | 70 | ||
78 | /* | 71 | /* |
@@ -128,7 +121,7 @@ static int __init wait_disable(char *s) | |||
128 | 121 | ||
129 | __setup("nowait", wait_disable); | 122 | __setup("nowait", wait_disable); |
130 | 123 | ||
131 | static inline void check_wait(void) | 124 | void __init check_wait(void) |
132 | { | 125 | { |
133 | struct cpuinfo_mips *c = ¤t_cpu_data; | 126 | struct cpuinfo_mips *c = ¤t_cpu_data; |
134 | 127 | ||
@@ -242,7 +235,6 @@ static inline void check_errata(void) | |||
242 | 235 | ||
243 | void __init check_bugs32(void) | 236 | void __init check_bugs32(void) |
244 | { | 237 | { |
245 | check_wait(); | ||
246 | check_errata(); | 238 | check_errata(); |
247 | } | 239 | } |
248 | 240 | ||