diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2006-12-24 20:19:56 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2007-02-12 20:54:45 -0500 |
| commit | 11c1965687b0a472add948d4240dfe65a2fcb298 (patch) | |
| tree | 69a71a34591bbdc6339dbe72de36819479f96198 /include/asm-sh | |
| parent | aec5e0e1c179fac4bbca4007a3f0d3107275a73c (diff) | |
sh: Fixup cpu_data references for the non-boot CPUs.
There are a lot of bogus cpu_data-> references that only end up working
for the boot CPU, convert these to current_cpu_data to fixup SMP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
| -rw-r--r-- | include/asm-sh/bugs.h | 6 | ||||
| -rw-r--r-- | include/asm-sh/processor.h | 5 | ||||
| -rw-r--r-- | include/asm-sh/ubc.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index a294997a8412..5a117ec43c77 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
| @@ -19,9 +19,9 @@ static void __init check_bugs(void) | |||
| 19 | extern unsigned long loops_per_jiffy; | 19 | extern unsigned long loops_per_jiffy; |
| 20 | char *p = &init_utsname()->machine[2]; /* "sh" */ | 20 | char *p = &init_utsname()->machine[2]; /* "sh" */ |
| 21 | 21 | ||
| 22 | cpu_data->loops_per_jiffy = loops_per_jiffy; | 22 | current_cpu_data.loops_per_jiffy = loops_per_jiffy; |
| 23 | 23 | ||
| 24 | switch (cpu_data->type) { | 24 | switch (current_cpu_data.type) { |
| 25 | case CPU_SH7604 ... CPU_SH7619: | 25 | case CPU_SH7604 ... CPU_SH7619: |
| 26 | *p++ = '2'; | 26 | *p++ = '2'; |
| 27 | break; | 27 | break; |
| @@ -54,7 +54,7 @@ static void __init check_bugs(void) | |||
| 54 | break; | 54 | break; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | printk("CPU: %s\n", get_cpu_subtype()); | 57 | printk("CPU: %s\n", get_cpu_subtype(¤t_cpu_data)); |
| 58 | 58 | ||
| 59 | #ifndef __LITTLE_ENDIAN__ | 59 | #ifndef __LITTLE_ENDIAN__ |
| 60 | /* 'eb' means 'Endian Big' */ | 60 | /* 'eb' means 'Endian Big' */ |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index da229aae8e0f..3e46a7afe764 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | #define CCN_CVR 0xff000040 | 27 | #define CCN_CVR 0xff000040 |
| 28 | #define CCN_PRR 0xff000044 | 28 | #define CCN_PRR 0xff000044 |
| 29 | 29 | ||
| 30 | const char *get_cpu_subtype(void); | ||
| 31 | |||
| 32 | /* | 30 | /* |
| 33 | * CPU type and hardware bug flags. Kept separately for each CPU. | 31 | * CPU type and hardware bug flags. Kept separately for each CPU. |
| 34 | * | 32 | * |
| @@ -289,5 +287,8 @@ extern int vsyscall_init(void); | |||
| 289 | #define vsyscall_init() do { } while (0) | 287 | #define vsyscall_init() do { } while (0) |
| 290 | #endif | 288 | #endif |
| 291 | 289 | ||
| 290 | /* arch/sh/kernel/setup.c */ | ||
| 291 | const char *get_cpu_subtype(struct sh_cpuinfo *c); | ||
| 292 | |||
| 292 | #endif /* __KERNEL__ */ | 293 | #endif /* __KERNEL__ */ |
| 293 | #endif /* __ASM_SH_PROCESSOR_H */ | 294 | #endif /* __ASM_SH_PROCESSOR_H */ |
diff --git a/include/asm-sh/ubc.h b/include/asm-sh/ubc.h index 694f51f47941..ae9bbdeefbe1 100644 --- a/include/asm-sh/ubc.h +++ b/include/asm-sh/ubc.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | /* User Break Controller */ | 17 | /* User Break Controller */ |
| 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
| 19 | defined(CONFIG_CPU_SUBTYPE_SH7300) | 19 | defined(CONFIG_CPU_SUBTYPE_SH7300) |
| 20 | #define UBC_TYPE_SH7729 (cpu_data->type == CPU_SH7729) | 20 | #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) |
| 21 | #else | 21 | #else |
| 22 | #define UBC_TYPE_SH7729 0 | 22 | #define UBC_TYPE_SH7729 0 |
| 23 | #endif | 23 | #endif |
