Commit 56a373b7 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64: distribute EXPORT_SYMBOLs

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e67ac05b
...@@ -224,6 +224,7 @@ struct ItVpdAreas itVpdAreas = { ...@@ -224,6 +224,7 @@ struct ItVpdAreas itVpdAreas = {
}; };
struct msChunks msChunks; struct msChunks msChunks;
EXPORT_SYMBOL(msChunks);
/* Depending on whether this is called from iSeries or pSeries setup /* Depending on whether this is called from iSeries or pSeries setup
* code, the location of the msChunks struct may or may not have * code, the location of the msChunks struct may or may not have
......
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h>
#include <asm/cputable.h> #include <asm/cputable.h>
struct cpu_spec* cur_cpu_spec = NULL; struct cpu_spec* cur_cpu_spec = NULL;
EXPORT_SYMBOL(cur_cpu_spec);
/* NOTE: /* NOTE:
* Unlike ppc32, ppc64 will only call this once for the boot CPU, it's * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
......
...@@ -61,6 +61,7 @@ extern void iSeries_smp_message_recv( struct pt_regs * ); ...@@ -61,6 +61,7 @@ extern void iSeries_smp_message_recv( struct pt_regs * );
#endif #endif
extern irq_desc_t irq_desc[NR_IRQS]; extern irq_desc_t irq_desc[NR_IRQS];
EXPORT_SYMBOL(irq_desc);
int distribute_irqs = 1; int distribute_irqs = 1;
int __irq_offset_value; int __irq_offset_value;
......
...@@ -221,3 +221,4 @@ struct paca_struct paca[] = { ...@@ -221,3 +221,4 @@ struct paca_struct paca[] = {
#endif #endif
#endif #endif
}; };
EXPORT_SYMBOL(paca);
...@@ -63,7 +63,9 @@ unsigned int pcibios_assign_all_busses(void) ...@@ -63,7 +63,9 @@ unsigned int pcibios_assign_all_busses(void)
* page is mapped and isa_io_limit prevents access to it. * page is mapped and isa_io_limit prevents access to it.
*/ */
unsigned long isa_io_base; /* NULL if no ISA bus */ unsigned long isa_io_base; /* NULL if no ISA bus */
EXPORT_SYMBOL(isa_io_base);
unsigned long pci_io_base; unsigned long pci_io_base;
EXPORT_SYMBOL(pci_io_base);
void iSeries_pcibios_init(void); void iSeries_pcibios_init(void);
......
...@@ -8,49 +8,18 @@ ...@@ -8,49 +8,18 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/threads.h>
#include <linux/smp.h>
#include <linux/elfcore.h>
#include <linux/sched.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/irq.h> #include <net/checksum.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/syscalls.h>
#include <linux/bitops.h>
#include <asm/page.h>
#include <asm/semaphore.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/atomic.h>
#include <asm/checksum.h>
#include <asm/pgtable.h>
#include <asm/prom.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pci-bridge.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include <asm/machdep.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
#include <asm/abs_addr.h> #include <asm/abs_addr.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#ifdef CONFIG_PPC_ISERIES
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/LparData.h>
#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(strcpy);
EXPORT_SYMBOL(strncpy); EXPORT_SYMBOL(strncpy);
...@@ -65,10 +34,6 @@ EXPORT_SYMBOL(strnlen); ...@@ -65,10 +34,6 @@ EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp); EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__down);
EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(csum_partial_copy_generic);
EXPORT_SYMBOL(ip_fast_csum); EXPORT_SYMBOL(ip_fast_csum);
...@@ -79,11 +44,6 @@ EXPORT_SYMBOL(__clear_user); ...@@ -79,11 +44,6 @@ EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(__strnlen_user); EXPORT_SYMBOL(__strnlen_user);
EXPORT_SYMBOL(clear_user_page);
#ifdef CONFIG_MSCHUNKS
EXPORT_SYMBOL(msChunks);
#endif
EXPORT_SYMBOL(reloc_offset); EXPORT_SYMBOL(reloc_offset);
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
...@@ -107,11 +67,7 @@ EXPORT_SYMBOL(_insw_ns); ...@@ -107,11 +67,7 @@ EXPORT_SYMBOL(_insw_ns);
EXPORT_SYMBOL(_outsw_ns); EXPORT_SYMBOL(_outsw_ns);
EXPORT_SYMBOL(_insl_ns); EXPORT_SYMBOL(_insl_ns);
EXPORT_SYMBOL(_outsl_ns); EXPORT_SYMBOL(_outsl_ns);
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(giveup_fpu); EXPORT_SYMBOL(giveup_fpu);
...@@ -119,8 +75,7 @@ EXPORT_SYMBOL(giveup_fpu); ...@@ -119,8 +75,7 @@ EXPORT_SYMBOL(giveup_fpu);
EXPORT_SYMBOL(giveup_altivec); EXPORT_SYMBOL(giveup_altivec);
#endif #endif
EXPORT_SYMBOL(flush_icache_range); EXPORT_SYMBOL(flush_icache_range);
EXPORT_SYMBOL(flush_icache_user_range);
EXPORT_SYMBOL(flush_dcache_page);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL(local_get_flags); EXPORT_SYMBOL(local_get_flags);
...@@ -129,19 +84,6 @@ EXPORT_SYMBOL(local_irq_restore); ...@@ -129,19 +84,6 @@ EXPORT_SYMBOL(local_irq_restore);
#endif #endif
#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(memcpy);
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memmove);
...@@ -150,10 +92,4 @@ EXPORT_SYMBOL(memcmp); ...@@ -150,10 +92,4 @@ EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(timer_interrupt); EXPORT_SYMBOL(timer_interrupt);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(get_wchan);
EXPORT_SYMBOL(console_drivers); EXPORT_SYMBOL(console_drivers);
EXPORT_SYMBOL(tb_ticks_per_usec);
EXPORT_SYMBOL(paca);
EXPORT_SYMBOL(cur_cpu_spec);
...@@ -487,6 +487,7 @@ void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp) ...@@ -487,6 +487,7 @@ void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp)
current->thread.used_vr = 0; current->thread.used_vr = 0;
#endif /* CONFIG_ALTIVEC */ #endif /* CONFIG_ALTIVEC */
} }
EXPORT_SYMBOL(start_thread);
int set_fpexc_mode(struct task_struct *tsk, unsigned int val) int set_fpexc_mode(struct task_struct *tsk, unsigned int val)
{ {
...@@ -625,6 +626,7 @@ unsigned long get_wchan(struct task_struct *p) ...@@ -625,6 +626,7 @@ unsigned long get_wchan(struct task_struct *p)
} while (count++ < 16); } while (count++ < 16);
return 0; return 0;
} }
EXPORT_SYMBOL(get_wchan);
void show_stack(struct task_struct *p, unsigned long *_sp) void show_stack(struct task_struct *p, unsigned long *_sp)
{ {
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/initrd.h> #include <linux/initrd.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/module.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/rtas.h> #include <asm/rtas.h>
#include <asm/lmb.h> #include <asm/lmb.h>
...@@ -1138,6 +1140,7 @@ find_devices(const char *name) ...@@ -1138,6 +1140,7 @@ find_devices(const char *name)
*prevp = NULL; *prevp = NULL;
return head; return head;
} }
EXPORT_SYMBOL(find_devices);
/** /**
* Construct and return a list of the device_nodes with a given type. * Construct and return a list of the device_nodes with a given type.
...@@ -1157,6 +1160,7 @@ find_type_devices(const char *type) ...@@ -1157,6 +1160,7 @@ find_type_devices(const char *type)
*prevp = NULL; *prevp = NULL;
return head; return head;
} }
EXPORT_SYMBOL(find_type_devices);
/** /**
* Returns all nodes linked together * Returns all nodes linked together
...@@ -1174,6 +1178,7 @@ find_all_nodes(void) ...@@ -1174,6 +1178,7 @@ find_all_nodes(void)
*prevp = NULL; *prevp = NULL;
return head; return head;
} }
EXPORT_SYMBOL(find_all_nodes);
/** Checks if the given "compat" string matches one of the strings in /** Checks if the given "compat" string matches one of the strings in
* the device's "compatible" property * the device's "compatible" property
...@@ -1197,6 +1202,7 @@ device_is_compatible(struct device_node *device, const char *compat) ...@@ -1197,6 +1202,7 @@ device_is_compatible(struct device_node *device, const char *compat)
return 0; return 0;
} }
EXPORT_SYMBOL(device_is_compatible);
/** /**
...@@ -1216,6 +1222,7 @@ machine_is_compatible(const char *compat) ...@@ -1216,6 +1222,7 @@ machine_is_compatible(const char *compat)
} }
return rc; return rc;
} }
EXPORT_SYMBOL(machine_is_compatible);
/** /**
* Construct and return a list of the device_nodes with a given type * Construct and return a list of the device_nodes with a given type
...@@ -1239,6 +1246,7 @@ find_compatible_devices(const char *type, const char *compat) ...@@ -1239,6 +1246,7 @@ find_compatible_devices(const char *type, const char *compat)
*prevp = NULL; *prevp = NULL;
return head; return head;
} }
EXPORT_SYMBOL(find_compatible_devices);
/** /**
* Find the device_node with a given full_name. * Find the device_node with a given full_name.
...@@ -1253,6 +1261,7 @@ find_path_device(const char *path) ...@@ -1253,6 +1261,7 @@ find_path_device(const char *path)
return np; return np;
return NULL; return NULL;
} }
EXPORT_SYMBOL(find_path_device);
/******* /*******
* *
...@@ -1872,6 +1881,7 @@ get_property(struct device_node *np, const char *name, int *lenp) ...@@ -1872,6 +1881,7 @@ get_property(struct device_node *np, const char *name, int *lenp)
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL(get_property);
/* /*
* Add a property to a node * Add a property to a node
......
...@@ -151,7 +151,6 @@ typedef u32 cell_t; ...@@ -151,7 +151,6 @@ typedef u32 cell_t;
extern void __start(unsigned long r3, unsigned long r4, unsigned long r5); 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 enter_prom(struct prom_args *args, unsigned long entry);
extern void copy_and_flush(unsigned long dest, unsigned long src, extern void copy_and_flush(unsigned long dest, unsigned long src,
unsigned long size, unsigned long offset); unsigned long size, unsigned long offset);
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/errno.h> #include <asm/errno.h>
...@@ -62,6 +64,7 @@ void __up(struct semaphore *sem) ...@@ -62,6 +64,7 @@ void __up(struct semaphore *sem)
__sem_update_count(sem, 1); __sem_update_count(sem, 1);
wake_up(&sem->wait); wake_up(&sem->wait);
} }
EXPORT_SYMBOL(__up);
/* /*
* Note that when we come in to __down or __down_interruptible, * Note that when we come in to __down or __down_interruptible,
...@@ -99,6 +102,7 @@ void __sched __down(struct semaphore *sem) ...@@ -99,6 +102,7 @@ void __sched __down(struct semaphore *sem)
*/ */
wake_up(&sem->wait); wake_up(&sem->wait);
} }
EXPORT_SYMBOL(__down);
int __sched __down_interruptible(struct semaphore * sem) int __sched __down_interruptible(struct semaphore * sem)
{ {
...@@ -129,3 +133,4 @@ int __sched __down_interruptible(struct semaphore * sem) ...@@ -129,3 +133,4 @@ int __sched __down_interruptible(struct semaphore * sem)
wake_up(&sem->wait); wake_up(&sem->wait);
return retval; return retval;
} }
EXPORT_SYMBOL(__down_interruptible);
...@@ -129,6 +129,7 @@ int ucache_bsize; ...@@ -129,6 +129,7 @@ int ucache_bsize;
/* The main machine-dep calls structure /* The main machine-dep calls structure
*/ */
struct machdep_calls ppc_md; struct machdep_calls ppc_md;
EXPORT_SYMBOL(ppc_md);
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
unsigned long SYSRQ_KEY; unsigned long SYSRQ_KEY;
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/elf.h> #include <linux/elf.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/module.h>
#include <asm/sigcontext.h> #include <asm/sigcontext.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -566,6 +568,4 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) ...@@ -566,6 +568,4 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
return 0; return 0;
} }
EXPORT_SYMBOL(do_signal);
...@@ -85,6 +85,7 @@ static unsigned long first_settimeofday = 1; ...@@ -85,6 +85,7 @@ static unsigned long first_settimeofday = 1;
unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_jiffy;
unsigned long tb_ticks_per_usec = 100; /* sane default */ unsigned long tb_ticks_per_usec = 100; /* sane default */
EXPORT_SYMBOL(tb_ticks_per_usec);
unsigned long tb_ticks_per_sec; unsigned long tb_ticks_per_sec;
unsigned long next_xtime_sync_tb; unsigned long next_xtime_sync_tb;
unsigned long xtime_sync_interval; unsigned long xtime_sync_interval;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/idr.h> #include <linux/idr.h>
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <linux/module.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -441,6 +442,10 @@ int iounmap_explicit(volatile void __iomem *start, unsigned long size) ...@@ -441,6 +442,10 @@ int iounmap_explicit(volatile void __iomem *start, unsigned long size)
#endif #endif
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
void free_initmem(void) void free_initmem(void)
{ {
unsigned long addr; unsigned long addr;
...@@ -758,6 +763,7 @@ void flush_dcache_page(struct page *page) ...@@ -758,6 +763,7 @@ void flush_dcache_page(struct page *page)
if (test_bit(PG_arch_1, &page->flags)) if (test_bit(PG_arch_1, &page->flags))
clear_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) void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
{ {
...@@ -775,6 +781,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) ...@@ -775,6 +781,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg)
if (test_bit(PG_arch_1, &pg->flags)) if (test_bit(PG_arch_1, &pg->flags))
clear_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, void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
struct page *pg) struct page *pg)
...@@ -812,6 +819,7 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, ...@@ -812,6 +819,7 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
maddr = (unsigned long)page_address(page) + (addr & ~PAGE_MASK); maddr = (unsigned long)page_address(page) + (addr & ~PAGE_MASK);
flush_icache_range(maddr, maddr + len); 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 * This is called at the end of handling a user page fault, when the
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <asm/prom.h> #include <asm/prom.h>
extern unsigned long reloc_offset(void);
#define MAX_LMB_REGIONS 128 #define MAX_LMB_REGIONS 128
#define LMB_ALLOC_ANYWHERE 0 #define LMB_ALLOC_ANYWHERE 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment