* CPU idle callback function
  * See .../arch/sparc/kernel/process.c
  */
-void apc_swift_idle(void)
+static void apc_swift_idle(void)
 {
 #ifdef APC_DEBUG_LED
        set_auxio(0x00, AUXIO_LED); 
 
 
 /*
  */
-int __init ebus_blacklist_irq(const char *name)
+static int __init ebus_blacklist_irq(const char *name)
 {
        struct ebus_device_irq *dp;
 
        return 0;
 }
 
-void __init fill_ebus_child(struct device_node *dp,
-                           struct linux_ebus_child *dev)
+static void __init fill_ebus_child(struct device_node *dp,
+                                  struct linux_ebus_child *dev)
 {
        const int *regs;
        const int *irqs;
        }
 }
 
-void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev)
+static void __init fill_ebus_device(struct device_node *dp,
+                                   struct linux_ebus_device *dev)
 {
        const struct linux_prom_registers *regs;
        struct linux_ebus_child *child;
 
        bne     linux_fast_syscall
         /* Just do first insn from SAVE_ALL in the delay slot */
 
-       .globl  syscall_is_too_hard
 syscall_is_too_hard:
        SAVE_ALL_HEAD
         rd     %wim, %l3
 #endif
 
        .align  4
-       .globl  __handle_exception, flush_patch_exception
-__handle_exception:
+       .globl  flush_patch_exception
 flush_patch_exception:
        FLUSH_ALL_KERNEL_WINDOWS;
        ldd     [%o0], %o6
 
         */
 #define glob_tmp     g1
 
-       .globl  tsetup_sun4c_stackchk
 tsetup_sun4c_stackchk:
        /* Done by caller: andcc %sp, 0x7, %g0 */
        bne     trap_setup_user_stack_is_bolixed
 
  */
 
        .align 4
-        .globl  cputyp
 cputyp:
         .word   1
 
  * gets initialized in c-code so all routines can use it.
  */
 
-       .globl  prom_vector_p
 prom_vector_p:
                .word 0
 
 
  * of the Sparc CPU and have a meaningful IDPROM machtype value that we
  * know about.  See asm-sparc/machines.h for empirical constants.
  */
-struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
+static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
 /* First, Sun4's */
 { "Sun 4/100 Series", (SM_SUN4 | SM_4_110) },
 { "Sun 4/200 Series", (SM_SUN4 | SM_4_260) },
 
 
 #define mmu_inval_dma_area(p, l)       /* Anton pulled it out for 2.4.0-xx */
 
-struct resource *_sparc_find_resource(struct resource *r, unsigned long);
+static struct resource *_sparc_find_resource(struct resource *r,
+                                            unsigned long);
 
 static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
 static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
     unsigned long size, char *name);
 static void _sparc_free_io(struct resource *res);
 
+static void register_proc_sparc_ioport(void);
+
 /* This points to the next to use virtual memory for DVMA mappings */
 static struct resource _sparc_dvma = {
        .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1
 
 int __init sbus_arch_preinit(void)
 {
-       extern void register_proc_sparc_ioport(void);
-
        register_proc_sparc_ioport();
 
 #ifdef CONFIG_SUN4
  * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case.
  * This probably warrants some sort of hashing.
  */
-struct resource *
-_sparc_find_resource(struct resource *root, unsigned long hit)
+static struct resource *_sparc_find_resource(struct resource *root,
+                                            unsigned long hit)
 {
         struct resource *tmp;
 
        return NULL;
 }
 
-void register_proc_sparc_ioport(void)
+static void register_proc_sparc_ioport(void)
 {
 #ifdef CONFIG_PROC_FS
        create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap);
 
 struct irqaction static_irqaction[MAX_STATIC_ALLOC];
 int static_irq_count;
 
-struct {
+static struct {
        struct irqaction *action;
        int flags;
 } sparc_irq[NR_IRQS];
 
        machine_halt();
 }
 
+#if 0
+
 static DEFINE_SPINLOCK(sparc_backtrace_lock);
 
 void __show_backtrace(unsigned long fp)
 }
 #endif
 
-#if 0
 void show_stackframe(struct sparc_stackf *sf)
 {
        unsigned long size;
 
        b       signal_p
         ld     [%curptr + TI_FLAGS], %g2
 
-
-       .globl  sun4c_rett_stackchk
 sun4c_rett_stackchk:
        be      1f
         and    %fp, 0xfff, %g1         ! delay slot
 
 extern unsigned long trapbase;
 
 /* Pretty sick eh? */
-void prom_sync_me(void)
+static void prom_sync_me(void)
 {
        unsigned long prom_tbr, flags;
 
        return;
 }
 
-unsigned int boot_flags __initdata = 0;
+static unsigned int boot_flags __initdata = 0;
 #define BOOTME_DEBUG  0x1
 
 /* Exported for mm/init.c:paging_init. */
 
 
 #include "irq.h"
 
-int smp_num_cpus = 1;
 volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,};
 unsigned char boot_cpu_id = 0;
 unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */
-int smp_activated = 0;
-volatile int __cpu_number_map[NR_CPUS];
-volatile int __cpu_logical_map[NR_CPUS];
 
 cpumask_t cpu_online_map = CPU_MASK_NONE;
 cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
  * instruction which is much better...
  */
 
-/* Used to make bitops atomic */
-unsigned char bitops_spinlock = 0;
-
 void __cpuinit smp_store_cpu_info(int id)
 {
        int cpu_node;
 
 
 static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };
 
-unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
+static unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev,
+                                      unsigned int sbint)
 {
        if (sbint >= sizeof(sun4c_pil_map)) {
                printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
 
 extern int static_irq_count;
 unsigned char cpu_leds[32];
 #ifdef CONFIG_SMP
-unsigned char sbus_tid[32];
+static unsigned char sbus_tid[32];
 #endif
 
 static struct irqaction *irq_action[NR_IRQS];
 extern spinlock_t irq_action_lock;
 
-struct sbus_action {
+static struct sbus_action {
        struct irqaction *action;
        /* For SMP this needs to be extended */
 } *sbus_actions;
                return irq;
 }
 
-unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
+static unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev,
+                                      unsigned int sbint)
 {
        if (sbint >= sizeof(sbus_to_pil)) {
                printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
 
 
 static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 };
 
-unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) 
+static unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev,
+                                      unsigned int sbint)
 {
        if (sbint >= sizeof(sun4m_pil_map)) {
                printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
        return sun4m_pil_map[sbint] | 0x30;
 }
 
-inline unsigned long sun4m_get_irqmask(unsigned int irq)
+static unsigned long sun4m_get_irqmask(unsigned int irq)
 {
        unsigned long mask;
     
 #define TIMER_IRQ      (OBIO_INTR | 10)
 #define PROFILE_IRQ    (OBIO_INTR | 14)
 
-struct sun4m_timer_regs *sun4m_timers;
+static struct sun4m_timer_regs *sun4m_timers;
 unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10);
 
 static void sun4m_clear_clock_irq(void)
 
 static DEFINE_SPINLOCK(cross_call_lock);
 
 /* Cross calls must be serialized, at least currently. */
-void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
-                   unsigned long arg3, unsigned long arg4, unsigned long arg5)
+static void smp4m_cross_call(smpfunc_t func, unsigned long arg1,
+                            unsigned long arg2, unsigned long arg3,
+                            unsigned long arg4, unsigned long arg5)
 {
                register int ncpus = SUN4M_NCPUS;
                unsigned long flags;
                enable_pil_irq(14);
 }
 
-void __init smp4m_blackbox_id(unsigned *addr)
+static void __init smp4m_blackbox_id(unsigned *addr)
 {
        int rd = *addr & 0x3e000000;
        int rs1 = rd >> 11;
        addr[2] = 0x80082003 | rd | rs1;        /* and reg, 3, reg */
 }
 
-void __init smp4m_blackbox_current(unsigned *addr)
+static void __init smp4m_blackbox_current(unsigned *addr)
 {
        int rd = *addr & 0x3e000000;
        int rs1 = rd >> 11;
 
 #include "irq.h"
 
 DEFINE_SPINLOCK(rtc_lock);
-enum sparc_clock_type sp_clock_typ;
+static enum sparc_clock_type sp_clock_typ;
 DEFINE_SPINLOCK(mostek_lock);
 void __iomem *mstk48t02_regs = NULL;
 static struct mostek48t08 __iomem *mstk48t08_regs = NULL;
 fs_initcall(clock_init);
 #endif /* !CONFIG_SUN4 */
 
-void __init sbus_time_init(void)
+static void __init sbus_time_init(void)
 {
 
        BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM);
 
        unsigned long type;
 };
 
-int trap_curbuf = 0;
-struct trap_trace_entry trapbuf[1024];
-
 void syscall_trace_entry(struct pt_regs *regs)
 {
        printk("%s[%d]: ", current->comm, task_pid_nr(current));
        prom_halt();
 }
 
-void instruction_dump (unsigned long *pc)
+static void instruction_dump(unsigned long *pc)
 {
        int i;
        
 
 extern void sparc_cpu_startup(void);
 
-int linux_smp_still_initting;
-unsigned int thiscpus_tbr;
-int thiscpus_mid;
-
 void trap_init(void)
 {
        extern void thread_info_offsets_are_bolixed_pete(void);
 
  * As noted above %curptr cannot be touched by this routine at all.
  */
 
-       .globl  spwin_sun4c_stackchk
 spwin_sun4c_stackchk:
        /* LOCATION: Window to be saved on the stack */
 
 
         */
 
        .align  4
-       .globl  sun4c_fwin_stackchk
 sun4c_fwin_stackchk:
        /* LOCATION: Window 'W' */
 
 
  */
 #define NUM_SUN_MACHINES   15
 
-extern struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES];
-
 /* The machine type in the idprom area looks like this:
  *
  * ---------------
 
        struct mostek48t02 regs;     /* Here is what we are interested in.   */
 };
 
-extern enum sparc_clock_type sp_clock_typ;
-
 #ifdef CONFIG_SUN4
 enum sparc_clock_type {        MSTK48T02, MSTK48T08, \
 INTERSIL, MSTK_INVALID };
 
        volatile unsigned int cfg;     /* equals zero at boot time... */
 };
 
-extern struct sun4m_timer_regs *sun4m_timers;
-
 #define SUN4D_PRM_CNT_L       0x80000000
 #define SUN4D_PRM_CNT_LVALUE  0x7FFFFC00