From 11c1965687b0a472add948d4240dfe65a2fcb298 Mon Sep 17 00:00:00 2001
From: Paul Mundt <lethal@linux-sh.org>
Date: Mon, 25 Dec 2006 10:19:56 +0900
Subject: 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>
---
 include/asm-sh/bugs.h      | 6 +++---
 include/asm-sh/processor.h | 5 +++--
 include/asm-sh/ubc.h       | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

(limited to 'include')

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)
 	extern unsigned long loops_per_jiffy;
 	char *p = &init_utsname()->machine[2]; /* "sh" */
 
-	cpu_data->loops_per_jiffy = loops_per_jiffy;
+	current_cpu_data.loops_per_jiffy = loops_per_jiffy;
 
-	switch (cpu_data->type) {
+	switch (current_cpu_data.type) {
 	case CPU_SH7604 ... CPU_SH7619:
 		*p++ = '2';
 		break;
@@ -54,7 +54,7 @@ static void __init check_bugs(void)
 		break;
 	}
 
-	printk("CPU: %s\n", get_cpu_subtype());
+	printk("CPU: %s\n", get_cpu_subtype(&current_cpu_data));
 
 #ifndef __LITTLE_ENDIAN__
 	/* '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 @@
 #define CCN_CVR		0xff000040
 #define CCN_PRR		0xff000044
 
-const char *get_cpu_subtype(void);
-
 /*
  *  CPU type and hardware bug flags. Kept separately for each CPU.
  *
@@ -289,5 +287,8 @@ extern int vsyscall_init(void);
 #define vsyscall_init() do { } while (0)
 #endif
 
+/* arch/sh/kernel/setup.c */
+const char *get_cpu_subtype(struct sh_cpuinfo *c);
+
 #endif /* __KERNEL__ */
 #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 @@
 /* User Break Controller */
 #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \
     defined(CONFIG_CPU_SUBTYPE_SH7300)
-#define UBC_TYPE_SH7729	(cpu_data->type == CPU_SH7729)
+#define UBC_TYPE_SH7729	(current_cpu_data.type == CPU_SH7729)
 #else
 #define UBC_TYPE_SH7729	0
 #endif
-- 
cgit v1.2.3