Skip to content

Commit

Permalink
sh: Tidy CPU probing and fixup section annotations.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Apr 21, 2010
1 parent 3bd1666 commit a9079ca
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
4 changes: 0 additions & 4 deletions arch/sh/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 2 additions & 0 deletions arch/sh/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/kernel/cpu/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
5 changes: 1 addition & 4 deletions arch/sh/kernel/cpu/sh2/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

4 changes: 1 addition & 3 deletions arch/sh/kernel/cpu/sh2a/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
4 changes: 1 addition & 3 deletions arch/sh/kernel/cpu/sh3/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
4 changes: 1 addition & 3 deletions arch/sh/kernel/cpu/sh4/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -251,6 +251,4 @@ int __init detect_cpu_and_cache_system(void)
boot_cpu_data.scache.linesz);
}
}

return 0;
}
4 changes: 1 addition & 3 deletions arch/sh/kernel/cpu/sh5/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -72,6 +72,4 @@ int __init detect_cpu_and_cache_system(void)

/* Setup some I/D TLB defaults */
sh64_tlb_init();

return 0;
}

0 comments on commit a9079ca

Please sign in to comment.