sparc64: move EXPORT_SYMBOL to the symbols definition
PATCH v2 3/5 sparc64: move EXPORT_SYMBOL to the symbols definition
From: Sam Ravnborg <[email protected]>
sparc64: move EXPORT_SYMBOL to the symbols definition
Move all applicable EXPORT_SYMBOL()s to the file where the respective symbol is defined.
Removed all the includes that are no longer needed in sparc_ksyms_64.c
Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_64.c
Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.
--- arch/sparc/kernel/auxio_64.c | 2 + arch/sparc/kernel/pci.c | 1 + arch/sparc/kernel/process_64.c | 2 + arch/sparc/kernel/sbus.c | 1 + arch/sparc/kernel/setup_64.c | 3 + arch/sparc/kernel/sparc_ksyms_64.c | 136 +++-------------------------------- arch/sparc/kernel/sys_sparc_64.c | 2 + arch/sparc/kernel/time_64.c | 2 + arch/sparc/kernel/traps_64.c | 2 + arch/sparc/lib/PeeCeeI.c | 8 ++ arch/sparc/lib/user_fixup.c | 5 ++ arch/sparc/mm/generic_64.c | 1 + arch/sparc/mm/init_64.c | 4 + arch/sparc/prom/misc_64.c | 3 + arch/sparc/prom/tree_64.c | 20 +++++- 15 files changed, 66 insertions(+), 126 deletions(-)
arch/sparc/kernel/auxio_64.c +2 -0
@@ -72,6 +72,7 @@ void auxio_set_led(int on) bit = (ebus ?AUXIO_PCIO_LED :AUXIO_AUX1_LED );__auxio_set_bit (bit, on, ebus); } +EXPORT_SYMBOL (auxio_set_led);static void __auxio_sbus_set_lte (int on) {
@@ -90,6 +91,7 @@ void auxio_set_lte(int on)break ; } } +EXPORT_SYMBOL (auxio_set_lte);static struct of_device_id __initdata auxio_match[] = { {
arch/sparc/kernel/pci.c +1 -0
@@ -1077,6 +1077,7 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask)return (device_mask & dma_addr_mask) = dma_addr_mask; } +EXPORT_SYMBOL (pci_dma_supported); void pci_resource_to_user(const struct pci_dev *pdev, int bar, const struct resource *rp, resource_size_t *start,
arch/sparc/kernel/process_64.c +2 -0
@@ -678,6 +678,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) "g1", "g2", "g3", "o0", "o1", "memory", "cc");return retval; } +EXPORT_SYMBOL (kernel_thread); typedef struct { union {
@@ -743,6 +744,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) }return 1 ; } +EXPORT_SYMBOL (dump_fpu);/* * sparc_execve() executes a new program after the asm stub has set
arch/sparc/kernel/sbus.c +1 -0
@@ -117,6 +117,7 @@ void sbus_set_sbus64(struct device *dev, int bursts) val |= (1UL <<4UL );upa_writeq (val, cfg_reg); } +EXPORT_SYMBOL (sbus_set_sbus64);/* INO number to IMAP register offset for SYSIO external IRQ's. * This should conform to both Sunfire/Wildfire server and Fusion
arch/sparc/kernel/setup_64.c +3 -0
@@ -58,6 +58,7 @@* operations in asm/ns87303.h */ DEFINE_SPINLOCK (ns87303_lock); +EXPORT_SYMBOL (ns87303_lock);struct screen_info screen_info = {0 ,0 ,/* orig-x, orig-y */
@@ -425,5 +426,7 @@ void sun_do_break(void)prom_cmdline (); } +EXPORT_SYMBOL (sun_do_break);int stop_a_enabled =1 ; +EXPORT_SYMBOL (stop_a_enabled);
arch/sparc/kernel/sparc_ksyms_64.c +12 -124
176 lines not on this page · raw message
arch/sparc/kernel/sys_sparc_64.c +2 -0
@@ -23,6 +23,7 @@#include <linux/ipc.h> #include <linux/personality.h> #include <linux/random.h> +#include <linux/module.h> #include <asm/uaccess.h> #include <asm/utrap.h>
@@ -354,6 +355,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, ureturn addr; } +EXPORT_SYMBOL (get_fb_unmapped_area);/* Essentially the same as PowerPC... */ void arch_pick_mmap_layout (struct mm_struct *mm)
arch/sparc/kernel/time_64.c +2 -0
@@ -176,6 +176,7 @@ static struct sparc64_tick_ops tick_operations __read_mostly = { };struct sparc64_tick_ops *tick_ops__read_mostly = &tick_operations; +EXPORT_SYMBOL (tick_ops);static void stick_disable_irq (void ) {
@@ -639,6 +640,7 @@ unsigned long sparc64_get_clock_tick(unsigned int cpu)return ft->clock_tick_ref;return cpu_data (cpu).clock_tick; } +EXPORT_SYMBOL (sparc64_get_clock_tick);#ifdef CONFIG_CPU_FREQ
arch/sparc/kernel/traps_64.c +2 -0
@@ -128,6 +128,7 @@ void do_BUG(const char *file, int line)bust_spinlocks (1 ); printk("kernel BUG at %s:%d!\n", file, line); } +EXPORT_SYMBOL (do_BUG);#endif static DEFINE_SPINLOCK (dimm_handler_lock);
@@ -2261,6 +2262,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)do_exit (SIGKILL );do_exit (SIGSEGV ); } +EXPORT_SYMBOL (die_if_kernel);#define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19))#define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19))
arch/sparc/lib/PeeCeeI.c +8 -0
@@ -4,6 +4,8 @@* Copyright (C) 1997 David S. Miller ([email protected]) */ +#include <linux/module.h> +#include <asm/io.h> #include <asm/byteorder.h>
@@ -15,6 +17,7 @@ void outsb(unsigned long __addr, const void *src, unsigned long count)while (count--)outb (*p++, addr); } +EXPORT_SYMBOL (outsb);void outsw (unsigned long __addr,const void *src,unsigned long count) {
@@ -25,6 +28,7 @@ void outsw(unsigned long __addr, const void *src, unsigned long count) src +=sizeof (u16); } } +EXPORT_SYMBOL (outsw);void outsl (unsigned long __addr,const void *src,unsigned long count) {
@@ -78,6 +82,7 @@ void outsl(unsigned long __addr, const void *src, unsigned long count)break ; } } +EXPORT_SYMBOL (outsl);void insb (unsigned long __addr,void *dst,unsigned long count) {
@@ -105,6 +110,7 @@ void insb(unsigned long __addr, void *dst, unsigned long count) *pb++ =inb (addr); } } +EXPORT_SYMBOL (insb);void insw (unsigned long __addr,void *dst,unsigned long count) {
@@ -132,6 +138,7 @@ void insw(unsigned long __addr, void *dst, unsigned long count) *ps =le16_to_cpu (inw (addr)); } } +EXPORT_SYMBOL (insw);void insl (unsigned long __addr,void *dst,unsigned long count) {
@@ -200,4 +207,5 @@ void insl(unsigned long __addr, void *dst, unsigned long count) } } } +EXPORT_SYMBOL (insl);
arch/sparc/lib/user_fixup.c +5 -0
@@ -7,6 +7,8 @@#include <linux/kernel.h> #include <linux/string.h> #include <linux/errno.h> +#include <linux/module.h> +#include <asm/uaccess.h> /* Calculating the exact fault address when using
@@ -40,6 +42,7 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from, unsigned lreturn size; } +EXPORT_SYMBOL (copy_from_user_fixup);unsigned long copy_to_user_fixup (void __user *to,const void *from,unsigned long size) {
@@ -47,6 +50,7 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from, unsigned lonreturn compute_size ((unsigned long ) to, size, &offset); } +EXPORT_SYMBOL (copy_to_user_fixup);unsigned long copy_in_user_fixup (void __user *to,void __user *from,unsigned long size) {
@@ -64,3 +68,4 @@ unsigned long copy_in_user_fixup(void __user *to, void __user *from, unsigned loreturn size; } +EXPORT_SYMBOL (copy_in_user_fixup);
arch/sparc/mm/generic_64.c +1 -0
@@ -161,3 +161,4 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,flush_tlb_range (vma, beg, end);return error; } +EXPORT_SYMBOL (io_remap_pfn_range);
arch/sparc/mm/init_64.c +4 -0
@@ -146,6 +146,7 @@ static void __init read_obp_memory(const char *property, }unsigned long *sparc64_valid_addr_bitmap__read_mostly ; +EXPORT_SYMBOL (sparc64_valid_addr_bitmap);/* Kernel physical address base and size in bytes. */ unsigned long kern_base__read_mostly ;
@@ -359,6 +360,7 @@ void flush_dcache_page(struct page *page) out:put_cpu (); } +EXPORT_SYMBOL (flush_dcache_page);void __kprobes flush_icache_range (unsigned long start,unsigned long end) {
@@ -386,6 +388,7 @@ void __kprobes flush_icache_range(unsigned long start, unsigned long end) } } } +EXPORT_SYMBOL (flush_icache_range);void mmu_info (struct seq_file *m) {
@@ -589,6 +592,7 @@ void __flush_dcache_range(unsigned long start, unsigned long end) "i" (ASI_DCACHE_INVALIDATE)); } } +EXPORT_SYMBOL (__flush_dcache_range);/* get_new_mmu_context() uses "cache + 1". */ DEFINE_SPINLOCK (ctx_alloc_lock);
arch/sparc/prom/misc_64.c +3 -0
@@ -11,6 +11,8 @@#include <linux/sched.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include <linux/module.h> +#include <asm/openprom.h> #include <asm/oplib.h> #include <asm/system.h>
@@ -54,6 +56,7 @@ void prom_feval(const char *fstring)p1275_cmd ("interpret" ,P1275_ARG (0 ,P1275_ARG_IN_STRING ) |P1275_INOUT (1 ,1 ), fstring); } +EXPORT_SYMBOL (prom_feval);#ifdef CONFIG_SMP extern void smp_capture (void );
arch/sparc/prom/tree_64.c +18 -2
@@ -10,6 +10,7 @@#include <linux/types.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/module.h> #include <asm/openprom.h> #include <asm/oplib.h>
@@ -22,6 +23,7 @@ inline int __prom_getchild(int node) {return p1275_cmd ("child" ,P1275_INOUT (1 ,1 ), node); } +EXPORT_SYMBOL (__prom_getchild);inline int prom_getchild (int node) {
@@ -32,6 +34,7 @@ inline int prom_getchild(int node)if (cnode =-1 )return 0 ;return (int )cnode; } +EXPORT_SYMBOL (prom_getchild);inline int prom_getparent (int node) {
@@ -50,6 +53,7 @@ inline int __prom_getsibling(int node) {return p1275_cmd (prom_peer_name,P1275_INOUT (1 ,1 ), node); } +EXPORT_SYMBOL (__prom_getsibling);inline int prom_getsibling (int node) {
@@ -63,6 +67,7 @@ inline int prom_getsibling(int node)return sibnode; } +EXPORT_SYMBOL (prom_getsibling);/* Return the length in bytes of property 'prop' at node 'node'. * Return -1 on error.
@@ -75,6 +80,7 @@ inline int prom_getproplen(int node, const char *prop)P1275_INOUT (2 ,1 ), node, prop); } +EXPORT_SYMBOL (prom_getproplen);/* Acquire a property 'prop' at node 'node' and place it in * 'buffer' which has a size of 'bufsize'. If the acquisition
@@ -97,6 +103,7 @@ inline int prom_getproperty(int node, const char *prop, node, prop, buffer, P1275_SIZE(plen)); } } +EXPORT_SYMBOL (prom_getproperty);/* Acquire an integer property and return its value. Returns -1 * on failure.
@@ -110,6 +117,7 @@ inline int prom_getint(int node, const char *prop)return -1 ; } +EXPORT_SYMBOL (prom_getint);/* Acquire an integer property, upon error return the passed default * integer.
@@ -124,6 +132,7 @@ int prom_getintdefault(int node, const char *property, int deflt)return retval; } +EXPORT_SYMBOL (prom_getintdefault);/* Acquire a boolean property, 1=TRUE 0úLSE. */ int prom_getbool (int node,const char *prop)
@@ -134,6 +143,7 @@ int prom_getbool(int node, const char *prop)if (retval =-1 )return 0 ;return 1 ; } +EXPORT_SYMBOL (prom_getbool);/* Acquire a property whose value is a string, returns a null * string on error. The char pointer is the user supplied string
@@ -148,7 +158,7 @@ void prom_getstring(int node, const char *prop, char *user_buf, int ubuf_size) user_buf[0 ] =0 ;return ; } - +EXPORT_SYMBOL (prom_getstring);/* Does the device at node 'node' have name 'name'? * YES = 1 NO = 0
@@ -181,6 +191,7 @@ int prom_searchsiblings(int node_start, const char *nodename)return 0 ; } +EXPORT_SYMBOL (prom_searchsiblings);/* Return the first property type for node 'node'. * buffer should be at least 32B in length
@@ -194,6 +205,7 @@ inline char *prom_firstprop(int node, char *buffer) node, (char *) 0x0, buffer);return buffer; } +EXPORT_SYMBOL (prom_firstprop);/* Return the property type string after property type 'oprop' * at node 'node' . Returns NULL string if no more
@@ -217,6 +229,7 @@ inline char *prom_nextprop(int node, const char *oprop, char *buffer) node, oprop, buffer);return buffer; } +EXPORT_SYMBOL (prom_nextprop);int prom_finddevice (const char *name)
@@ -228,6 +241,7 @@ prom_finddevice(const char *name)P1275_INOUT (1 ,1 ), name); } +EXPORT_SYMBOL (prom_finddevice);int prom_node_has_property (int node,const char *prop) {
@@ -241,7 +255,8 @@ int prom_node_has_property(int node, const char *prop) }while (*buf);return 0 ; } - +EXPORT_SYMBOL (prom_node_has_property); +/* Set property 'pname' at node 'node' to value 'value' which has a length * of 'size' bytes. Return the number of bytes the prom accepted. */
@@ -264,6 +279,7 @@ prom_setprop(int node, const char *pname, char *value, int size)P1275_INOUT (4 ,1 ), node, pname, value, P1275_SIZE(size)); } +EXPORT_SYMBOL (prom_setprop);inline int prom_inst2pkg (int inst) {
Re: [PATCH v2 3/5] sparc64: move EXPORT_SYMBOL to the symbols
From: Julian Calaby <[email protected]>
Date: Thu, 08 Jan 2009 23:30:36 +1100
Quoted 11 lines
sparc64: move
EXPORT_SYMBOLto the symbols definitionMove all applicable EXPORT_SYMBOL()s to the file where the respective symbol is defined.
Removed all the includes that are no longer needed in
sparc_ksyms_64.cComment all remaining EXPORT_SYMBOL()s in
sparc_ksyms_64.cSigned-off-by Sam Ravnborg <[email protected]>
Quoted 8 lines
Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments ofsparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.Signed-off-by Julian Calaby <[email protected]>
Applied.