Fix BogoMIPS display on UP and some minor cosmetical things.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 13 Apr 2005 13:37:32 +0000 (13:37 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:31:05 +0000 (19:31 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/smp.c
include/asm-mips/bugs.h
include/asm-mips/delay.h

index ce2966e9eb5a332a233a4debd256b7955d5402b0..21ef82de8c5ba6b68dc007373c7cfeecd3c39d4d 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/ptrace.h>
 #include <linux/stddef.h>
 
-#include <asm/bugs.h>
 #include <asm/cpu.h>
 #include <asm/fpu.h>
 #include <asm/mipsregs.h>
index d1828ef5ffd687670ad0a77b37115396fa59e4fe..25762917e8222cc468d5551675f462b9924102fa 100644 (file)
@@ -226,7 +226,6 @@ void __init smp_cpus_done(unsigned int max_cpus)
 /* called from main before smp_init() */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-       cpu_data[0].udelay_val = loops_per_jiffy;
        init_new_context(current, &init_mm);
        current_thread_info()->cpu = 0;
        smp_tune_scheduling();
index b14b961c2100c4394305023f0621c50caf3fef31..9247c1b4ce02cf8a183cfe5b0a00d87fed0207d5 100644 (file)
@@ -8,12 +8,17 @@
 #define _ASM_BUGS_H
 
 #include <linux/config.h>
+#include <asm/cpu.h>
+#include <asm/cpu-info.h>
 
 extern void check_bugs32(void);
 extern void check_bugs64(void);
 
 static inline void check_bugs(void)
 {
+       unsigned int cpu = smp_processor_id();
+
+       cpu_data[cpu].udelay_val = loops_per_jiffy;
        check_bugs32();
 #ifdef CONFIG_64BIT
        check_bugs64();
index a606dbee0412a4be05efc66b370a3b1987b10323..e906382576e6751c5a41ae6007c9e3314dbf21fa 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <asm/compiler.h>
 
-extern unsigned long loops_per_jiffy;
-
 static inline void __delay(unsigned long loops)
 {
        if (sizeof(long) == 4)
@@ -82,11 +80,7 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj)
        __delay(usecs);
 }
 
-#ifdef CONFIG_SMP
 #define __udelay_val cpu_data[smp_processor_id()].udelay_val
-#else
-#define __udelay_val loops_per_jiffy
-#endif
 
 #define udelay(usecs) __udelay((usecs),__udelay_val)