]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
sh: Kill off special boot_cpu_data.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 21 Sep 2007 09:01:40 +0000 (18:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 21 Sep 2007 09:01:40 +0000 (18:01 +0900)
This consolidates the cpu_data definitions and gets rid of the special
boot_cpu_data. It's made a wrapper to the boot CPU, in order to keep
the existing in-tree users happy.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/setup.c
arch/sh/kernel/sh_ksyms.c
include/asm-sh/processor.h

index e0e655cba89c4f83b26db4bd79ce197ef3dca235..cd69b57488dd67b09401db421a7e79a2e16f1daf 100644 (file)
@@ -42,7 +42,13 @@ extern void * __rd_start, * __rd_end;
  * This value will be used at the very early stage of serial setup.
  * The bigger value means no problem.
  */
-struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
+struct sh_cpuinfo cpu_data[NR_CPUS] __read_mostly = {
+       [0] = {
+               .type                   = CPU_SH_NONE,
+               .loops_per_jiffy        = 10000000,
+       },
+};
+EXPORT_SYMBOL(cpu_data);
 
 /*
  * The machine vector. First entry in .machvec.init, or clobbered by
index 89362e05cc462f9053ec38c7802b5cca493e922a..cac7380ed0bb1a53445d0c8864f7ed8557f623b1 100644 (file)
@@ -43,7 +43,6 @@ EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(memmove);
 EXPORT_SYMBOL(__copy_user);
-EXPORT_SYMBOL(boot_cpu_data);
 
 #ifdef CONFIG_MMU
 EXPORT_SYMBOL(get_vm_area);
index 56cb3c89f840f1b3757e64b9f7f5e7ccee361c20..4f2922a1979c5fef654b9444c818123773cd4eab 100644 (file)
@@ -73,15 +73,10 @@ struct sh_cpuinfo {
        unsigned long flags;
 } __attribute__ ((aligned(SMP_CACHE_BYTES)));
 
-extern struct sh_cpuinfo boot_cpu_data;
-
-#ifdef CONFIG_SMP
 extern struct sh_cpuinfo cpu_data[];
+#define boot_cpu_data cpu_data[0]
 #define current_cpu_data cpu_data[smp_processor_id()]
-#else
-#define cpu_data (&boot_cpu_data)
-#define current_cpu_data boot_cpu_data
-#endif
+#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
 
 /*
  * User space process size: 2GB.