sh: Tidy CPU probing and fixup section annotations.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 21 Apr 2010 03:01:06 +0000 (12:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 21 Apr 2010 03:01:06 +0000 (12:01 +0900)
This does a detect_cpu_and_cache_system() -> cpu_probe() rename, tidies
up the unused return value, and stuffs it under __cpuinit in preparation
for CPU hotplug.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/cache.h
arch/sh/include/asm/processor.h
arch/sh/kernel/cpu/init.c
arch/sh/kernel/cpu/sh2/probe.c
arch/sh/kernel/cpu/sh2a/probe.c
arch/sh/kernel/cpu/sh3/probe.c
arch/sh/kernel/cpu/sh4/probe.c
arch/sh/kernel/cpu/sh5/probe.c

index 02df18e..e461d67 100644 (file)
@@ -38,14 +38,10 @@ struct cache_info {
         * 2. those in the physical page number.
         */
        unsigned int alias_mask;
-
        unsigned int n_aliases;         /* Number of aliases */
 
        unsigned long flags;
 };
-
-int __init detect_cpu_and_cache_system(void);
-
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
 #endif /* __ASM_SH_CACHE_H */
index 9605e06..c2be225 100644 (file)
@@ -102,6 +102,8 @@ struct task_struct;
 
 extern struct pt_regs fake_swapper_regs;
 
+extern void cpu_probe(void);
+
 /* arch/sh/kernel/process.c */
 extern unsigned int xstate_size;
 extern void free_thread_xstate(struct task_struct *);
index c736422..ffaa00a 100644 (file)
@@ -293,14 +293,14 @@ static inline void __init dsp_init(void) { }
  * subtype and initial configuration will all be done.
  *
  * Each processor family is still responsible for doing its own probing
- * and cache configuration in detect_cpu_and_cache_system().
+ * and cache configuration in cpu_probe().
  */
 asmlinkage void __init sh_cpu_init(void)
 {
        current_thread_info()->cpu = hard_smp_processor_id();
 
        /* First, probe the CPU */
-       detect_cpu_and_cache_system();
+       cpu_probe();
 
        if (current_cpu_data.type == CPU_SH_NONE)
                panic("Unknown CPU");
index 1db6d88..bab8e75 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/processor.h>
 #include <asm/cache.h>
 
-int __init detect_cpu_and_cache_system(void)
+void __cpuinit cpu_probe(void)
 {
 #if defined(CONFIG_CPU_SUBTYPE_SH7619)
        boot_cpu_data.type                      = CPU_SH7619;
@@ -30,7 +30,4 @@ int __init detect_cpu_and_cache_system(void)
        boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
        boot_cpu_data.icache = boot_cpu_data.dcache;
        boot_cpu_data.family = CPU_FAMILY_SH2;
-
-       return 0;
 }
-
index 6825d65..48e97a2 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/processor.h>
 #include <asm/cache.h>
 
-int __init detect_cpu_and_cache_system(void)
+void __cpuinit cpu_probe(void)
 {
        boot_cpu_data.family                    = CPU_FAMILY_SH2A;
 
@@ -51,6 +51,4 @@ int __init detect_cpu_and_cache_system(void)
         * on the cache info.
         */
        boot_cpu_data.icache            = boot_cpu_data.dcache;
-
-       return 0;
 }
index 295ec4c..bf23c32 100644 (file)
@@ -16,7 +16,7 @@
 #include <asm/cache.h>
 #include <asm/io.h>
 
-int detect_cpu_and_cache_system(void)
+void __cpuinit cpu_probe(void)
 {
        unsigned long addr0, addr1, data0, data1, data2, data3;
 
@@ -108,6 +108,4 @@ int detect_cpu_and_cache_system(void)
        boot_cpu_data.icache = boot_cpu_data.dcache;
 
        boot_cpu_data.family = CPU_FAMILY_SH3;
-
-       return 0;
 }
index 822977a..d180f16 100644 (file)
@@ -15,7 +15,7 @@
 #include <asm/processor.h>
 #include <asm/cache.h>
 
-int __init detect_cpu_and_cache_system(void)
+void __cpuinit cpu_probe(void)
 {
        unsigned long pvr, prr, cvr;
        unsigned long size;
@@ -251,6 +251,4 @@ int __init detect_cpu_and_cache_system(void)
                                 boot_cpu_data.scache.linesz);
                }
        }
-
-       return 0;
 }
index 521d05b..9e88240 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/cache.h>
 #include <asm/tlb.h>
 
-int __init detect_cpu_and_cache_system(void)
+void __cpuinit cpu_probe(void)
 {
        unsigned long long cir;
 
@@ -72,6 +72,4 @@ int __init detect_cpu_and_cache_system(void)
 
        /* Setup some I/D TLB defaults */
        sh64_tlb_init();
-
-       return 0;
 }