diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-01-08 19:58:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-08 19:58:20 -0500 |
commit | 917c3660d6d9a4b073a3db7c10f6989adae4e191 (patch) | |
tree | 3cf8a7f80852fb637b7affefad1c046d272a5043 /arch/sparc | |
parent | 6943f3da3e64edd95ee2d33abc0a642357746ba6 (diff) |
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
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
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.
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/auxio_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sbus.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_64.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/sparc_ksyms_64.c | 136 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/traps_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/lib/PeeCeeI.c | 8 | ||||
-rw-r--r-- | arch/sparc/lib/user_fixup.c | 5 | ||||
-rw-r--r-- | arch/sparc/mm/generic_64.c | 1 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/prom/misc_64.c | 3 | ||||
-rw-r--r-- | arch/sparc/prom/tree_64.c | 20 |
15 files changed, 66 insertions, 126 deletions
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 8b67347d4221..9f52db2d441c 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -72,6 +72,7 @@ void auxio_set_led(int on) | |||
72 | bit = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED); | 72 | bit = (ebus ? AUXIO_PCIO_LED : AUXIO_AUX1_LED); |
73 | __auxio_set_bit(bit, on, ebus); | 73 | __auxio_set_bit(bit, on, ebus); |
74 | } | 74 | } |
75 | EXPORT_SYMBOL(auxio_set_led); | ||
75 | 76 | ||
76 | static void __auxio_sbus_set_lte(int on) | 77 | static void __auxio_sbus_set_lte(int on) |
77 | { | 78 | { |
@@ -90,6 +91,7 @@ void auxio_set_lte(int on) | |||
90 | break; | 91 | break; |
91 | } | 92 | } |
92 | } | 93 | } |
94 | EXPORT_SYMBOL(auxio_set_lte); | ||
93 | 95 | ||
94 | static struct of_device_id __initdata auxio_match[] = { | 96 | static struct of_device_id __initdata auxio_match[] = { |
95 | { | 97 | { |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 923e9bbb9fe2..4638fba799e4 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1077,6 +1077,7 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask) | |||
1077 | 1077 | ||
1078 | return (device_mask & dma_addr_mask) == dma_addr_mask; | 1078 | return (device_mask & dma_addr_mask) == dma_addr_mask; |
1079 | } | 1079 | } |
1080 | EXPORT_SYMBOL(pci_dma_supported); | ||
1080 | 1081 | ||
1081 | void pci_resource_to_user(const struct pci_dev *pdev, int bar, | 1082 | void pci_resource_to_user(const struct pci_dev *pdev, int bar, |
1082 | const struct resource *rp, resource_size_t *start, | 1083 | const struct resource *rp, resource_size_t *start, |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index d5e2acef9877..cc8b5604442c 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -678,6 +678,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
678 | "g1", "g2", "g3", "o0", "o1", "memory", "cc"); | 678 | "g1", "g2", "g3", "o0", "o1", "memory", "cc"); |
679 | return retval; | 679 | return retval; |
680 | } | 680 | } |
681 | EXPORT_SYMBOL(kernel_thread); | ||
681 | 682 | ||
682 | typedef struct { | 683 | typedef struct { |
683 | union { | 684 | union { |
@@ -743,6 +744,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) | |||
743 | } | 744 | } |
744 | return 1; | 745 | return 1; |
745 | } | 746 | } |
747 | EXPORT_SYMBOL(dump_fpu); | ||
746 | 748 | ||
747 | /* | 749 | /* |
748 | * sparc_execve() executes a new program after the asm stub has set | 750 | * sparc_execve() executes a new program after the asm stub has set |
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 2ead310066d1..406e0872504e 100644 --- a/arch/sparc/kernel/sbus.c +++ b/arch/sparc/kernel/sbus.c | |||
@@ -117,6 +117,7 @@ void sbus_set_sbus64(struct device *dev, int bursts) | |||
117 | val |= (1UL << 4UL); | 117 | val |= (1UL << 4UL); |
118 | upa_writeq(val, cfg_reg); | 118 | upa_writeq(val, cfg_reg); |
119 | } | 119 | } |
120 | EXPORT_SYMBOL(sbus_set_sbus64); | ||
120 | 121 | ||
121 | /* INO number to IMAP register offset for SYSIO external IRQ's. | 122 | /* INO number to IMAP register offset for SYSIO external IRQ's. |
122 | * This should conform to both Sunfire/Wildfire server and Fusion | 123 | * This should conform to both Sunfire/Wildfire server and Fusion |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 555db7452ebe..49d061f4ae9d 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -58,6 +58,7 @@ | |||
58 | * operations in asm/ns87303.h | 58 | * operations in asm/ns87303.h |
59 | */ | 59 | */ |
60 | DEFINE_SPINLOCK(ns87303_lock); | 60 | DEFINE_SPINLOCK(ns87303_lock); |
61 | EXPORT_SYMBOL(ns87303_lock); | ||
61 | 62 | ||
62 | struct screen_info screen_info = { | 63 | struct screen_info screen_info = { |
63 | 0, 0, /* orig-x, orig-y */ | 64 | 0, 0, /* orig-x, orig-y */ |
@@ -425,5 +426,7 @@ void sun_do_break(void) | |||
425 | 426 | ||
426 | prom_cmdline(); | 427 | prom_cmdline(); |
427 | } | 428 | } |
429 | EXPORT_SYMBOL(sun_do_break); | ||
428 | 430 | ||
429 | int stop_a_enabled = 1; | 431 | int stop_a_enabled = 1; |
432 | EXPORT_SYMBOL(stop_a_enabled); | ||
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c index 62b5a91cd6b9..e92ad122382f 100644 --- a/arch/sparc/kernel/sparc_ksyms_64.c +++ b/arch/sparc/kernel/sparc_ksyms_64.c | |||
@@ -8,43 +8,15 @@ | |||
8 | #define PROMLIB_INTERNAL | 8 | #define PROMLIB_INTERNAL |
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/types.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/in6.h> | ||
14 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/fs_struct.h> | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/mm.h> | ||
19 | #include <linux/socket.h> | ||
20 | #include <linux/syscalls.h> | ||
21 | #include <linux/percpu.h> | ||
22 | #include <linux/init.h> | 12 | #include <linux/init.h> |
23 | #include <linux/rwsem.h> | ||
24 | #include <net/compat.h> | ||
25 | 13 | ||
26 | #include <asm/oplib.h> | 14 | #include <asm/spinlock.h> |
27 | #include <asm/system.h> | 15 | #include <asm/system.h> |
28 | #include <asm/auxio.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | #include <asm/io.h> | ||
31 | #include <asm/irq.h> | ||
32 | #include <asm/elf.h> | ||
33 | #include <asm/head.h> | ||
34 | #include <asm/smp.h> | ||
35 | #include <asm/ptrace.h> | ||
36 | #include <asm/uaccess.h> | ||
37 | #include <asm/checksum.h> | ||
38 | #include <asm/fpumacro.h> | ||
39 | #include <asm/pgalloc.h> | ||
40 | #include <asm/cacheflush.h> | ||
41 | #ifdef CONFIG_SBUS | ||
42 | #include <asm/dma.h> | ||
43 | #endif | ||
44 | #include <asm/ns87303.h> | ||
45 | #include <asm/timer.h> | ||
46 | #include <asm/cpudata.h> | 16 | #include <asm/cpudata.h> |
47 | #include <asm/ftrace.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/spitfire.h> | ||
19 | #include <asm/oplib.h> | ||
48 | #include <asm/hypervisor.h> | 20 | #include <asm/hypervisor.h> |
49 | 21 | ||
50 | struct poll { | 22 | struct poll { |
@@ -53,19 +25,6 @@ struct poll { | |||
53 | short revents; | 25 | short revents; |
54 | }; | 26 | }; |
55 | 27 | ||
56 | extern void die_if_kernel(char *str, struct pt_regs *regs); | ||
57 | extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
58 | extern void sys_sigsuspend(void); | ||
59 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); | ||
60 | extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); | ||
61 | extern long sparc32_open(const char __user * filename, int flags, int mode); | ||
62 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | ||
63 | unsigned long pfn, unsigned long size, pgprot_t prot); | ||
64 | |||
65 | extern int __ashrdi3(int, int); | ||
66 | |||
67 | extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); | ||
68 | |||
69 | /* used by various drivers */ | 28 | /* used by various drivers */ |
70 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
71 | /* Out of line rw-locking implementation. */ | 30 | /* Out of line rw-locking implementation. */ |
@@ -76,37 +35,24 @@ EXPORT_SYMBOL(__write_unlock); | |||
76 | EXPORT_SYMBOL(__write_trylock); | 35 | EXPORT_SYMBOL(__write_trylock); |
77 | #endif /* CONFIG_SMP */ | 36 | #endif /* CONFIG_SMP */ |
78 | 37 | ||
79 | EXPORT_SYMBOL(sparc64_get_clock_tick); | 38 | /* from helpers.S */ |
80 | |||
81 | EXPORT_SYMBOL(__flushw_user); | 39 | EXPORT_SYMBOL(__flushw_user); |
40 | EXPORT_SYMBOL_GPL(real_hard_smp_processor_id); | ||
82 | 41 | ||
42 | /* from head_64.S */ | ||
43 | EXPORT_SYMBOL(__ret_efault); | ||
83 | EXPORT_SYMBOL(tlb_type); | 44 | EXPORT_SYMBOL(tlb_type); |
84 | EXPORT_SYMBOL(sun4v_chip_type); | 45 | EXPORT_SYMBOL(sun4v_chip_type); |
85 | EXPORT_SYMBOL(get_fb_unmapped_area); | 46 | EXPORT_SYMBOL(prom_root_node); |
86 | EXPORT_SYMBOL(flush_icache_range); | ||
87 | |||
88 | EXPORT_SYMBOL(flush_dcache_page); | ||
89 | #ifdef DCACHE_ALIASING_POSSIBLE | ||
90 | EXPORT_SYMBOL(__flush_dcache_range); | ||
91 | #endif | ||
92 | 47 | ||
48 | /* from hvcalls.S */ | ||
93 | EXPORT_SYMBOL(sun4v_niagara_getperf); | 49 | EXPORT_SYMBOL(sun4v_niagara_getperf); |
94 | EXPORT_SYMBOL(sun4v_niagara_setperf); | 50 | EXPORT_SYMBOL(sun4v_niagara_setperf); |
95 | EXPORT_SYMBOL(sun4v_niagara2_getperf); | 51 | EXPORT_SYMBOL(sun4v_niagara2_getperf); |
96 | EXPORT_SYMBOL(sun4v_niagara2_setperf); | 52 | EXPORT_SYMBOL(sun4v_niagara2_setperf); |
97 | 53 | ||
98 | EXPORT_SYMBOL(auxio_set_led); | ||
99 | EXPORT_SYMBOL(auxio_set_lte); | ||
100 | #ifdef CONFIG_SBUS | ||
101 | EXPORT_SYMBOL(sbus_set_sbus64); | ||
102 | #endif | ||
103 | EXPORT_SYMBOL(outsb); | ||
104 | EXPORT_SYMBOL(outsw); | ||
105 | EXPORT_SYMBOL(outsl); | ||
106 | EXPORT_SYMBOL(insb); | ||
107 | EXPORT_SYMBOL(insw); | ||
108 | EXPORT_SYMBOL(insl); | ||
109 | #ifdef CONFIG_PCI | 54 | #ifdef CONFIG_PCI |
55 | /* inline functions in asm/pci_64.h */ | ||
110 | EXPORT_SYMBOL(pci_alloc_consistent); | 56 | EXPORT_SYMBOL(pci_alloc_consistent); |
111 | EXPORT_SYMBOL(pci_free_consistent); | 57 | EXPORT_SYMBOL(pci_free_consistent); |
112 | EXPORT_SYMBOL(pci_map_single); | 58 | EXPORT_SYMBOL(pci_map_single); |
@@ -115,65 +61,7 @@ EXPORT_SYMBOL(pci_map_sg); | |||
115 | EXPORT_SYMBOL(pci_unmap_sg); | 61 | EXPORT_SYMBOL(pci_unmap_sg); |
116 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); | 62 | EXPORT_SYMBOL(pci_dma_sync_single_for_cpu); |
117 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); | 63 | EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu); |
118 | EXPORT_SYMBOL(pci_dma_supported); | ||
119 | #endif | 64 | #endif |
120 | 65 | ||
121 | /* I/O device mmaping on Sparc64. */ | 66 | /* Exporting a symbol from /init/main.c */ |
122 | EXPORT_SYMBOL(io_remap_pfn_range); | ||
123 | |||
124 | EXPORT_SYMBOL(dump_fpu); | ||
125 | |||
126 | /* math-emu wants this */ | ||
127 | EXPORT_SYMBOL(die_if_kernel); | ||
128 | |||
129 | /* Kernel thread creation. */ | ||
130 | EXPORT_SYMBOL(kernel_thread); | ||
131 | |||
132 | /* prom symbols */ | ||
133 | EXPORT_SYMBOL(prom_root_node); | ||
134 | EXPORT_SYMBOL(prom_getchild); | ||
135 | EXPORT_SYMBOL(prom_getsibling); | ||
136 | EXPORT_SYMBOL(prom_searchsiblings); | ||
137 | EXPORT_SYMBOL(prom_firstprop); | ||
138 | EXPORT_SYMBOL(prom_nextprop); | ||
139 | EXPORT_SYMBOL(prom_getproplen); | ||
140 | EXPORT_SYMBOL(prom_getproperty); | ||
141 | EXPORT_SYMBOL(prom_node_has_property); | ||
142 | EXPORT_SYMBOL(prom_setprop); | ||
143 | EXPORT_SYMBOL(saved_command_line); | 67 | EXPORT_SYMBOL(saved_command_line); |
144 | EXPORT_SYMBOL(prom_finddevice); | ||
145 | EXPORT_SYMBOL(prom_feval); | ||
146 | EXPORT_SYMBOL(prom_getbool); | ||
147 | EXPORT_SYMBOL(prom_getstring); | ||
148 | EXPORT_SYMBOL(prom_getint); | ||
149 | EXPORT_SYMBOL(prom_getintdefault); | ||
150 | EXPORT_SYMBOL(__prom_getchild); | ||
151 | EXPORT_SYMBOL(__prom_getsibling); | ||
152 | |||
153 | /* Moving data to/from/in userspace. */ | ||
154 | EXPORT_SYMBOL(copy_to_user_fixup); | ||
155 | EXPORT_SYMBOL(copy_from_user_fixup); | ||
156 | EXPORT_SYMBOL(copy_in_user_fixup); | ||
157 | |||
158 | /* Various address conversion macros use this. */ | ||
159 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); | ||
160 | |||
161 | /* No version information on this, heavily used in inline asm, | ||
162 | * and will always be 'void __ret_efault(void)'. | ||
163 | */ | ||
164 | EXPORT_SYMBOL(__ret_efault); | ||
165 | |||
166 | /* for input/keybdev */ | ||
167 | EXPORT_SYMBOL(sun_do_break); | ||
168 | EXPORT_SYMBOL(stop_a_enabled); | ||
169 | |||
170 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
171 | EXPORT_SYMBOL(do_BUG); | ||
172 | #endif | ||
173 | |||
174 | /* for ns8703 */ | ||
175 | EXPORT_SYMBOL(ns87303_lock); | ||
176 | |||
177 | EXPORT_SYMBOL(tick_ops); | ||
178 | |||
179 | EXPORT_SYMBOL_GPL(real_hard_smp_processor_id); | ||
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index 39749e32dc7e..09058fc39e73 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/ipc.h> | 23 | #include <linux/ipc.h> |
24 | #include <linux/personality.h> | 24 | #include <linux/personality.h> |
25 | #include <linux/random.h> | 25 | #include <linux/random.h> |
26 | #include <linux/module.h> | ||
26 | 27 | ||
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <asm/utrap.h> | 29 | #include <asm/utrap.h> |
@@ -354,6 +355,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u | |||
354 | 355 | ||
355 | return addr; | 356 | return addr; |
356 | } | 357 | } |
358 | EXPORT_SYMBOL(get_fb_unmapped_area); | ||
357 | 359 | ||
358 | /* Essentially the same as PowerPC... */ | 360 | /* Essentially the same as PowerPC... */ |
359 | void arch_pick_mmap_layout(struct mm_struct *mm) | 361 | void arch_pick_mmap_layout(struct mm_struct *mm) |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 54405d362148..2db3c2229b95 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -176,6 +176,7 @@ static struct sparc64_tick_ops tick_operations __read_mostly = { | |||
176 | }; | 176 | }; |
177 | 177 | ||
178 | struct sparc64_tick_ops *tick_ops __read_mostly = &tick_operations; | 178 | struct sparc64_tick_ops *tick_ops __read_mostly = &tick_operations; |
179 | EXPORT_SYMBOL(tick_ops); | ||
179 | 180 | ||
180 | static void stick_disable_irq(void) | 181 | static void stick_disable_irq(void) |
181 | { | 182 | { |
@@ -639,6 +640,7 @@ unsigned long sparc64_get_clock_tick(unsigned int cpu) | |||
639 | return ft->clock_tick_ref; | 640 | return ft->clock_tick_ref; |
640 | return cpu_data(cpu).clock_tick; | 641 | return cpu_data(cpu).clock_tick; |
641 | } | 642 | } |
643 | EXPORT_SYMBOL(sparc64_get_clock_tick); | ||
642 | 644 | ||
643 | #ifdef CONFIG_CPU_FREQ | 645 | #ifdef CONFIG_CPU_FREQ |
644 | 646 | ||
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index bca3b4e09c41..c2d153d46586 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -128,6 +128,7 @@ void do_BUG(const char *file, int line) | |||
128 | bust_spinlocks(1); | 128 | bust_spinlocks(1); |
129 | printk("kernel BUG at %s:%d!\n", file, line); | 129 | printk("kernel BUG at %s:%d!\n", file, line); |
130 | } | 130 | } |
131 | EXPORT_SYMBOL(do_BUG); | ||
131 | #endif | 132 | #endif |
132 | 133 | ||
133 | static DEFINE_SPINLOCK(dimm_handler_lock); | 134 | static DEFINE_SPINLOCK(dimm_handler_lock); |
@@ -2261,6 +2262,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2261 | do_exit(SIGKILL); | 2262 | do_exit(SIGKILL); |
2262 | do_exit(SIGSEGV); | 2263 | do_exit(SIGSEGV); |
2263 | } | 2264 | } |
2265 | EXPORT_SYMBOL(die_if_kernel); | ||
2264 | 2266 | ||
2265 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) | 2267 | #define VIS_OPCODE_MASK ((0x3 << 30) | (0x3f << 19)) |
2266 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) | 2268 | #define VIS_OPCODE_VAL ((0x2 << 30) | (0x36 << 19)) |
diff --git a/arch/sparc/lib/PeeCeeI.c b/arch/sparc/lib/PeeCeeI.c index 46053e6ddd7b..6529f8657597 100644 --- a/arch/sparc/lib/PeeCeeI.c +++ b/arch/sparc/lib/PeeCeeI.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/module.h> | ||
8 | |||
7 | #include <asm/io.h> | 9 | #include <asm/io.h> |
8 | #include <asm/byteorder.h> | 10 | #include <asm/byteorder.h> |
9 | 11 | ||
@@ -15,6 +17,7 @@ void outsb(unsigned long __addr, const void *src, unsigned long count) | |||
15 | while (count--) | 17 | while (count--) |
16 | outb(*p++, addr); | 18 | outb(*p++, addr); |
17 | } | 19 | } |
20 | EXPORT_SYMBOL(outsb); | ||
18 | 21 | ||
19 | void outsw(unsigned long __addr, const void *src, unsigned long count) | 22 | void outsw(unsigned long __addr, const void *src, unsigned long count) |
20 | { | 23 | { |
@@ -25,6 +28,7 @@ void outsw(unsigned long __addr, const void *src, unsigned long count) | |||
25 | src += sizeof(u16); | 28 | src += sizeof(u16); |
26 | } | 29 | } |
27 | } | 30 | } |
31 | EXPORT_SYMBOL(outsw); | ||
28 | 32 | ||
29 | void outsl(unsigned long __addr, const void *src, unsigned long count) | 33 | void outsl(unsigned long __addr, const void *src, unsigned long count) |
30 | { | 34 | { |
@@ -78,6 +82,7 @@ void outsl(unsigned long __addr, const void *src, unsigned long count) | |||
78 | break; | 82 | break; |
79 | } | 83 | } |
80 | } | 84 | } |
85 | EXPORT_SYMBOL(outsl); | ||
81 | 86 | ||
82 | void insb(unsigned long __addr, void *dst, unsigned long count) | 87 | void insb(unsigned long __addr, void *dst, unsigned long count) |
83 | { | 88 | { |
@@ -105,6 +110,7 @@ void insb(unsigned long __addr, void *dst, unsigned long count) | |||
105 | *pb++ = inb(addr); | 110 | *pb++ = inb(addr); |
106 | } | 111 | } |
107 | } | 112 | } |
113 | EXPORT_SYMBOL(insb); | ||
108 | 114 | ||
109 | void insw(unsigned long __addr, void *dst, unsigned long count) | 115 | void insw(unsigned long __addr, void *dst, unsigned long count) |
110 | { | 116 | { |
@@ -132,6 +138,7 @@ void insw(unsigned long __addr, void *dst, unsigned long count) | |||
132 | *ps = le16_to_cpu(inw(addr)); | 138 | *ps = le16_to_cpu(inw(addr)); |
133 | } | 139 | } |
134 | } | 140 | } |
141 | EXPORT_SYMBOL(insw); | ||
135 | 142 | ||
136 | void insl(unsigned long __addr, void *dst, unsigned long count) | 143 | void insl(unsigned long __addr, void *dst, unsigned long count) |
137 | { | 144 | { |
@@ -200,4 +207,5 @@ void insl(unsigned long __addr, void *dst, unsigned long count) | |||
200 | } | 207 | } |
201 | } | 208 | } |
202 | } | 209 | } |
210 | EXPORT_SYMBOL(insl); | ||
203 | 211 | ||
diff --git a/arch/sparc/lib/user_fixup.c b/arch/sparc/lib/user_fixup.c index 05a361b0a1a4..ac96ae236709 100644 --- a/arch/sparc/lib/user_fixup.c +++ b/arch/sparc/lib/user_fixup.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/string.h> | 8 | #include <linux/string.h> |
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/module.h> | ||
11 | |||
10 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
11 | 13 | ||
12 | /* Calculating the exact fault address when using | 14 | /* Calculating the exact fault address when using |
@@ -40,6 +42,7 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from, unsigned l | |||
40 | 42 | ||
41 | return size; | 43 | return size; |
42 | } | 44 | } |
45 | EXPORT_SYMBOL(copy_from_user_fixup); | ||
43 | 46 | ||
44 | unsigned long copy_to_user_fixup(void __user *to, const void *from, unsigned long size) | 47 | unsigned long copy_to_user_fixup(void __user *to, const void *from, unsigned long size) |
45 | { | 48 | { |
@@ -47,6 +50,7 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from, unsigned lon | |||
47 | 50 | ||
48 | return compute_size((unsigned long) to, size, &offset); | 51 | return compute_size((unsigned long) to, size, &offset); |
49 | } | 52 | } |
53 | EXPORT_SYMBOL(copy_to_user_fixup); | ||
50 | 54 | ||
51 | unsigned long copy_in_user_fixup(void __user *to, void __user *from, unsigned long size) | 55 | unsigned long copy_in_user_fixup(void __user *to, void __user *from, unsigned long size) |
52 | { | 56 | { |
@@ -64,3 +68,4 @@ unsigned long copy_in_user_fixup(void __user *to, void __user *from, unsigned lo | |||
64 | 68 | ||
65 | return size; | 69 | return size; |
66 | } | 70 | } |
71 | EXPORT_SYMBOL(copy_in_user_fixup); | ||
diff --git a/arch/sparc/mm/generic_64.c b/arch/sparc/mm/generic_64.c index f362c2037013..04f2bf4cd571 100644 --- a/arch/sparc/mm/generic_64.c +++ b/arch/sparc/mm/generic_64.c | |||
@@ -161,3 +161,4 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
161 | flush_tlb_range(vma, beg, end); | 161 | flush_tlb_range(vma, beg, end); |
162 | return error; | 162 | return error; |
163 | } | 163 | } |
164 | EXPORT_SYMBOL(io_remap_pfn_range); | ||
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index c77c7ef5d5d4..00373ce2d8fb 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -146,6 +146,7 @@ static void __init read_obp_memory(const char *property, | |||
146 | } | 146 | } |
147 | 147 | ||
148 | unsigned long *sparc64_valid_addr_bitmap __read_mostly; | 148 | unsigned long *sparc64_valid_addr_bitmap __read_mostly; |
149 | EXPORT_SYMBOL(sparc64_valid_addr_bitmap); | ||
149 | 150 | ||
150 | /* Kernel physical address base and size in bytes. */ | 151 | /* Kernel physical address base and size in bytes. */ |
151 | unsigned long kern_base __read_mostly; | 152 | unsigned long kern_base __read_mostly; |
@@ -369,6 +370,7 @@ void flush_dcache_page(struct page *page) | |||
369 | out: | 370 | out: |
370 | put_cpu(); | 371 | put_cpu(); |
371 | } | 372 | } |
373 | EXPORT_SYMBOL(flush_dcache_page); | ||
372 | 374 | ||
373 | void __kprobes flush_icache_range(unsigned long start, unsigned long end) | 375 | void __kprobes flush_icache_range(unsigned long start, unsigned long end) |
374 | { | 376 | { |
@@ -396,6 +398,7 @@ void __kprobes flush_icache_range(unsigned long start, unsigned long end) | |||
396 | } | 398 | } |
397 | } | 399 | } |
398 | } | 400 | } |
401 | EXPORT_SYMBOL(flush_icache_range); | ||
399 | 402 | ||
400 | void mmu_info(struct seq_file *m) | 403 | void mmu_info(struct seq_file *m) |
401 | { | 404 | { |
@@ -599,6 +602,7 @@ void __flush_dcache_range(unsigned long start, unsigned long end) | |||
599 | "i" (ASI_DCACHE_INVALIDATE)); | 602 | "i" (ASI_DCACHE_INVALIDATE)); |
600 | } | 603 | } |
601 | } | 604 | } |
605 | EXPORT_SYMBOL(__flush_dcache_range); | ||
602 | 606 | ||
603 | /* get_new_mmu_context() uses "cache + 1". */ | 607 | /* get_new_mmu_context() uses "cache + 1". */ |
604 | DEFINE_SPINLOCK(ctx_alloc_lock); | 608 | DEFINE_SPINLOCK(ctx_alloc_lock); |
diff --git a/arch/sparc/prom/misc_64.c b/arch/sparc/prom/misc_64.c index 9b0c0760901e..eedffb4fec2d 100644 --- a/arch/sparc/prom/misc_64.c +++ b/arch/sparc/prom/misc_64.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/module.h> | ||
15 | |||
14 | #include <asm/openprom.h> | 16 | #include <asm/openprom.h> |
15 | #include <asm/oplib.h> | 17 | #include <asm/oplib.h> |
16 | #include <asm/system.h> | 18 | #include <asm/system.h> |
@@ -54,6 +56,7 @@ void prom_feval(const char *fstring) | |||
54 | p1275_cmd("interpret", P1275_ARG(0, P1275_ARG_IN_STRING) | | 56 | p1275_cmd("interpret", P1275_ARG(0, P1275_ARG_IN_STRING) | |
55 | P1275_INOUT(1, 1), fstring); | 57 | P1275_INOUT(1, 1), fstring); |
56 | } | 58 | } |
59 | EXPORT_SYMBOL(prom_feval); | ||
57 | 60 | ||
58 | #ifdef CONFIG_SMP | 61 | #ifdef CONFIG_SMP |
59 | extern void smp_capture(void); | 62 | extern void smp_capture(void); |
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c index 281aea44790b..175c709e39a9 100644 --- a/arch/sparc/prom/tree_64.c +++ b/arch/sparc/prom/tree_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/module.h> | ||
13 | 14 | ||
14 | #include <asm/openprom.h> | 15 | #include <asm/openprom.h> |
15 | #include <asm/oplib.h> | 16 | #include <asm/oplib.h> |
@@ -22,6 +23,7 @@ inline int __prom_getchild(int node) | |||
22 | { | 23 | { |
23 | return p1275_cmd ("child", P1275_INOUT(1, 1), node); | 24 | return p1275_cmd ("child", P1275_INOUT(1, 1), node); |
24 | } | 25 | } |
26 | EXPORT_SYMBOL(__prom_getchild); | ||
25 | 27 | ||
26 | inline int prom_getchild(int node) | 28 | inline int prom_getchild(int node) |
27 | { | 29 | { |
@@ -32,6 +34,7 @@ inline int prom_getchild(int node) | |||
32 | if(cnode == -1) return 0; | 34 | if(cnode == -1) return 0; |
33 | return (int)cnode; | 35 | return (int)cnode; |
34 | } | 36 | } |
37 | EXPORT_SYMBOL(prom_getchild); | ||
35 | 38 | ||
36 | inline int prom_getparent(int node) | 39 | inline int prom_getparent(int node) |
37 | { | 40 | { |
@@ -50,6 +53,7 @@ inline int __prom_getsibling(int node) | |||
50 | { | 53 | { |
51 | return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node); | 54 | return p1275_cmd(prom_peer_name, P1275_INOUT(1, 1), node); |
52 | } | 55 | } |
56 | EXPORT_SYMBOL(__prom_getsibling); | ||
53 | 57 | ||
54 | inline int prom_getsibling(int node) | 58 | inline int prom_getsibling(int node) |
55 | { | 59 | { |
@@ -63,6 +67,7 @@ inline int prom_getsibling(int node) | |||
63 | 67 | ||
64 | return sibnode; | 68 | return sibnode; |
65 | } | 69 | } |
70 | EXPORT_SYMBOL(prom_getsibling); | ||
66 | 71 | ||
67 | /* Return the length in bytes of property 'prop' at node 'node'. | 72 | /* Return the length in bytes of property 'prop' at node 'node'. |
68 | * Return -1 on error. | 73 | * Return -1 on error. |
@@ -75,6 +80,7 @@ inline int prom_getproplen(int node, const char *prop) | |||
75 | P1275_INOUT(2, 1), | 80 | P1275_INOUT(2, 1), |
76 | node, prop); | 81 | node, prop); |
77 | } | 82 | } |
83 | EXPORT_SYMBOL(prom_getproplen); | ||
78 | 84 | ||
79 | /* Acquire a property 'prop' at node 'node' and place it in | 85 | /* Acquire a property 'prop' at node 'node' and place it in |
80 | * 'buffer' which has a size of 'bufsize'. If the acquisition | 86 | * 'buffer' which has a size of 'bufsize'. If the acquisition |
@@ -97,6 +103,7 @@ inline int prom_getproperty(int node, const char *prop, | |||
97 | node, prop, buffer, P1275_SIZE(plen)); | 103 | node, prop, buffer, P1275_SIZE(plen)); |
98 | } | 104 | } |
99 | } | 105 | } |
106 | EXPORT_SYMBOL(prom_getproperty); | ||
100 | 107 | ||
101 | /* Acquire an integer property and return its value. Returns -1 | 108 | /* Acquire an integer property and return its value. Returns -1 |
102 | * on failure. | 109 | * on failure. |
@@ -110,6 +117,7 @@ inline int prom_getint(int node, const char *prop) | |||
110 | 117 | ||
111 | return -1; | 118 | return -1; |
112 | } | 119 | } |
120 | EXPORT_SYMBOL(prom_getint); | ||
113 | 121 | ||
114 | /* Acquire an integer property, upon error return the passed default | 122 | /* Acquire an integer property, upon error return the passed default |
115 | * integer. | 123 | * integer. |
@@ -124,6 +132,7 @@ int prom_getintdefault(int node, const char *property, int deflt) | |||
124 | 132 | ||
125 | return retval; | 133 | return retval; |
126 | } | 134 | } |
135 | EXPORT_SYMBOL(prom_getintdefault); | ||
127 | 136 | ||
128 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ | 137 | /* Acquire a boolean property, 1=TRUE 0=FALSE. */ |
129 | int prom_getbool(int node, const char *prop) | 138 | int prom_getbool(int node, const char *prop) |
@@ -134,6 +143,7 @@ int prom_getbool(int node, const char *prop) | |||
134 | if(retval == -1) return 0; | 143 | if(retval == -1) return 0; |
135 | return 1; | 144 | return 1; |
136 | } | 145 | } |
146 | EXPORT_SYMBOL(prom_getbool); | ||
137 | 147 | ||
138 | /* Acquire a property whose value is a string, returns a null | 148 | /* Acquire a property whose value is a string, returns a null |
139 | * string on error. The char pointer is the user supplied string | 149 | * 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) | |||
148 | user_buf[0] = 0; | 158 | user_buf[0] = 0; |
149 | return; | 159 | return; |
150 | } | 160 | } |
151 | 161 | EXPORT_SYMBOL(prom_getstring); | |
152 | 162 | ||
153 | /* Does the device at node 'node' have name 'name'? | 163 | /* Does the device at node 'node' have name 'name'? |
154 | * YES = 1 NO = 0 | 164 | * YES = 1 NO = 0 |
@@ -181,6 +191,7 @@ int prom_searchsiblings(int node_start, const char *nodename) | |||
181 | 191 | ||
182 | return 0; | 192 | return 0; |
183 | } | 193 | } |
194 | EXPORT_SYMBOL(prom_searchsiblings); | ||
184 | 195 | ||
185 | /* Return the first property type for node 'node'. | 196 | /* Return the first property type for node 'node'. |
186 | * buffer should be at least 32B in length | 197 | * buffer should be at least 32B in length |
@@ -194,6 +205,7 @@ inline char *prom_firstprop(int node, char *buffer) | |||
194 | node, (char *) 0x0, buffer); | 205 | node, (char *) 0x0, buffer); |
195 | return buffer; | 206 | return buffer; |
196 | } | 207 | } |
208 | EXPORT_SYMBOL(prom_firstprop); | ||
197 | 209 | ||
198 | /* Return the property type string after property type 'oprop' | 210 | /* Return the property type string after property type 'oprop' |
199 | * at node 'node' . Returns NULL string if no more | 211 | * at node 'node' . Returns NULL string if no more |
@@ -217,6 +229,7 @@ inline char *prom_nextprop(int node, const char *oprop, char *buffer) | |||
217 | node, oprop, buffer); | 229 | node, oprop, buffer); |
218 | return buffer; | 230 | return buffer; |
219 | } | 231 | } |
232 | EXPORT_SYMBOL(prom_nextprop); | ||
220 | 233 | ||
221 | int | 234 | int |
222 | prom_finddevice(const char *name) | 235 | prom_finddevice(const char *name) |
@@ -228,6 +241,7 @@ prom_finddevice(const char *name) | |||
228 | P1275_INOUT(1, 1), | 241 | P1275_INOUT(1, 1), |
229 | name); | 242 | name); |
230 | } | 243 | } |
244 | EXPORT_SYMBOL(prom_finddevice); | ||
231 | 245 | ||
232 | int prom_node_has_property(int node, const char *prop) | 246 | int prom_node_has_property(int node, const char *prop) |
233 | { | 247 | { |
@@ -241,7 +255,8 @@ int prom_node_has_property(int node, const char *prop) | |||
241 | } while (*buf); | 255 | } while (*buf); |
242 | return 0; | 256 | return 0; |
243 | } | 257 | } |
244 | 258 | EXPORT_SYMBOL(prom_node_has_property); | |
259 | |||
245 | /* Set property 'pname' at node 'node' to value 'value' which has a length | 260 | /* Set property 'pname' at node 'node' to value 'value' which has a length |
246 | * of 'size' bytes. Return the number of bytes the prom accepted. | 261 | * of 'size' bytes. Return the number of bytes the prom accepted. |
247 | */ | 262 | */ |
@@ -264,6 +279,7 @@ prom_setprop(int node, const char *pname, char *value, int size) | |||
264 | P1275_INOUT(4, 1), | 279 | P1275_INOUT(4, 1), |
265 | node, pname, value, P1275_SIZE(size)); | 280 | node, pname, value, P1275_SIZE(size)); |
266 | } | 281 | } |
282 | EXPORT_SYMBOL(prom_setprop); | ||
267 | 283 | ||
268 | inline int prom_inst2pkg(int inst) | 284 | inline int prom_inst2pkg(int inst) |
269 | { | 285 | { |