aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/apc.c2
-rw-r--r--arch/sparc/kernel/ebus.c9
-rw-r--r--arch/sparc/kernel/entry.S4
-rw-r--r--arch/sparc/kernel/etrap.S1
-rw-r--r--arch/sparc/kernel/head.S2
-rw-r--r--arch/sparc/kernel/idprom.c2
-rw-r--r--arch/sparc/kernel/ioport.c13
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/process.c3
-rw-r--r--arch/sparc/kernel/rtrap.S2
-rw-r--r--arch/sparc/kernel/setup.c4
-rw-r--r--arch/sparc/kernel/smp.c7
-rw-r--r--arch/sparc/kernel/sun4c_irq.c3
-rw-r--r--arch/sparc/kernel/sun4d_irq.c7
-rw-r--r--arch/sparc/kernel/sun4m_irq.c7
-rw-r--r--arch/sparc/kernel/sun4m_smp.c9
-rw-r--r--arch/sparc/kernel/time.c4
-rw-r--r--arch/sparc/kernel/traps.c9
-rw-r--r--arch/sparc/kernel/wof.S1
-rw-r--r--arch/sparc/kernel/wuf.S1
-rw-r--r--include/asm-sparc/machines.h2
-rw-r--r--include/asm-sparc/mostek.h2
-rw-r--r--include/asm-sparc/timer.h2
23 files changed, 38 insertions, 60 deletions
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 6707422c9847..54f7ccd7455f 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -56,7 +56,7 @@ __setup("apc=", apc_setup);
56 * CPU idle callback function 56 * CPU idle callback function
57 * See .../arch/sparc/kernel/process.c 57 * See .../arch/sparc/kernel/process.c
58 */ 58 */
59void apc_swift_idle(void) 59static void apc_swift_idle(void)
60{ 60{
61#ifdef APC_DEBUG_LED 61#ifdef APC_DEBUG_LED
62 set_auxio(0x00, AUXIO_LED); 62 set_auxio(0x00, AUXIO_LED);
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index 92c6fc07e59c..97294232259c 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size)
69 69
70/* 70/*
71 */ 71 */
72int __init ebus_blacklist_irq(const char *name) 72static int __init ebus_blacklist_irq(const char *name)
73{ 73{
74 struct ebus_device_irq *dp; 74 struct ebus_device_irq *dp;
75 75
@@ -83,8 +83,8 @@ int __init ebus_blacklist_irq(const char *name)
83 return 0; 83 return 0;
84} 84}
85 85
86void __init fill_ebus_child(struct device_node *dp, 86static void __init fill_ebus_child(struct device_node *dp,
87 struct linux_ebus_child *dev) 87 struct linux_ebus_child *dev)
88{ 88{
89 const int *regs; 89 const int *regs;
90 const int *irqs; 90 const int *irqs;
@@ -144,7 +144,8 @@ void __init fill_ebus_child(struct device_node *dp,
144 } 144 }
145} 145}
146 146
147void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) 147static void __init fill_ebus_device(struct device_node *dp,
148 struct linux_ebus_device *dev)
148{ 149{
149 const struct linux_prom_registers *regs; 150 const struct linux_prom_registers *regs;
150 struct linux_ebus_child *child; 151 struct linux_ebus_child *child;
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 4bcfe54f878d..55d3be1b5d81 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -1317,7 +1317,6 @@ linux_sparc_syscall:
1317 bne linux_fast_syscall 1317 bne linux_fast_syscall
1318 /* Just do first insn from SAVE_ALL in the delay slot */ 1318 /* Just do first insn from SAVE_ALL in the delay slot */
1319 1319
1320 .globl syscall_is_too_hard
1321syscall_is_too_hard: 1320syscall_is_too_hard:
1322 SAVE_ALL_HEAD 1321 SAVE_ALL_HEAD
1323 rd %wim, %l3 1322 rd %wim, %l3
@@ -1544,8 +1543,7 @@ kgdb_trap_low:
1544#endif 1543#endif
1545 1544
1546 .align 4 1545 .align 4
1547 .globl __handle_exception, flush_patch_exception 1546 .globl flush_patch_exception
1548__handle_exception:
1549flush_patch_exception: 1547flush_patch_exception:
1550 FLUSH_ALL_KERNEL_WINDOWS; 1548 FLUSH_ALL_KERNEL_WINDOWS;
1551 ldd [%o0], %o6 1549 ldd [%o0], %o6
diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S
index f37d961d67a6..e806fcdc46db 100644
--- a/arch/sparc/kernel/etrap.S
+++ b/arch/sparc/kernel/etrap.S
@@ -228,7 +228,6 @@ tsetup_mmu_patchme:
228 */ 228 */
229#define glob_tmp g1 229#define glob_tmp g1
230 230
231 .globl tsetup_sun4c_stackchk
232tsetup_sun4c_stackchk: 231tsetup_sun4c_stackchk:
233 /* Done by caller: andcc %sp, 0x7, %g0 */ 232 /* Done by caller: andcc %sp, 0x7, %g0 */
234 bne trap_setup_user_stack_is_bolixed 233 bne trap_setup_user_stack_is_bolixed
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 3bfd6085a91d..50d9a16af795 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -32,7 +32,6 @@
32 */ 32 */
33 33
34 .align 4 34 .align 4
35 .globl cputyp
36cputyp: 35cputyp:
37 .word 1 36 .word 1
38 37
@@ -1280,7 +1279,6 @@ halt_me:
1280 * gets initialized in c-code so all routines can use it. 1279 * gets initialized in c-code so all routines can use it.
1281 */ 1280 */
1282 1281
1283 .globl prom_vector_p
1284prom_vector_p: 1282prom_vector_p:
1285 .word 0 1283 .word 0
1286 1284
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index 7220562cdb34..fc511f3c4c18 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -24,7 +24,7 @@ static struct idprom idprom_buffer;
24 * of the Sparc CPU and have a meaningful IDPROM machtype value that we 24 * of the Sparc CPU and have a meaningful IDPROM machtype value that we
25 * know about. See asm-sparc/machines.h for empirical constants. 25 * know about. See asm-sparc/machines.h for empirical constants.
26 */ 26 */
27struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { 27static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
28/* First, Sun4's */ 28/* First, Sun4's */
29{ "Sun 4/100 Series", (SM_SUN4 | SM_4_110) }, 29{ "Sun 4/100 Series", (SM_SUN4 | SM_4_110) },
30{ "Sun 4/200 Series", (SM_SUN4 | SM_4_260) }, 30{ "Sun 4/200 Series", (SM_SUN4 | SM_4_260) },
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 7b17522f59bf..487960919f1f 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -49,13 +49,16 @@
49 49
50#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ 50#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */
51 51
52struct resource *_sparc_find_resource(struct resource *r, unsigned long); 52static struct resource *_sparc_find_resource(struct resource *r,
53 unsigned long);
53 54
54static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); 55static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
55static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, 56static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
56 unsigned long size, char *name); 57 unsigned long size, char *name);
57static void _sparc_free_io(struct resource *res); 58static void _sparc_free_io(struct resource *res);
58 59
60static void register_proc_sparc_ioport(void);
61
59/* This points to the next to use virtual memory for DVMA mappings */ 62/* This points to the next to use virtual memory for DVMA mappings */
60static struct resource _sparc_dvma = { 63static struct resource _sparc_dvma = {
61 .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1 64 .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1
@@ -539,8 +542,6 @@ void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp)
539 542
540int __init sbus_arch_preinit(void) 543int __init sbus_arch_preinit(void)
541{ 544{
542 extern void register_proc_sparc_ioport(void);
543
544 register_proc_sparc_ioport(); 545 register_proc_sparc_ioport();
545 546
546#ifdef CONFIG_SUN4 547#ifdef CONFIG_SUN4
@@ -853,8 +854,8 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof,
853 * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case. 854 * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case.
854 * This probably warrants some sort of hashing. 855 * This probably warrants some sort of hashing.
855 */ 856 */
856struct resource * 857static struct resource *_sparc_find_resource(struct resource *root,
857_sparc_find_resource(struct resource *root, unsigned long hit) 858 unsigned long hit)
858{ 859{
859 struct resource *tmp; 860 struct resource *tmp;
860 861
@@ -865,7 +866,7 @@ _sparc_find_resource(struct resource *root, unsigned long hit)
865 return NULL; 866 return NULL;
866} 867}
867 868
868void register_proc_sparc_ioport(void) 869static void register_proc_sparc_ioport(void)
869{ 870{
870#ifdef CONFIG_PROC_FS 871#ifdef CONFIG_PROC_FS
871 create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap); 872 create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap);
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 087390b092b0..93e1d1c65290 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -154,7 +154,7 @@ void (*sparc_init_timers)(irq_handler_t ) =
154struct irqaction static_irqaction[MAX_STATIC_ALLOC]; 154struct irqaction static_irqaction[MAX_STATIC_ALLOC];
155int static_irq_count; 155int static_irq_count;
156 156
157struct { 157static struct {
158 struct irqaction *action; 158 struct irqaction *action;
159 int flags; 159 int flags;
160} sparc_irq[NR_IRQS]; 160} sparc_irq[NR_IRQS];
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index da48d248cc17..e18a5da025d3 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -177,6 +177,8 @@ void machine_power_off(void)
177 machine_halt(); 177 machine_halt();
178} 178}
179 179
180#if 0
181
180static DEFINE_SPINLOCK(sparc_backtrace_lock); 182static DEFINE_SPINLOCK(sparc_backtrace_lock);
181 183
182void __show_backtrace(unsigned long fp) 184void __show_backtrace(unsigned long fp)
@@ -228,7 +230,6 @@ void smp_show_backtrace_all_cpus(void)
228} 230}
229#endif 231#endif
230 232
231#if 0
232void show_stackframe(struct sparc_stackf *sf) 233void show_stackframe(struct sparc_stackf *sf)
233{ 234{
234 unsigned long size; 235 unsigned long size;
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S
index ce30082ab266..891f460b7b96 100644
--- a/arch/sparc/kernel/rtrap.S
+++ b/arch/sparc/kernel/rtrap.S
@@ -224,8 +224,6 @@ ret_trap_user_stack_is_bolixed:
224 b signal_p 224 b signal_p
225 ld [%curptr + TI_FLAGS], %g2 225 ld [%curptr + TI_FLAGS], %g2
226 226
227
228 .globl sun4c_rett_stackchk
229sun4c_rett_stackchk: 227sun4c_rett_stackchk:
230 be 1f 228 be 1f
231 and %fp, 0xfff, %g1 ! delay slot 229 and %fp, 0xfff, %g1 ! delay slot
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index a0ea0bc6f471..9e451b21202e 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -67,7 +67,7 @@ struct screen_info screen_info = {
67extern unsigned long trapbase; 67extern unsigned long trapbase;
68 68
69/* Pretty sick eh? */ 69/* Pretty sick eh? */
70void prom_sync_me(void) 70static void prom_sync_me(void)
71{ 71{
72 unsigned long prom_tbr, flags; 72 unsigned long prom_tbr, flags;
73 73
@@ -97,7 +97,7 @@ void prom_sync_me(void)
97 return; 97 return;
98} 98}
99 99
100unsigned int boot_flags __initdata = 0; 100static unsigned int boot_flags __initdata = 0;
101#define BOOTME_DEBUG 0x1 101#define BOOTME_DEBUG 0x1
102 102
103/* Exported for mm/init.c:paging_init. */ 103/* Exported for mm/init.c:paging_init. */
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index 6724ab90f82b..1619ec15c099 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -35,13 +35,9 @@
35 35
36#include "irq.h" 36#include "irq.h"
37 37
38int smp_num_cpus = 1;
39volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; 38volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,};
40unsigned char boot_cpu_id = 0; 39unsigned char boot_cpu_id = 0;
41unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ 40unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */
42int smp_activated = 0;
43volatile int __cpu_number_map[NR_CPUS];
44volatile int __cpu_logical_map[NR_CPUS];
45 41
46cpumask_t cpu_online_map = CPU_MASK_NONE; 42cpumask_t cpu_online_map = CPU_MASK_NONE;
47cpumask_t phys_cpu_present_map = CPU_MASK_NONE; 43cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
@@ -55,9 +51,6 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE;
55 * instruction which is much better... 51 * instruction which is much better...
56 */ 52 */
57 53
58/* Used to make bitops atomic */
59unsigned char bitops_spinlock = 0;
60
61void __cpuinit smp_store_cpu_info(int id) 54void __cpuinit smp_store_cpu_info(int id)
62{ 55{
63 int cpu_node; 56 int cpu_node;
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index c6ac9fc52563..340fc395fe2d 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -68,7 +68,8 @@ unsigned char *interrupt_enable = NULL;
68 68
69static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 }; 69static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };
70 70
71unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) 71static unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev,
72 unsigned int sbint)
72{ 73{
73 if (sbint >= sizeof(sun4c_pil_map)) { 74 if (sbint >= sizeof(sun4c_pil_map)) {
74 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); 75 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 8ac5661cafff..1290b5998f83 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -52,13 +52,13 @@ extern struct irqaction static_irqaction[MAX_STATIC_ALLOC];
52extern int static_irq_count; 52extern int static_irq_count;
53unsigned char cpu_leds[32]; 53unsigned char cpu_leds[32];
54#ifdef CONFIG_SMP 54#ifdef CONFIG_SMP
55unsigned char sbus_tid[32]; 55static unsigned char sbus_tid[32];
56#endif 56#endif
57 57
58static struct irqaction *irq_action[NR_IRQS]; 58static struct irqaction *irq_action[NR_IRQS];
59extern spinlock_t irq_action_lock; 59extern spinlock_t irq_action_lock;
60 60
61struct sbus_action { 61static struct sbus_action {
62 struct irqaction *action; 62 struct irqaction *action;
63 /* For SMP this needs to be extended */ 63 /* For SMP this needs to be extended */
64} *sbus_actions; 64} *sbus_actions;
@@ -267,7 +267,8 @@ unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq)
267 return irq; 267 return irq;
268} 268}
269 269
270unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) 270static unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev,
271 unsigned int sbint)
271{ 272{
272 if (sbint >= sizeof(sbus_to_pil)) { 273 if (sbint >= sizeof(sbus_to_pil)) {
273 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); 274 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index b92d6d2d5b04..94e02de960ea 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -154,7 +154,8 @@ static unsigned long irq_mask[] = {
154 154
155static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 }; 155static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 };
156 156
157unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) 157static unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev,
158 unsigned int sbint)
158{ 159{
159 if (sbint >= sizeof(sun4m_pil_map)) { 160 if (sbint >= sizeof(sun4m_pil_map)) {
160 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); 161 printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
@@ -163,7 +164,7 @@ unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
163 return sun4m_pil_map[sbint] | 0x30; 164 return sun4m_pil_map[sbint] | 0x30;
164} 165}
165 166
166inline unsigned long sun4m_get_irqmask(unsigned int irq) 167static unsigned long sun4m_get_irqmask(unsigned int irq)
167{ 168{
168 unsigned long mask; 169 unsigned long mask;
169 170
@@ -281,7 +282,7 @@ static void sun4m_set_udt(int cpu)
281#define TIMER_IRQ (OBIO_INTR | 10) 282#define TIMER_IRQ (OBIO_INTR | 10)
282#define PROFILE_IRQ (OBIO_INTR | 14) 283#define PROFILE_IRQ (OBIO_INTR | 14)
283 284
284struct sun4m_timer_regs *sun4m_timers; 285static struct sun4m_timer_regs *sun4m_timers;
285unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); 286unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10);
286 287
287static void sun4m_clear_clock_irq(void) 288static void sun4m_clear_clock_irq(void)
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index ffb875aacb7e..406ac1abc83a 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -244,8 +244,9 @@ static struct smp_funcall {
244static DEFINE_SPINLOCK(cross_call_lock); 244static DEFINE_SPINLOCK(cross_call_lock);
245 245
246/* Cross calls must be serialized, at least currently. */ 246/* Cross calls must be serialized, at least currently. */
247void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, 247static void smp4m_cross_call(smpfunc_t func, unsigned long arg1,
248 unsigned long arg3, unsigned long arg4, unsigned long arg5) 248 unsigned long arg2, unsigned long arg3,
249 unsigned long arg4, unsigned long arg5)
249{ 250{
250 register int ncpus = SUN4M_NCPUS; 251 register int ncpus = SUN4M_NCPUS;
251 unsigned long flags; 252 unsigned long flags;
@@ -344,7 +345,7 @@ static void __init smp_setup_percpu_timer(void)
344 enable_pil_irq(14); 345 enable_pil_irq(14);
345} 346}
346 347
347void __init smp4m_blackbox_id(unsigned *addr) 348static void __init smp4m_blackbox_id(unsigned *addr)
348{ 349{
349 int rd = *addr & 0x3e000000; 350 int rd = *addr & 0x3e000000;
350 int rs1 = rd >> 11; 351 int rs1 = rd >> 11;
@@ -354,7 +355,7 @@ void __init smp4m_blackbox_id(unsigned *addr)
354 addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */ 355 addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */
355} 356}
356 357
357void __init smp4m_blackbox_current(unsigned *addr) 358static void __init smp4m_blackbox_current(unsigned *addr)
358{ 359{
359 int rd = *addr & 0x3e000000; 360 int rd = *addr & 0x3e000000;
360 int rs1 = rd >> 11; 361 int rs1 = rd >> 11;
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 53caacbb3982..ab3dd0b257d3 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -46,7 +46,7 @@
46#include "irq.h" 46#include "irq.h"
47 47
48DEFINE_SPINLOCK(rtc_lock); 48DEFINE_SPINLOCK(rtc_lock);
49enum sparc_clock_type sp_clock_typ; 49static enum sparc_clock_type sp_clock_typ;
50DEFINE_SPINLOCK(mostek_lock); 50DEFINE_SPINLOCK(mostek_lock);
51void __iomem *mstk48t02_regs = NULL; 51void __iomem *mstk48t02_regs = NULL;
52static struct mostek48t08 __iomem *mstk48t08_regs = NULL; 52static struct mostek48t08 __iomem *mstk48t08_regs = NULL;
@@ -366,7 +366,7 @@ static int __init clock_init(void)
366fs_initcall(clock_init); 366fs_initcall(clock_init);
367#endif /* !CONFIG_SUN4 */ 367#endif /* !CONFIG_SUN4 */
368 368
369void __init sbus_time_init(void) 369static void __init sbus_time_init(void)
370{ 370{
371 371
372 BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); 372 BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index 978e9d85949e..ac8ee6ab1337 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -33,9 +33,6 @@ struct trap_trace_entry {
33 unsigned long type; 33 unsigned long type;
34}; 34};
35 35
36int trap_curbuf = 0;
37struct trap_trace_entry trapbuf[1024];
38
39void syscall_trace_entry(struct pt_regs *regs) 36void syscall_trace_entry(struct pt_regs *regs)
40{ 37{
41 printk("%s[%d]: ", current->comm, task_pid_nr(current)); 38 printk("%s[%d]: ", current->comm, task_pid_nr(current));
@@ -72,7 +69,7 @@ void sun4d_nmi(struct pt_regs *regs)
72 prom_halt(); 69 prom_halt();
73} 70}
74 71
75void instruction_dump (unsigned long *pc) 72static void instruction_dump(unsigned long *pc)
76{ 73{
77 int i; 74 int i;
78 75
@@ -479,10 +476,6 @@ void do_BUG(const char *file, int line)
479 476
480extern void sparc_cpu_startup(void); 477extern void sparc_cpu_startup(void);
481 478
482int linux_smp_still_initting;
483unsigned int thiscpus_tbr;
484int thiscpus_mid;
485
486void trap_init(void) 479void trap_init(void)
487{ 480{
488 extern void thread_info_offsets_are_bolixed_pete(void); 481 extern void thread_info_offsets_are_bolixed_pete(void);
diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S
index 4bce38dfe3c5..3bbcd8dc9abf 100644
--- a/arch/sparc/kernel/wof.S
+++ b/arch/sparc/kernel/wof.S
@@ -306,7 +306,6 @@ spwin_bad_ustack_from_kernel:
306 * As noted above %curptr cannot be touched by this routine at all. 306 * As noted above %curptr cannot be touched by this routine at all.
307 */ 307 */
308 308
309 .globl spwin_sun4c_stackchk
310spwin_sun4c_stackchk: 309spwin_sun4c_stackchk:
311 /* LOCATION: Window to be saved on the stack */ 310 /* LOCATION: Window to be saved on the stack */
312 311
diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S
index 82e5145b0f77..779ff750603d 100644
--- a/arch/sparc/kernel/wuf.S
+++ b/arch/sparc/kernel/wuf.S
@@ -243,7 +243,6 @@ fwin_user_finish_up:
243 */ 243 */
244 244
245 .align 4 245 .align 4
246 .globl sun4c_fwin_stackchk
247sun4c_fwin_stackchk: 246sun4c_fwin_stackchk:
248 /* LOCATION: Window 'W' */ 247 /* LOCATION: Window 'W' */
249 248
diff --git a/include/asm-sparc/machines.h b/include/asm-sparc/machines.h
index d6c6bf836206..c28c2f248794 100644
--- a/include/asm-sparc/machines.h
+++ b/include/asm-sparc/machines.h
@@ -17,8 +17,6 @@ struct Sun_Machine_Models {
17 */ 17 */
18#define NUM_SUN_MACHINES 15 18#define NUM_SUN_MACHINES 15
19 19
20extern struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES];
21
22/* The machine type in the idprom area looks like this: 20/* The machine type in the idprom area looks like this:
23 * 21 *
24 * --------------- 22 * ---------------
diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h
index 29aad11b8f00..c35c916162fc 100644
--- a/include/asm-sparc/mostek.h
+++ b/include/asm-sparc/mostek.h
@@ -128,8 +128,6 @@ struct mostek48t08 {
128 struct mostek48t02 regs; /* Here is what we are interested in. */ 128 struct mostek48t02 regs; /* Here is what we are interested in. */
129}; 129};
130 130
131extern enum sparc_clock_type sp_clock_typ;
132
133#ifdef CONFIG_SUN4 131#ifdef CONFIG_SUN4
134enum sparc_clock_type { MSTK48T02, MSTK48T08, \ 132enum sparc_clock_type { MSTK48T02, MSTK48T08, \
135INTERSIL, MSTK_INVALID }; 133INTERSIL, MSTK_INVALID };
diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h
index d909565f9410..361e53898dd7 100644
--- a/include/asm-sparc/timer.h
+++ b/include/asm-sparc/timer.h
@@ -84,8 +84,6 @@ struct sun4m_timer_regs {
84 volatile unsigned int cfg; /* equals zero at boot time... */ 84 volatile unsigned int cfg; /* equals zero at boot time... */
85}; 85};
86 86
87extern struct sun4m_timer_regs *sun4m_timers;
88
89#define SUN4D_PRM_CNT_L 0x80000000 87#define SUN4D_PRM_CNT_L 0x80000000
90#define SUN4D_PRM_CNT_LVALUE 0x7FFFFC00 88#define SUN4D_PRM_CNT_LVALUE 0x7FFFFC00
91 89