aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-04-13 09:37:32 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:05 -0400
commitf03da6e28ea2d20f1a8451869fd1c9ea9935022b (patch)
tree09a2e8041c2d4e1dcf9d35990caef9677db12218
parent589391a0fe229573439994b3be2cc9377722cf3d (diff)
Fix BogoMIPS display on UP and some minor cosmetical things.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/kernel/cpu-probe.c1
-rw-r--r--arch/mips/kernel/smp.c1
-rw-r--r--include/asm-mips/bugs.h5
-rw-r--r--include/asm-mips/delay.h6
4 files changed, 5 insertions, 8 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index ce2966e9eb5a..21ef82de8c5b 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -17,7 +17,6 @@
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19 19
20#include <asm/bugs.h>
21#include <asm/cpu.h> 20#include <asm/cpu.h>
22#include <asm/fpu.h> 21#include <asm/fpu.h>
23#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index d1828ef5ffd6..25762917e822 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -226,7 +226,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
226/* called from main before smp_init() */ 226/* called from main before smp_init() */
227void __init smp_prepare_cpus(unsigned int max_cpus) 227void __init smp_prepare_cpus(unsigned int max_cpus)
228{ 228{
229 cpu_data[0].udelay_val = loops_per_jiffy;
230 init_new_context(current, &init_mm); 229 init_new_context(current, &init_mm);
231 current_thread_info()->cpu = 0; 230 current_thread_info()->cpu = 0;
232 smp_tune_scheduling(); 231 smp_tune_scheduling();
diff --git a/include/asm-mips/bugs.h b/include/asm-mips/bugs.h
index b14b961c2100..9247c1b4ce02 100644
--- a/include/asm-mips/bugs.h
+++ b/include/asm-mips/bugs.h
@@ -8,12 +8,17 @@
8#define _ASM_BUGS_H 8#define _ASM_BUGS_H
9 9
10#include <linux/config.h> 10#include <linux/config.h>
11#include <asm/cpu.h>
12#include <asm/cpu-info.h>
11 13
12extern void check_bugs32(void); 14extern void check_bugs32(void);
13extern void check_bugs64(void); 15extern void check_bugs64(void);
14 16
15static inline void check_bugs(void) 17static inline void check_bugs(void)
16{ 18{
19 unsigned int cpu = smp_processor_id();
20
21 cpu_data[cpu].udelay_val = loops_per_jiffy;
17 check_bugs32(); 22 check_bugs32();
18#ifdef CONFIG_64BIT 23#ifdef CONFIG_64BIT
19 check_bugs64(); 24 check_bugs64();
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h
index a606dbee0412..e906382576e6 100644
--- a/include/asm-mips/delay.h
+++ b/include/asm-mips/delay.h
@@ -15,8 +15,6 @@
15 15
16#include <asm/compiler.h> 16#include <asm/compiler.h>
17 17
18extern unsigned long loops_per_jiffy;
19
20static inline void __delay(unsigned long loops) 18static inline void __delay(unsigned long loops)
21{ 19{
22 if (sizeof(long) == 4) 20 if (sizeof(long) == 4)
@@ -82,11 +80,7 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj)
82 __delay(usecs); 80 __delay(usecs);
83} 81}
84 82
85#ifdef CONFIG_SMP
86#define __udelay_val cpu_data[smp_processor_id()].udelay_val 83#define __udelay_val cpu_data[smp_processor_id()].udelay_val
87#else
88#define __udelay_val loops_per_jiffy
89#endif
90 84
91#define udelay(usecs) __udelay((usecs),__udelay_val) 85#define udelay(usecs) __udelay((usecs),__udelay_val)
92 86