From f03da6e28ea2d20f1a8451869fd1c9ea9935022b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 13 Apr 2005 13:37:32 +0000 Subject: [PATCH] Fix BogoMIPS display on UP and some minor cosmetical things. Signed-off-by: Ralf Baechle --- arch/mips/kernel/cpu-probe.c | 1 - arch/mips/kernel/smp.c | 1 - include/asm-mips/bugs.h | 5 +++++ include/asm-mips/delay.h | 6 ------ 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 @@ #include #include -#include #include #include #include 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) /* 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(); 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 @@ #define _ASM_BUGS_H #include +#include +#include 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(); 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 @@ #include -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) -- 2.20.1