blob: aa8ee06cf488b1f3de617df99faf0949d49cef0a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* $Id: sparc_ksyms.c,v 1.107 2001/07/17 16:17:33 anton Exp $
2 * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
6 */
7
8/* Tell string.h we don't want memcpy etc. as cpp defines */
9#define EXPORT_SYMTAB_STROPS
10#define PROMLIB_INTERNAL
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/smp.h>
15#include <linux/types.h>
16#include <linux/string.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/in6.h>
20#include <linux/spinlock.h>
21#include <linux/mm.h>
Tom 'spot' Callaway77a6a222005-04-24 20:41:45 -070022#include <linux/syscalls.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#ifdef CONFIG_PCI
24#include <linux/pci.h>
25#endif
26#include <linux/pm.h>
27#ifdef CONFIG_HIGHMEM
28#include <linux/highmem.h>
29#endif
30
31#include <asm/oplib.h>
32#include <asm/delay.h>
33#include <asm/system.h>
34#include <asm/auxio.h>
35#include <asm/pgtable.h>
36#include <asm/io.h>
37#include <asm/irq.h>
38#include <asm/idprom.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070039#include <asm/head.h>
40#include <asm/smp.h>
41#include <asm/mostek.h>
42#include <asm/ptrace.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070043#include <asm/uaccess.h>
44#include <asm/checksum.h>
45#ifdef CONFIG_SBUS
46#include <asm/sbus.h>
47#include <asm/dma.h>
48#endif
49#ifdef CONFIG_PCI
50#include <asm/ebus.h>
51#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#include <asm/io-unit.h>
53#include <asm/bug.h>
54
55extern spinlock_t rtc_lock;
56
57struct poll {
58 int fd;
59 short events;
60 short revents;
61};
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063extern void (*__copy_1page)(void *, const void *);
64extern void __memmove(void *, const void *, __kernel_size_t);
65extern void (*bzero_1page)(void *);
66extern void *__bzero(void *, size_t);
67extern void *__memscan_zero(void *, size_t);
68extern void *__memscan_generic(void *, int, size_t);
69extern int __memcmp(const void *, const void *, __kernel_size_t);
70extern int __strncmp(const char *, const char *, __kernel_size_t);
71
72extern int __ashrdi3(int, int);
73extern int __ashldi3(int, int);
74extern int __lshrdi3(int, int);
75extern int __muldi3(int, int);
76extern int __divdi3(int, int);
77
Linus Torvalds1da177e2005-04-16 15:20:36 -070078/* Private functions with odd calling conventions. */
79extern void ___atomic24_add(void);
80extern void ___atomic24_sub(void);
Tom 'spot' Callaway77a6a222005-04-24 20:41:45 -070081extern void ___rw_read_enter(void);
Al Viro7a39f522006-10-08 14:32:15 +010082extern void ___rw_read_try(void);
Tom 'spot' Callaway77a6a222005-04-24 20:41:45 -070083extern void ___rw_read_exit(void);
84extern void ___rw_write_enter(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
86/* Alias functions whose names begin with "." and export the aliases.
87 * The module references will be fixed up by module_frob_arch_sections.
88 */
Al Viro7caaeab2005-09-11 20:14:07 -070089extern int _Div(int, int);
90extern int _Mul(int, int);
91extern int _Rem(int, int);
92extern unsigned _Udiv(unsigned, unsigned);
93extern unsigned _Umul(unsigned, unsigned);
94extern unsigned _Urem(unsigned, unsigned);
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
96/* used by various drivers */
97EXPORT_SYMBOL(sparc_cpu_model);
98EXPORT_SYMBOL(kernel_thread);
Linus Torvalds1da177e2005-04-16 15:20:36 -070099#ifdef CONFIG_SMP
Al Viro7a39f522006-10-08 14:32:15 +0100100// XXX find what uses (or used) these. AV: see asm/spinlock.h
Tom 'spot' Callaway77a6a222005-04-24 20:41:45 -0700101EXPORT_SYMBOL(___rw_read_enter);
Al Viro7a39f522006-10-08 14:32:15 +0100102EXPORT_SYMBOL(___rw_read_try);
Tom 'spot' Callaway77a6a222005-04-24 20:41:45 -0700103EXPORT_SYMBOL(___rw_read_exit);
104EXPORT_SYMBOL(___rw_write_enter);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106
107EXPORT_SYMBOL(sparc_valid_addr_bitmap);
108EXPORT_SYMBOL(phys_base);
109EXPORT_SYMBOL(pfn_base);
110
111/* Atomic operations. */
112EXPORT_SYMBOL(___atomic24_add);
113EXPORT_SYMBOL(___atomic24_sub);
114
Tom 'spot' Callaway962bd562005-04-24 20:45:06 -0700115/* Per-CPU information table */
116EXPORT_PER_CPU_SYMBOL(__cpu_data);
117
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118#ifdef CONFIG_SMP
119/* IRQ implementation. */
120EXPORT_SYMBOL(synchronize_irq);
121
Tom 'spot' Callaway962bd562005-04-24 20:45:06 -0700122/* CPU online map and active count. */
123EXPORT_SYMBOL(cpu_online_map);
124EXPORT_SYMBOL(phys_cpu_present_map);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125#endif
126
127EXPORT_SYMBOL(__udelay);
128EXPORT_SYMBOL(__ndelay);
129EXPORT_SYMBOL(rtc_lock);
130EXPORT_SYMBOL(mostek_lock);
131EXPORT_SYMBOL(mstk48t02_regs);
132#ifdef CONFIG_SUN_AUXIO
133EXPORT_SYMBOL(set_auxio);
134EXPORT_SYMBOL(get_auxio);
135#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136EXPORT_SYMBOL(io_remap_pfn_range);
137 /* P3: iounit_xxx may be needed, sun4d users */
138/* EXPORT_SYMBOL(iounit_map_dma_init); */
139/* EXPORT_SYMBOL(iounit_map_dma_page); */
140
141#ifndef CONFIG_SMP
142EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
143#else
144EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
145#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
147EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
148EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
149EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_one));
150EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_sgl));
151EXPORT_SYMBOL(BTFIXUP_CALL(mmu_release_scsi_one));
152
Al Viro86ac92e2007-07-22 00:38:24 -0700153EXPORT_SYMBOL(BTFIXUP_CALL(pgprot_noncached));
154
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155#ifdef CONFIG_SBUS
156EXPORT_SYMBOL(sbus_root);
157EXPORT_SYMBOL(dma_chain);
158EXPORT_SYMBOL(sbus_set_sbus64);
159EXPORT_SYMBOL(sbus_alloc_consistent);
160EXPORT_SYMBOL(sbus_free_consistent);
161EXPORT_SYMBOL(sbus_map_single);
162EXPORT_SYMBOL(sbus_unmap_single);
163EXPORT_SYMBOL(sbus_map_sg);
164EXPORT_SYMBOL(sbus_unmap_sg);
165EXPORT_SYMBOL(sbus_dma_sync_single_for_cpu);
166EXPORT_SYMBOL(sbus_dma_sync_single_for_device);
167EXPORT_SYMBOL(sbus_dma_sync_sg_for_cpu);
168EXPORT_SYMBOL(sbus_dma_sync_sg_for_device);
169EXPORT_SYMBOL(sbus_iounmap);
170EXPORT_SYMBOL(sbus_ioremap);
171#endif
172#ifdef CONFIG_PCI
173EXPORT_SYMBOL(ebus_chain);
174EXPORT_SYMBOL(insb);
175EXPORT_SYMBOL(outsb);
176EXPORT_SYMBOL(insw);
177EXPORT_SYMBOL(outsw);
178EXPORT_SYMBOL(insl);
179EXPORT_SYMBOL(outsl);
180EXPORT_SYMBOL(pci_alloc_consistent);
181EXPORT_SYMBOL(pci_free_consistent);
182EXPORT_SYMBOL(pci_map_single);
183EXPORT_SYMBOL(pci_unmap_single);
184EXPORT_SYMBOL(pci_dma_sync_single_for_cpu);
185EXPORT_SYMBOL(pci_dma_sync_single_for_device);
186EXPORT_SYMBOL(pci_dma_sync_sg_for_cpu);
187EXPORT_SYMBOL(pci_dma_sync_sg_for_device);
188EXPORT_SYMBOL(pci_map_sg);
189EXPORT_SYMBOL(pci_unmap_sg);
190EXPORT_SYMBOL(pci_map_page);
191EXPORT_SYMBOL(pci_unmap_page);
192/* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
193EXPORT_SYMBOL(ioremap);
194EXPORT_SYMBOL(iounmap);
195#endif
196
197/* in arch/sparc/mm/highmem.c */
198#ifdef CONFIG_HIGHMEM
199EXPORT_SYMBOL(kmap_atomic);
200EXPORT_SYMBOL(kunmap_atomic);
201#endif
202
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203/* prom symbols */
204EXPORT_SYMBOL(idprom);
205EXPORT_SYMBOL(prom_root_node);
206EXPORT_SYMBOL(prom_getchild);
207EXPORT_SYMBOL(prom_getsibling);
208EXPORT_SYMBOL(prom_searchsiblings);
209EXPORT_SYMBOL(prom_firstprop);
210EXPORT_SYMBOL(prom_nextprop);
211EXPORT_SYMBOL(prom_getproplen);
212EXPORT_SYMBOL(prom_getproperty);
213EXPORT_SYMBOL(prom_node_has_property);
214EXPORT_SYMBOL(prom_setprop);
215EXPORT_SYMBOL(saved_command_line);
216EXPORT_SYMBOL(prom_apply_obio_ranges);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217EXPORT_SYMBOL(prom_feval);
218EXPORT_SYMBOL(prom_getbool);
219EXPORT_SYMBOL(prom_getstring);
220EXPORT_SYMBOL(prom_getint);
221EXPORT_SYMBOL(prom_getintdefault);
222EXPORT_SYMBOL(prom_finddevice);
223EXPORT_SYMBOL(romvec);
224EXPORT_SYMBOL(__prom_getchild);
225EXPORT_SYMBOL(__prom_getsibling);
226
227/* sparc library symbols */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228EXPORT_SYMBOL(memscan);
229EXPORT_SYMBOL(strlen);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700230EXPORT_SYMBOL(strncmp);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231EXPORT_SYMBOL(page_kernel);
232
233/* Special internal versions of library functions. */
234EXPORT_SYMBOL(__copy_1page);
235EXPORT_SYMBOL(__memcpy);
236EXPORT_SYMBOL(__memset);
237EXPORT_SYMBOL(bzero_1page);
238EXPORT_SYMBOL(__bzero);
239EXPORT_SYMBOL(__memscan_zero);
240EXPORT_SYMBOL(__memscan_generic);
241EXPORT_SYMBOL(__memcmp);
242EXPORT_SYMBOL(__strncmp);
243EXPORT_SYMBOL(__memmove);
244
245/* Moving data to/from userspace. */
246EXPORT_SYMBOL(__copy_user);
247EXPORT_SYMBOL(__strncpy_from_user);
Al Viro86ac92e2007-07-22 00:38:24 -0700248EXPORT_SYMBOL(__strnlen_user);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249
250/* Networking helper routines. */
251EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
252EXPORT_SYMBOL(csum_partial);
253
254/* Cache flushing. */
255EXPORT_SYMBOL(sparc_flush_page_to_ram);
256
257/* For when serial stuff is built as modules. */
258EXPORT_SYMBOL(sun_do_break);
259
260EXPORT_SYMBOL(__ret_efault);
261
262EXPORT_SYMBOL(memcmp);
263EXPORT_SYMBOL(memcpy);
264EXPORT_SYMBOL(memset);
265EXPORT_SYMBOL(memmove);
266EXPORT_SYMBOL(__ashrdi3);
267EXPORT_SYMBOL(__ashldi3);
268EXPORT_SYMBOL(__lshrdi3);
269EXPORT_SYMBOL(__muldi3);
270EXPORT_SYMBOL(__divdi3);
271
Al Viro7caaeab2005-09-11 20:14:07 -0700272EXPORT_SYMBOL(_Rem);
273EXPORT_SYMBOL(_Urem);
274EXPORT_SYMBOL(_Mul);
275EXPORT_SYMBOL(_Umul);
276EXPORT_SYMBOL(_Div);
277EXPORT_SYMBOL(_Udiv);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278
279#ifdef CONFIG_DEBUG_BUGVERBOSE
280EXPORT_SYMBOL(do_BUG);
281#endif
282
283/* Sun Power Management Idle Handler */
284EXPORT_SYMBOL(pm_idle);
Aneesh Kumar K.V35802c02008-04-29 08:11:12 -0400285
286EXPORT_SYMBOL(empty_zero_page);