diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-20 23:01:06 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-20 23:01:06 -0400 |
commit | a9079ca0cb15feda15e7a380092e02d5cd834148 (patch) | |
tree | fc47ebb5c005b21aafd1149cab98af09ea247282 /arch/sh/kernel/cpu | |
parent | 3bd16668872b5ad0afb22f15ef6c800a8faf7532 (diff) |
sh: Tidy CPU probing and fixup section annotations.
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>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r-- | arch/sh/kernel/cpu/init.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh2/probe.c | 5 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/probe.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/probe.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/probe.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh5/probe.c | 4 |
6 files changed, 7 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c index c736422344eb..ffaa00a2216b 100644 --- a/arch/sh/kernel/cpu/init.c +++ b/arch/sh/kernel/cpu/init.c | |||
@@ -293,14 +293,14 @@ static inline void __init dsp_init(void) { } | |||
293 | * subtype and initial configuration will all be done. | 293 | * subtype and initial configuration will all be done. |
294 | * | 294 | * |
295 | * Each processor family is still responsible for doing its own probing | 295 | * Each processor family is still responsible for doing its own probing |
296 | * and cache configuration in detect_cpu_and_cache_system(). | 296 | * and cache configuration in cpu_probe(). |
297 | */ | 297 | */ |
298 | asmlinkage void __init sh_cpu_init(void) | 298 | asmlinkage void __init sh_cpu_init(void) |
299 | { | 299 | { |
300 | current_thread_info()->cpu = hard_smp_processor_id(); | 300 | current_thread_info()->cpu = hard_smp_processor_id(); |
301 | 301 | ||
302 | /* First, probe the CPU */ | 302 | /* First, probe the CPU */ |
303 | detect_cpu_and_cache_system(); | 303 | cpu_probe(); |
304 | 304 | ||
305 | if (current_cpu_data.type == CPU_SH_NONE) | 305 | if (current_cpu_data.type == CPU_SH_NONE) |
306 | panic("Unknown CPU"); | 306 | panic("Unknown CPU"); |
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c index 1db6d8883888..bab8e75958ae 100644 --- a/arch/sh/kernel/cpu/sh2/probe.c +++ b/arch/sh/kernel/cpu/sh2/probe.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
15 | 15 | ||
16 | int __init detect_cpu_and_cache_system(void) | 16 | void __cpuinit cpu_probe(void) |
17 | { | 17 | { |
18 | #if defined(CONFIG_CPU_SUBTYPE_SH7619) | 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7619) |
19 | boot_cpu_data.type = CPU_SH7619; | 19 | boot_cpu_data.type = CPU_SH7619; |
@@ -30,7 +30,4 @@ int __init detect_cpu_and_cache_system(void) | |||
30 | boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; | 30 | boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; |
31 | boot_cpu_data.icache = boot_cpu_data.dcache; | 31 | boot_cpu_data.icache = boot_cpu_data.dcache; |
32 | boot_cpu_data.family = CPU_FAMILY_SH2; | 32 | boot_cpu_data.family = CPU_FAMILY_SH2; |
33 | |||
34 | return 0; | ||
35 | } | 33 | } |
36 | |||
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c index 6825d6507164..48e97a2a0c8d 100644 --- a/arch/sh/kernel/cpu/sh2a/probe.c +++ b/arch/sh/kernel/cpu/sh2a/probe.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
15 | 15 | ||
16 | int __init detect_cpu_and_cache_system(void) | 16 | void __cpuinit cpu_probe(void) |
17 | { | 17 | { |
18 | boot_cpu_data.family = CPU_FAMILY_SH2A; | 18 | boot_cpu_data.family = CPU_FAMILY_SH2A; |
19 | 19 | ||
@@ -51,6 +51,4 @@ int __init detect_cpu_and_cache_system(void) | |||
51 | * on the cache info. | 51 | * on the cache info. |
52 | */ | 52 | */ |
53 | boot_cpu_data.icache = boot_cpu_data.dcache; | 53 | boot_cpu_data.icache = boot_cpu_data.dcache; |
54 | |||
55 | return 0; | ||
56 | } | 54 | } |
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index 295ec4c99e98..bf23c322e164 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | 18 | ||
19 | int detect_cpu_and_cache_system(void) | 19 | void __cpuinit cpu_probe(void) |
20 | { | 20 | { |
21 | unsigned long addr0, addr1, data0, data1, data2, data3; | 21 | unsigned long addr0, addr1, data0, data1, data2, data3; |
22 | 22 | ||
@@ -108,6 +108,4 @@ int detect_cpu_and_cache_system(void) | |||
108 | boot_cpu_data.icache = boot_cpu_data.dcache; | 108 | boot_cpu_data.icache = boot_cpu_data.dcache; |
109 | 109 | ||
110 | boot_cpu_data.family = CPU_FAMILY_SH3; | 110 | boot_cpu_data.family = CPU_FAMILY_SH3; |
111 | |||
112 | return 0; | ||
113 | } | 111 | } |
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index 822977a06d84..d180f16281ed 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | 17 | ||
18 | int __init detect_cpu_and_cache_system(void) | 18 | void __cpuinit cpu_probe(void) |
19 | { | 19 | { |
20 | unsigned long pvr, prr, cvr; | 20 | unsigned long pvr, prr, cvr; |
21 | unsigned long size; | 21 | unsigned long size; |
@@ -251,6 +251,4 @@ int __init detect_cpu_and_cache_system(void) | |||
251 | boot_cpu_data.scache.linesz); | 251 | boot_cpu_data.scache.linesz); |
252 | } | 252 | } |
253 | } | 253 | } |
254 | |||
255 | return 0; | ||
256 | } | 254 | } |
diff --git a/arch/sh/kernel/cpu/sh5/probe.c b/arch/sh/kernel/cpu/sh5/probe.c index 521d05b3f7ba..9e882409e4e9 100644 --- a/arch/sh/kernel/cpu/sh5/probe.c +++ b/arch/sh/kernel/cpu/sh5/probe.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/cache.h> | 17 | #include <asm/cache.h> |
18 | #include <asm/tlb.h> | 18 | #include <asm/tlb.h> |
19 | 19 | ||
20 | int __init detect_cpu_and_cache_system(void) | 20 | void __cpuinit cpu_probe(void) |
21 | { | 21 | { |
22 | unsigned long long cir; | 22 | unsigned long long cir; |
23 | 23 | ||
@@ -72,6 +72,4 @@ int __init detect_cpu_and_cache_system(void) | |||
72 | 72 | ||
73 | /* Setup some I/D TLB defaults */ | 73 | /* Setup some I/D TLB defaults */ |
74 | sh64_tlb_init(); | 74 | sh64_tlb_init(); |
75 | |||
76 | return 0; | ||
77 | } | 75 | } |