aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-08 19:57:35 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-08 19:57:35 -0500
commit45536ffc8dcb7798ff4818f54391547e5af19648 (patch)
treeadc72fde5230d5b345ec28be7d9be3c2124c4fb1 /arch/sparc/kernel
parentb41418f48c389bad4cd87156792b4a4f24a70729 (diff)
sparc: Create a new file lib/ksyms.c and add export of all symbols defined in assembler in lib/ to this file.
Remove the duplicate entries from kernel/sparc_ksyms_*.c The rationale behind this is that the EXPORT_SYMBOL() should be close to their definition and we cannot add designate a symbol to be exported in assembler so at least put it in a file in the same directory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Additions by Julian Calaby: * Rebased over sparc-2.6.git HEAD Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/sparc_ksyms_32.c86
-rw-r--r--arch/sparc/kernel/sparc_ksyms_64.c100
2 files changed, 0 insertions, 186 deletions
diff --git a/arch/sparc/kernel/sparc_ksyms_32.c b/arch/sparc/kernel/sparc_ksyms_32.c
index e1e97639231b..f4ee14de8dbe 100644
--- a/arch/sparc/kernel/sparc_ksyms_32.c
+++ b/arch/sparc/kernel/sparc_ksyms_32.c
@@ -5,15 +5,12 @@
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 */ 6 */
7 7
8/* Tell string.h we don't want memcpy etc. as cpp defines */
9#define EXPORT_SYMTAB_STROPS
10#define PROMLIB_INTERNAL 8#define PROMLIB_INTERNAL
11 9
12#include <linux/module.h> 10#include <linux/module.h>
13#include <linux/init.h> 11#include <linux/init.h>
14#include <linux/smp.h> 12#include <linux/smp.h>
15#include <linux/types.h> 13#include <linux/types.h>
16#include <linux/string.h>
17#include <linux/sched.h> 14#include <linux/sched.h>
18#include <linux/interrupt.h> 15#include <linux/interrupt.h>
19#include <linux/in6.h> 16#include <linux/in6.h>
@@ -55,57 +52,14 @@ struct poll {
55 short revents; 52 short revents;
56}; 53};
57 54
58extern void (*__copy_1page)(void *, const void *);
59extern void __memmove(void *, const void *, __kernel_size_t);
60extern void (*bzero_1page)(void *);
61extern void *__bzero(void *, size_t);
62extern void *__memscan_zero(void *, size_t);
63extern void *__memscan_generic(void *, int, size_t);
64extern int __strncmp(const char *, const char *, __kernel_size_t);
65
66extern int __ashrdi3(int, int);
67extern int __ashldi3(int, int);
68extern int __lshrdi3(int, int);
69extern int __muldi3(int, int);
70extern int __divdi3(int, int);
71
72/* Private functions with odd calling conventions. */
73extern void ___atomic24_add(void);
74extern void ___atomic24_sub(void);
75extern void ___rw_read_enter(void);
76extern void ___rw_read_try(void);
77extern void ___rw_read_exit(void);
78extern void ___rw_write_enter(void);
79
80/* Alias functions whose names begin with "." and export the aliases.
81 * The module references will be fixed up by module_frob_arch_sections.
82 */
83extern int _Div(int, int);
84extern int _Mul(int, int);
85extern int _Rem(int, int);
86extern unsigned _Udiv(unsigned, unsigned);
87extern unsigned _Umul(unsigned, unsigned);
88extern unsigned _Urem(unsigned, unsigned);
89
90/* used by various drivers */ 55/* used by various drivers */
91EXPORT_SYMBOL(sparc_cpu_model); 56EXPORT_SYMBOL(sparc_cpu_model);
92EXPORT_SYMBOL(kernel_thread); 57EXPORT_SYMBOL(kernel_thread);
93#ifdef CONFIG_SMP
94// XXX find what uses (or used) these. AV: see asm/spinlock.h
95EXPORT_SYMBOL(___rw_read_enter);
96EXPORT_SYMBOL(___rw_read_try);
97EXPORT_SYMBOL(___rw_read_exit);
98EXPORT_SYMBOL(___rw_write_enter);
99#endif
100 58
101EXPORT_SYMBOL(sparc_valid_addr_bitmap); 59EXPORT_SYMBOL(sparc_valid_addr_bitmap);
102EXPORT_SYMBOL(phys_base); 60EXPORT_SYMBOL(phys_base);
103EXPORT_SYMBOL(pfn_base); 61EXPORT_SYMBOL(pfn_base);
104 62
105/* Atomic operations. */
106EXPORT_SYMBOL(___atomic24_add);
107EXPORT_SYMBOL(___atomic24_sub);
108
109/* Per-CPU information table */ 63/* Per-CPU information table */
110EXPORT_PER_CPU_SYMBOL(__cpu_data); 64EXPORT_PER_CPU_SYMBOL(__cpu_data);
111 65
@@ -193,31 +147,8 @@ EXPORT_SYMBOL(__prom_getchild);
193EXPORT_SYMBOL(__prom_getsibling); 147EXPORT_SYMBOL(__prom_getsibling);
194 148
195/* sparc library symbols */ 149/* sparc library symbols */
196EXPORT_SYMBOL(memscan);
197EXPORT_SYMBOL(strlen);
198EXPORT_SYMBOL(strncmp);
199EXPORT_SYMBOL(page_kernel); 150EXPORT_SYMBOL(page_kernel);
200 151
201/* Special internal versions of library functions. */
202EXPORT_SYMBOL(__copy_1page);
203EXPORT_SYMBOL(__memcpy);
204EXPORT_SYMBOL(__memset);
205EXPORT_SYMBOL(bzero_1page);
206EXPORT_SYMBOL(__bzero);
207EXPORT_SYMBOL(__memscan_zero);
208EXPORT_SYMBOL(__memscan_generic);
209EXPORT_SYMBOL(__strncmp);
210EXPORT_SYMBOL(__memmove);
211
212/* Moving data to/from userspace. */
213EXPORT_SYMBOL(__copy_user);
214EXPORT_SYMBOL(__strncpy_from_user);
215EXPORT_SYMBOL(__strnlen_user);
216
217/* Networking helper routines. */
218EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
219EXPORT_SYMBOL(csum_partial);
220
221/* Cache flushing. */ 152/* Cache flushing. */
222EXPORT_SYMBOL(sparc_flush_page_to_ram); 153EXPORT_SYMBOL(sparc_flush_page_to_ram);
223 154
@@ -226,23 +157,6 @@ EXPORT_SYMBOL(sun_do_break);
226 157
227EXPORT_SYMBOL(__ret_efault); 158EXPORT_SYMBOL(__ret_efault);
228 159
229EXPORT_SYMBOL(memcmp);
230EXPORT_SYMBOL(memcpy);
231EXPORT_SYMBOL(memset);
232EXPORT_SYMBOL(memmove);
233EXPORT_SYMBOL(__ashrdi3);
234EXPORT_SYMBOL(__ashldi3);
235EXPORT_SYMBOL(__lshrdi3);
236EXPORT_SYMBOL(__muldi3);
237EXPORT_SYMBOL(__divdi3);
238
239EXPORT_SYMBOL(_Rem);
240EXPORT_SYMBOL(_Urem);
241EXPORT_SYMBOL(_Mul);
242EXPORT_SYMBOL(_Umul);
243EXPORT_SYMBOL(_Div);
244EXPORT_SYMBOL(_Udiv);
245
246#ifdef CONFIG_DEBUG_BUGVERBOSE 160#ifdef CONFIG_DEBUG_BUGVERBOSE
247EXPORT_SYMBOL(do_BUG); 161EXPORT_SYMBOL(do_BUG);
248#endif 162#endif
diff --git a/arch/sparc/kernel/sparc_ksyms_64.c b/arch/sparc/kernel/sparc_ksyms_64.c
index 0133211ab634..09874eaf0fb6 100644
--- a/arch/sparc/kernel/sparc_ksyms_64.c
+++ b/arch/sparc/kernel/sparc_ksyms_64.c
@@ -5,13 +5,10 @@
5 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
8/* Tell string.h we don't want memcpy etc. as cpp defines */
9#define EXPORT_SYMTAB_STROPS
10#define PROMLIB_INTERNAL 8#define PROMLIB_INTERNAL
11 9
12#include <linux/module.h> 10#include <linux/module.h>
13#include <linux/types.h> 11#include <linux/types.h>
14#include <linux/string.h>
15#include <linux/sched.h> 12#include <linux/sched.h>
16#include <linux/in6.h> 13#include <linux/in6.h>
17#include <linux/pci.h> 14#include <linux/pci.h>
@@ -59,10 +56,6 @@ struct poll {
59 56
60extern void die_if_kernel(char *str, struct pt_regs *regs); 57extern void die_if_kernel(char *str, struct pt_regs *regs);
61extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 58extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
62extern void *__bzero(void *, size_t);
63extern void *__memscan_zero(void *, size_t);
64extern void *__memscan_generic(void *, int, size_t);
65extern __kernel_size_t strlen(const char *);
66extern void sys_sigsuspend(void); 59extern void sys_sigsuspend(void);
67extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); 60extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
68extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); 61extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
@@ -74,22 +67,6 @@ extern int __ashrdi3(int, int);
74 67
75extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); 68extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
76 69
77extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
78extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
79 unsigned long *);
80extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
81 unsigned long *, unsigned long *);
82extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
83 unsigned long *, unsigned long *, unsigned long *);
84
85extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
86extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
87 unsigned long *);
88extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
89 unsigned long *, unsigned long *);
90extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
91 unsigned long *, unsigned long *, unsigned long *);
92
93/* Per-CPU information table */ 70/* Per-CPU information table */
94EXPORT_PER_CPU_SYMBOL(__cpu_data); 71EXPORT_PER_CPU_SYMBOL(__cpu_data);
95 72
@@ -103,39 +80,8 @@ EXPORT_SYMBOL(__write_unlock);
103EXPORT_SYMBOL(__write_trylock); 80EXPORT_SYMBOL(__write_trylock);
104#endif /* CONFIG_SMP */ 81#endif /* CONFIG_SMP */
105 82
106#ifdef CONFIG_MCOUNT
107EXPORT_SYMBOL(_mcount);
108#endif
109
110EXPORT_SYMBOL(sparc64_get_clock_tick); 83EXPORT_SYMBOL(sparc64_get_clock_tick);
111 84
112/* RW semaphores */
113EXPORT_SYMBOL(__down_read);
114EXPORT_SYMBOL(__down_read_trylock);
115EXPORT_SYMBOL(__down_write);
116EXPORT_SYMBOL(__down_write_trylock);
117EXPORT_SYMBOL(__up_read);
118EXPORT_SYMBOL(__up_write);
119EXPORT_SYMBOL(__downgrade_write);
120
121/* Atomic counter implementation. */
122EXPORT_SYMBOL(atomic_add);
123EXPORT_SYMBOL(atomic_add_ret);
124EXPORT_SYMBOL(atomic_sub);
125EXPORT_SYMBOL(atomic_sub_ret);
126EXPORT_SYMBOL(atomic64_add);
127EXPORT_SYMBOL(atomic64_add_ret);
128EXPORT_SYMBOL(atomic64_sub);
129EXPORT_SYMBOL(atomic64_sub_ret);
130
131/* Atomic bit operations. */
132EXPORT_SYMBOL(test_and_set_bit);
133EXPORT_SYMBOL(test_and_clear_bit);
134EXPORT_SYMBOL(test_and_change_bit);
135EXPORT_SYMBOL(set_bit);
136EXPORT_SYMBOL(clear_bit);
137EXPORT_SYMBOL(change_bit);
138
139EXPORT_SYMBOL(__flushw_user); 85EXPORT_SYMBOL(__flushw_user);
140 86
141EXPORT_SYMBOL(tlb_type); 87EXPORT_SYMBOL(tlb_type);
@@ -209,35 +155,10 @@ EXPORT_SYMBOL(prom_getintdefault);
209EXPORT_SYMBOL(__prom_getchild); 155EXPORT_SYMBOL(__prom_getchild);
210EXPORT_SYMBOL(__prom_getsibling); 156EXPORT_SYMBOL(__prom_getsibling);
211 157
212/* sparc library symbols */
213EXPORT_SYMBOL(strlen);
214EXPORT_SYMBOL(__strlen_user);
215EXPORT_SYMBOL(__strnlen_user);
216
217/* Special internal versions of library functions. */
218EXPORT_SYMBOL(_clear_page);
219EXPORT_SYMBOL(clear_user_page);
220EXPORT_SYMBOL(copy_user_page);
221EXPORT_SYMBOL(__bzero);
222EXPORT_SYMBOL(__memscan_zero);
223EXPORT_SYMBOL(__memscan_generic);
224EXPORT_SYMBOL(__memset);
225
226EXPORT_SYMBOL(csum_partial);
227EXPORT_SYMBOL(csum_partial_copy_nocheck);
228EXPORT_SYMBOL(__csum_partial_copy_from_user);
229EXPORT_SYMBOL(__csum_partial_copy_to_user);
230EXPORT_SYMBOL(ip_fast_csum);
231
232/* Moving data to/from/in userspace. */ 158/* Moving data to/from/in userspace. */
233EXPORT_SYMBOL(___copy_to_user);
234EXPORT_SYMBOL(___copy_from_user);
235EXPORT_SYMBOL(___copy_in_user);
236EXPORT_SYMBOL(copy_to_user_fixup); 159EXPORT_SYMBOL(copy_to_user_fixup);
237EXPORT_SYMBOL(copy_from_user_fixup); 160EXPORT_SYMBOL(copy_from_user_fixup);
238EXPORT_SYMBOL(copy_in_user_fixup); 161EXPORT_SYMBOL(copy_in_user_fixup);
239EXPORT_SYMBOL(__strncpy_from_user);
240EXPORT_SYMBOL(__clear_user);
241 162
242/* Various address conversion macros use this. */ 163/* Various address conversion macros use this. */
243EXPORT_SYMBOL(sparc64_valid_addr_bitmap); 164EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
@@ -247,17 +168,6 @@ EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
247 */ 168 */
248EXPORT_SYMBOL(__ret_efault); 169EXPORT_SYMBOL(__ret_efault);
249 170
250/* No version information on these, as gcc produces such symbols. */
251EXPORT_SYMBOL(memcmp);
252EXPORT_SYMBOL(memcpy);
253EXPORT_SYMBOL(memset);
254EXPORT_SYMBOL(memmove);
255EXPORT_SYMBOL(strncmp);
256
257void VISenter(void);
258/* RAID code needs this */
259EXPORT_SYMBOL(VISenter);
260
261/* for input/keybdev */ 171/* for input/keybdev */
262EXPORT_SYMBOL(sun_do_break); 172EXPORT_SYMBOL(sun_do_break);
263EXPORT_SYMBOL(stop_a_enabled); 173EXPORT_SYMBOL(stop_a_enabled);
@@ -271,14 +181,4 @@ EXPORT_SYMBOL(ns87303_lock);
271 181
272EXPORT_SYMBOL(tick_ops); 182EXPORT_SYMBOL(tick_ops);
273 183
274EXPORT_SYMBOL(xor_vis_2);
275EXPORT_SYMBOL(xor_vis_3);
276EXPORT_SYMBOL(xor_vis_4);
277EXPORT_SYMBOL(xor_vis_5);
278
279EXPORT_SYMBOL(xor_niagara_2);
280EXPORT_SYMBOL(xor_niagara_3);
281EXPORT_SYMBOL(xor_niagara_4);
282EXPORT_SYMBOL(xor_niagara_5);
283
284EXPORT_SYMBOL_GPL(real_hard_smp_processor_id); 184EXPORT_SYMBOL_GPL(real_hard_smp_processor_id);