diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
commit | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch) | |
tree | 5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/kernel/cpu-bugs64.c | |
parent | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff) | |
parent | a9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits)
[MIPS] remove Documentation/mips/GT64120.README
[MIPS] Malta: remaining bits of the board support code cleanup
[MIPS] Malta: make the helper function static
[MIPS] Malta: fix braces at single statement blocks
[MIPS] Malta, Atlas: move an extern function declaration to the header file
[MIPS] Malta: Use C89 style for comments
[MIPS] Malta: else should follow close brace in malta_int.c
[MIPS] Malta: remove a superfluous comment
[MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
[MIPS] Malta, Atlas, Sead: remove an extern from .c files
[MIPS] Malta: fix oversized lines in malta_int.c
[MIPS] Malta: remove a dead function declaration
[MIPS] Malta: use tabs not spaces
[MIPS] Malta: set up the screen info in a separate function
[MIPS] Malta: check the PCI clock frequency in a separate function
[MIPS] Malta: use the KERN_ facility level in printk()
[MIPS] Malta: use Linux kernel style for structure initialization
[MIPS]: constify function pointer tables
[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64
[MIPS] Cobalt 64-bits kernels can be safely unmarked experimental
...
Diffstat (limited to 'arch/mips/kernel/cpu-bugs64.c')
-rw-r--r-- | arch/mips/kernel/cpu-bugs64.c | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index af78456d4138..417bb3e336ac 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -18,6 +18,15 @@ | |||
18 | #include <asm/mipsregs.h> | 18 | #include <asm/mipsregs.h> |
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | 20 | ||
21 | static char bug64hit[] __initdata = | ||
22 | "reliable operation impossible!\n%s"; | ||
23 | static char nowar[] __initdata = | ||
24 | "Please report to <linux-mips@linux-mips.org>."; | ||
25 | static char r4kwar[] __initdata = | ||
26 | "Enable CPU_R4000_WORKAROUNDS to rectify."; | ||
27 | static char daddiwar[] __initdata = | ||
28 | "Enable CPU_DADDI_WORKAROUNDS to rectify."; | ||
29 | |||
21 | static inline void align_mod(const int align, const int mod) | 30 | static inline void align_mod(const int align, const int mod) |
22 | { | 31 | { |
23 | asm volatile( | 32 | asm volatile( |
@@ -155,13 +164,7 @@ static inline void check_mult_sh(void) | |||
155 | } | 164 | } |
156 | 165 | ||
157 | printk("no.\n"); | 166 | printk("no.\n"); |
158 | panic("Reliable operation impossible!\n" | 167 | panic(bug64hit, !R4000_WAR ? r4kwar : nowar); |
159 | #ifndef CONFIG_CPU_R4000 | ||
160 | "Configure for R4000 to enable the workaround." | ||
161 | #else | ||
162 | "Please report to <linux-mips@linux-mips.org>." | ||
163 | #endif | ||
164 | ); | ||
165 | } | 168 | } |
166 | 169 | ||
167 | static volatile int daddi_ov __initdata = 0; | 170 | static volatile int daddi_ov __initdata = 0; |
@@ -233,15 +236,11 @@ static inline void check_daddi(void) | |||
233 | } | 236 | } |
234 | 237 | ||
235 | printk("no.\n"); | 238 | printk("no.\n"); |
236 | panic("Reliable operation impossible!\n" | 239 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); |
237 | #if !defined(CONFIG_CPU_R4000) && !defined(CONFIG_CPU_R4400) | ||
238 | "Configure for R4000 or R4400 to enable the workaround." | ||
239 | #else | ||
240 | "Please report to <linux-mips@linux-mips.org>." | ||
241 | #endif | ||
242 | ); | ||
243 | } | 240 | } |
244 | 241 | ||
242 | int daddiu_bug __initdata = -1; | ||
243 | |||
245 | static inline void check_daddiu(void) | 244 | static inline void check_daddiu(void) |
246 | { | 245 | { |
247 | long v, w, tmp; | 246 | long v, w, tmp; |
@@ -281,7 +280,9 @@ static inline void check_daddiu(void) | |||
281 | : "=&r" (v), "=&r" (w), "=&r" (tmp) | 280 | : "=&r" (v), "=&r" (w), "=&r" (tmp) |
282 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); | 281 | : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); |
283 | 282 | ||
284 | if (v == w) { | 283 | daddiu_bug = v != w; |
284 | |||
285 | if (!daddiu_bug) { | ||
285 | printk("no.\n"); | 286 | printk("no.\n"); |
286 | return; | 287 | return; |
287 | } | 288 | } |
@@ -303,18 +304,16 @@ static inline void check_daddiu(void) | |||
303 | } | 304 | } |
304 | 305 | ||
305 | printk("no.\n"); | 306 | printk("no.\n"); |
306 | panic("Reliable operation impossible!\n" | 307 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); |
307 | #if !defined(CONFIG_CPU_R4000) && !defined(CONFIG_CPU_R4400) | ||
308 | "Configure for R4000 or R4400 to enable the workaround." | ||
309 | #else | ||
310 | "Please report to <linux-mips@linux-mips.org>." | ||
311 | #endif | ||
312 | ); | ||
313 | } | 308 | } |
314 | 309 | ||
315 | void __init check_bugs64(void) | 310 | void __init check_bugs64_early(void) |
316 | { | 311 | { |
317 | check_mult_sh(); | 312 | check_mult_sh(); |
318 | check_daddi(); | ||
319 | check_daddiu(); | 313 | check_daddiu(); |
320 | } | 314 | } |
315 | |||
316 | void __init check_bugs64(void) | ||
317 | { | ||
318 | check_daddi(); | ||
319 | } | ||