From: Stephen Rothwell This patch just moves as many as possible EXPORT_SYMBOL()s from arch/ppc64/kernel/ppc_ksyms.c to where the symbols are defined. This has been compiled on pSeries, iSeries and pmac. Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/LparData.c | 1 25-akpm/arch/ppc64/kernel/cputable.c | 3 + 25-akpm/arch/ppc64/kernel/irq.c | 1 25-akpm/arch/ppc64/kernel/pacaData.c | 1 25-akpm/arch/ppc64/kernel/pci.c | 2 + 25-akpm/arch/ppc64/kernel/ppc_ksyms.c | 68 +--------------------------------- 25-akpm/arch/ppc64/kernel/process.c | 2 + 25-akpm/arch/ppc64/kernel/prom.c | 10 +++++ 25-akpm/arch/ppc64/kernel/prom_init.c | 1 25-akpm/arch/ppc64/kernel/semaphore.c | 5 ++ 25-akpm/arch/ppc64/kernel/setup.c | 1 25-akpm/arch/ppc64/kernel/signal.c | 6 +-- 25-akpm/arch/ppc64/kernel/time.c | 1 25-akpm/arch/ppc64/mm/init.c | 8 ++++ 25-akpm/include/asm-ppc64/lmb.h | 2 - 15 files changed, 40 insertions(+), 72 deletions(-) diff -puN arch/ppc64/kernel/cputable.c~ppc64-distribute-export_symbols arch/ppc64/kernel/cputable.c --- 25/arch/ppc64/kernel/cputable.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/cputable.c 2005-02-09 21:00:05.000000000 -0800 @@ -17,9 +17,12 @@ #include #include #include +#include + #include struct cpu_spec* cur_cpu_spec = NULL; +EXPORT_SYMBOL(cur_cpu_spec); /* NOTE: * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's diff -puN arch/ppc64/kernel/irq.c~ppc64-distribute-export_symbols arch/ppc64/kernel/irq.c --- 25/arch/ppc64/kernel/irq.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/irq.c 2005-02-09 21:00:05.000000000 -0800 @@ -61,6 +61,7 @@ extern void iSeries_smp_message_recv( st #endif extern irq_desc_t irq_desc[NR_IRQS]; +EXPORT_SYMBOL(irq_desc); int distribute_irqs = 1; int __irq_offset_value; diff -puN arch/ppc64/kernel/LparData.c~ppc64-distribute-export_symbols arch/ppc64/kernel/LparData.c --- 25/arch/ppc64/kernel/LparData.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/LparData.c 2005-02-09 21:00:05.000000000 -0800 @@ -224,6 +224,7 @@ struct ItVpdAreas itVpdAreas = { }; struct msChunks msChunks; +EXPORT_SYMBOL(msChunks); /* Depending on whether this is called from iSeries or pSeries setup * code, the location of the msChunks struct may or may not have diff -puN arch/ppc64/kernel/pacaData.c~ppc64-distribute-export_symbols arch/ppc64/kernel/pacaData.c --- 25/arch/ppc64/kernel/pacaData.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/pacaData.c 2005-02-09 21:00:05.000000000 -0800 @@ -221,3 +221,4 @@ struct paca_struct paca[] = { #endif #endif }; +EXPORT_SYMBOL(paca); diff -puN arch/ppc64/kernel/pci.c~ppc64-distribute-export_symbols arch/ppc64/kernel/pci.c --- 25/arch/ppc64/kernel/pci.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/pci.c 2005-02-09 21:00:05.000000000 -0800 @@ -63,7 +63,9 @@ unsigned int pcibios_assign_all_busses(v * page is mapped and isa_io_limit prevents access to it. */ unsigned long isa_io_base; /* NULL if no ISA bus */ +EXPORT_SYMBOL(isa_io_base); unsigned long pci_io_base; +EXPORT_SYMBOL(pci_io_base); void iSeries_pcibios_init(void); diff -puN arch/ppc64/kernel/ppc_ksyms.c~ppc64-distribute-export_symbols arch/ppc64/kernel/ppc_ksyms.c --- 25/arch/ppc64/kernel/ppc_ksyms.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/ppc_ksyms.c 2005-02-09 21:00:05.000000000 -0800 @@ -8,49 +8,18 @@ */ #include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include +#include -#include -#include #include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include -#ifdef CONFIG_PPC_ISERIES #include -#include -#endif - -extern int do_signal(sigset_t *, struct pt_regs *); - -EXPORT_SYMBOL(do_signal); - -EXPORT_SYMBOL(isa_io_base); -EXPORT_SYMBOL(pci_io_base); EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strncpy); @@ -65,10 +34,6 @@ EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strncmp); -EXPORT_SYMBOL(__down_interruptible); -EXPORT_SYMBOL(__up); -EXPORT_SYMBOL(__down); - EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(ip_fast_csum); @@ -79,11 +44,6 @@ EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(clear_user_page); - -#ifdef CONFIG_MSCHUNKS -EXPORT_SYMBOL(msChunks); -#endif EXPORT_SYMBOL(reloc_offset); #ifdef CONFIG_PPC_ISERIES @@ -107,11 +67,7 @@ EXPORT_SYMBOL(_insw_ns); EXPORT_SYMBOL(_outsw_ns); EXPORT_SYMBOL(_insl_ns); EXPORT_SYMBOL(_outsl_ns); -EXPORT_SYMBOL(ioremap); -EXPORT_SYMBOL(__ioremap); -EXPORT_SYMBOL(iounmap); -EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(giveup_fpu); @@ -119,8 +75,7 @@ EXPORT_SYMBOL(giveup_fpu); EXPORT_SYMBOL(giveup_altivec); #endif EXPORT_SYMBOL(flush_icache_range); -EXPORT_SYMBOL(flush_icache_user_range); -EXPORT_SYMBOL(flush_dcache_page); + #ifdef CONFIG_SMP #ifdef CONFIG_PPC_ISERIES EXPORT_SYMBOL(local_get_flags); @@ -129,19 +84,6 @@ EXPORT_SYMBOL(local_irq_restore); #endif #endif -EXPORT_SYMBOL(ppc_md); - -#ifdef CONFIG_PPC_MULTIPLATFORM -EXPORT_SYMBOL(find_devices); -EXPORT_SYMBOL(find_type_devices); -EXPORT_SYMBOL(find_compatible_devices); -EXPORT_SYMBOL(find_path_device); -EXPORT_SYMBOL(device_is_compatible); -EXPORT_SYMBOL(machine_is_compatible); -EXPORT_SYMBOL(find_all_nodes); -EXPORT_SYMBOL(get_property); -#endif - EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memmove); @@ -150,10 +92,4 @@ EXPORT_SYMBOL(memcmp); EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(timer_interrupt); -EXPORT_SYMBOL(irq_desc); -EXPORT_SYMBOL(get_wchan); EXPORT_SYMBOL(console_drivers); - -EXPORT_SYMBOL(tb_ticks_per_usec); -EXPORT_SYMBOL(paca); -EXPORT_SYMBOL(cur_cpu_spec); diff -puN arch/ppc64/kernel/process.c~ppc64-distribute-export_symbols arch/ppc64/kernel/process.c --- 25/arch/ppc64/kernel/process.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/process.c 2005-02-09 21:00:05.000000000 -0800 @@ -487,6 +487,7 @@ void start_thread(struct pt_regs *regs, current->thread.used_vr = 0; #endif /* CONFIG_ALTIVEC */ } +EXPORT_SYMBOL(start_thread); int set_fpexc_mode(struct task_struct *tsk, unsigned int val) { @@ -625,6 +626,7 @@ unsigned long get_wchan(struct task_stru } while (count++ < 16); return 0; } +EXPORT_SYMBOL(get_wchan); void show_stack(struct task_struct *p, unsigned long *_sp) { diff -puN arch/ppc64/kernel/prom.c~ppc64-distribute-export_symbols arch/ppc64/kernel/prom.c --- 25/arch/ppc64/kernel/prom.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/prom.c 2005-02-09 21:00:05.000000000 -0800 @@ -32,6 +32,8 @@ #include #include #include +#include + #include #include #include @@ -1138,6 +1140,7 @@ find_devices(const char *name) *prevp = NULL; return head; } +EXPORT_SYMBOL(find_devices); /** * Construct and return a list of the device_nodes with a given type. @@ -1157,6 +1160,7 @@ find_type_devices(const char *type) *prevp = NULL; return head; } +EXPORT_SYMBOL(find_type_devices); /** * Returns all nodes linked together @@ -1174,6 +1178,7 @@ find_all_nodes(void) *prevp = NULL; return head; } +EXPORT_SYMBOL(find_all_nodes); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property @@ -1197,6 +1202,7 @@ device_is_compatible(struct device_node return 0; } +EXPORT_SYMBOL(device_is_compatible); /** @@ -1216,6 +1222,7 @@ machine_is_compatible(const char *compat } return rc; } +EXPORT_SYMBOL(machine_is_compatible); /** * Construct and return a list of the device_nodes with a given type @@ -1239,6 +1246,7 @@ find_compatible_devices(const char *type *prevp = NULL; return head; } +EXPORT_SYMBOL(find_compatible_devices); /** * Find the device_node with a given full_name. @@ -1253,6 +1261,7 @@ find_path_device(const char *path) return np; return NULL; } +EXPORT_SYMBOL(find_path_device); /******* * @@ -1872,6 +1881,7 @@ get_property(struct device_node *np, con } return NULL; } +EXPORT_SYMBOL(get_property); /* * Add a property to a node diff -puN arch/ppc64/kernel/prom_init.c~ppc64-distribute-export_symbols arch/ppc64/kernel/prom_init.c --- 25/arch/ppc64/kernel/prom_init.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/prom_init.c 2005-02-09 21:00:05.000000000 -0800 @@ -151,7 +151,6 @@ typedef u32 cell_t; extern void __start(unsigned long r3, unsigned long r4, unsigned long r5); -extern unsigned long reloc_offset(void); extern void enter_prom(struct prom_args *args, unsigned long entry); extern void copy_and_flush(unsigned long dest, unsigned long src, unsigned long size, unsigned long offset); diff -puN arch/ppc64/kernel/semaphore.c~ppc64-distribute-export_symbols arch/ppc64/kernel/semaphore.c --- 25/arch/ppc64/kernel/semaphore.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/semaphore.c 2005-02-09 21:00:05.000000000 -0800 @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include @@ -62,6 +64,7 @@ void __up(struct semaphore *sem) __sem_update_count(sem, 1); wake_up(&sem->wait); } +EXPORT_SYMBOL(__up); /* * Note that when we come in to __down or __down_interruptible, @@ -99,6 +102,7 @@ void __sched __down(struct semaphore *se */ wake_up(&sem->wait); } +EXPORT_SYMBOL(__down); int __sched __down_interruptible(struct semaphore * sem) { @@ -129,3 +133,4 @@ int __sched __down_interruptible(struct wake_up(&sem->wait); return retval; } +EXPORT_SYMBOL(__down_interruptible); diff -puN arch/ppc64/kernel/setup.c~ppc64-distribute-export_symbols arch/ppc64/kernel/setup.c --- 25/arch/ppc64/kernel/setup.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/setup.c 2005-02-09 21:00:05.000000000 -0800 @@ -129,6 +129,7 @@ int ucache_bsize; /* The main machine-dep calls structure */ struct machdep_calls ppc_md; +EXPORT_SYMBOL(ppc_md); #ifdef CONFIG_MAGIC_SYSRQ unsigned long SYSRQ_KEY; diff -puN arch/ppc64/kernel/signal.c~ppc64-distribute-export_symbols arch/ppc64/kernel/signal.c --- 25/arch/ppc64/kernel/signal.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/signal.c 2005-02-09 21:00:05.000000000 -0800 @@ -27,6 +27,8 @@ #include #include #include +#include + #include #include #include @@ -566,6 +568,4 @@ int do_signal(sigset_t *oldset, struct p return 0; } - - - +EXPORT_SYMBOL(do_signal); diff -puN arch/ppc64/kernel/time.c~ppc64-distribute-export_symbols arch/ppc64/kernel/time.c --- 25/arch/ppc64/kernel/time.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/time.c 2005-02-09 21:00:05.000000000 -0800 @@ -85,6 +85,7 @@ static unsigned long first_settimeofday unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_usec = 100; /* sane default */ +EXPORT_SYMBOL(tb_ticks_per_usec); unsigned long tb_ticks_per_sec; unsigned long next_xtime_sync_tb; unsigned long xtime_sync_interval; diff -puN arch/ppc64/mm/init.c~ppc64-distribute-export_symbols arch/ppc64/mm/init.c --- 25/arch/ppc64/mm/init.c~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/arch/ppc64/mm/init.c 2005-02-09 21:00:05.000000000 -0800 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -441,6 +442,10 @@ int iounmap_explicit(volatile void __iom #endif +EXPORT_SYMBOL(ioremap); +EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(iounmap); + void free_initmem(void) { unsigned long addr; @@ -758,6 +763,7 @@ void flush_dcache_page(struct page *page if (test_bit(PG_arch_1, &page->flags)) clear_bit(PG_arch_1, &page->flags); } +EXPORT_SYMBOL(flush_dcache_page); void clear_user_page(void *page, unsigned long vaddr, struct page *pg) { @@ -775,6 +781,7 @@ void clear_user_page(void *page, unsigne if (test_bit(PG_arch_1, &pg->flags)) clear_bit(PG_arch_1, &pg->flags); } +EXPORT_SYMBOL(clear_user_page); void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg) @@ -812,6 +819,7 @@ void flush_icache_user_range(struct vm_a maddr = (unsigned long)page_address(page) + (addr & ~PAGE_MASK); flush_icache_range(maddr, maddr + len); } +EXPORT_SYMBOL(flush_icache_user_range); /* * This is called at the end of handling a user page fault, when the diff -puN include/asm-ppc64/lmb.h~ppc64-distribute-export_symbols include/asm-ppc64/lmb.h --- 25/include/asm-ppc64/lmb.h~ppc64-distribute-export_symbols 2005-02-09 21:00:05.000000000 -0800 +++ 25-akpm/include/asm-ppc64/lmb.h 2005-02-09 21:00:05.000000000 -0800 @@ -16,8 +16,6 @@ #include #include -extern unsigned long reloc_offset(void); - #define MAX_LMB_REGIONS 128 #define LMB_ALLOC_ANYWHERE 0 _