aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-12-07 03:02:08 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-07 03:02:08 -0500
commit53ae341926b1238af3170f2f306f52a22430776c (patch)
tree6880ddd6b7e0e6bb317f05c1c2700c8f7ed0a445 /arch
parent7e7e93a22851f7bf0cbb7cd70878ebd811e4a044 (diff)
sparc: fix sparse warnings in cpu_*.c
o declare variables from cpu_*.c o declare function from cpu_32.c To do this introduce a new header "kernel.h" which is local to kernel/ Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/cpu_32.c6
-rw-r--r--arch/sparc/kernel/cpu_64.c1
-rw-r--r--arch/sparc/kernel/entry.h3
-rw-r--r--arch/sparc/kernel/kernel.h8
-rw-r--r--arch/sparc/kernel/setup_32.c5
-rw-r--r--arch/sparc/kernel/setup_64.c1
6 files changed, 16 insertions, 8 deletions
diff --git a/arch/sparc/kernel/cpu_32.c b/arch/sparc/kernel/cpu_32.c
index cdaf7630df81..4e14240f9ce3 100644
--- a/arch/sparc/kernel/cpu_32.c
+++ b/arch/sparc/kernel/cpu_32.c
@@ -15,6 +15,8 @@
15#include <asm/mbus.h> 15#include <asm/mbus.h>
16#include <asm/cpudata.h> 16#include <asm/cpudata.h>
17 17
18#include "kernel.h"
19
18DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; 20DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
19 21
20struct cpu_iu_info { 22struct cpu_iu_info {
@@ -125,8 +127,8 @@ static struct cpu_iu_info linux_sparc_chips[] = {
125 127
126#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips) 128#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
127 129
128char *sparc_cpu_type; 130const char *sparc_cpu_type;
129char *sparc_fpu_type; 131const char *sparc_fpu_type;
130 132
131unsigned int fsr_storage; 133unsigned int fsr_storage;
132 134
diff --git a/arch/sparc/kernel/cpu_64.c b/arch/sparc/kernel/cpu_64.c
index 0c9ac83ed0a8..4a81ed744477 100644
--- a/arch/sparc/kernel/cpu_64.c
+++ b/arch/sparc/kernel/cpu_64.c
@@ -16,6 +16,7 @@
16#include <asm/oplib.h> 16#include <asm/oplib.h>
17 17
18#include "entry.h" 18#include "entry.h"
19#include "kernel.h"
19 20
20DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 }; 21DEFINE_PER_CPU(cpuinfo_sparc, __cpu_data) = { 0 };
21 22
diff --git a/arch/sparc/kernel/entry.h b/arch/sparc/kernel/entry.h
index 34d7ab5e10d2..a9ab19aa0411 100644
--- a/arch/sparc/kernel/entry.h
+++ b/arch/sparc/kernel/entry.h
@@ -5,9 +5,6 @@
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/init.h> 6#include <linux/init.h>
7 7
8extern const char *sparc_cpu_type;
9extern const char *sparc_fpu_type;
10
11extern void __init per_cpu_patch(void); 8extern void __init per_cpu_patch(void);
12extern void __init sun4v_patch(void); 9extern void __init sun4v_patch(void);
13extern void __init boot_cpu_id_too_large(int cpu); 10extern void __init boot_cpu_id_too_large(int cpu);
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h
new file mode 100644
index 000000000000..7f02aad2e1ab
--- /dev/null
+++ b/arch/sparc/kernel/kernel.h
@@ -0,0 +1,8 @@
1/* cpu.c */
2extern const char *sparc_cpu_type;
3extern const char *sparc_fpu_type;
4
5extern unsigned int fsr_storage;
6
7extern void cpu_probe(void);
8
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index d21abbe26360..c96c65d1b58b 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -46,6 +46,8 @@
46#include <asm/cpudata.h> 46#include <asm/cpudata.h>
47#include <asm/setup.h> 47#include <asm/setup.h>
48 48
49#include "kernel.h"
50
49struct screen_info screen_info = { 51struct screen_info screen_info = {
50 0, 0, /* orig-x, orig-y */ 52 0, 0, /* orig-x, orig-y */
51 0, /* unused */ 53 0, /* unused */
@@ -308,9 +310,6 @@ void __init setup_arch(char **cmdline_p)
308 smp_setup_cpu_possible_map(); 310 smp_setup_cpu_possible_map();
309} 311}
310 312
311extern char *sparc_cpu_type;
312extern char *sparc_fpu_type;
313
314static int ncpus_probed; 313static int ncpus_probed;
315 314
316static int show_cpuinfo(struct seq_file *m, void *__unused) 315static int show_cpuinfo(struct seq_file *m, void *__unused)
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index c8b03a4f68bf..555db7452ebe 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -52,6 +52,7 @@
52#endif 52#endif
53 53
54#include "entry.h" 54#include "entry.h"
55#include "kernel.h"
55 56
56/* Used to synchronize accesses to NatSemi SUPER I/O chip configure 57/* Used to synchronize accesses to NatSemi SUPER I/O chip configure
57 * operations in asm/ns87303.h 58 * operations in asm/ns87303.h