blob: b2edac8ddf0a5281c9635c4d5913092d4cf19918 [file] [log] [blame]
Paul Mackerras20c8c212005-09-28 20:28:14 +10001#include <linux/module.h>
2#include <linux/threads.h>
3#include <linux/smp.h>
4#include <linux/sched.h>
5#include <linux/elfcore.h>
6#include <linux/string.h>
7#include <linux/interrupt.h>
Jon Smirl894673e2006-07-10 04:44:13 -07008#include <linux/screen_info.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +10009#include <linux/vt_kern.h>
10#include <linux/nvram.h>
11#include <linux/console.h>
12#include <linux/irq.h>
13#include <linux/pci.h>
14#include <linux/delay.h>
15#include <linux/ide.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100016#include <linux/bitops.h>
17
18#include <asm/page.h>
19#include <asm/semaphore.h>
20#include <asm/processor.h>
21#include <asm/uaccess.h>
22#include <asm/io.h>
23#include <asm/ide.h>
24#include <asm/atomic.h>
25#include <asm/checksum.h>
26#include <asm/pgtable.h>
27#include <asm/tlbflush.h>
28#include <linux/adb.h>
29#include <linux/cuda.h>
30#include <linux/pmu.h>
31#include <asm/prom.h>
32#include <asm/system.h>
33#include <asm/pci-bridge.h>
34#include <asm/irq.h>
35#include <asm/pmac_feature.h>
36#include <asm/dma.h>
37#include <asm/machdep.h>
38#include <asm/hw_irq.h>
39#include <asm/nvram.h>
40#include <asm/mmu_context.h>
41#include <asm/backlight.h>
42#include <asm/time.h>
43#include <asm/cputable.h>
44#include <asm/btext.h>
45#include <asm/div64.h>
David Gibsonc5ff7002005-11-09 11:21:07 +110046#include <asm/signal.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100047
48#ifdef CONFIG_8xx
49#include <asm/commproc.h>
50#endif
51
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100052#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +100053extern void transfer_to_handler(void);
54extern void do_IRQ(struct pt_regs *regs);
Stephen Rothwelldc1c1ca2005-10-01 18:43:42 +100055extern void machine_check_exception(struct pt_regs *regs);
56extern void alignment_exception(struct pt_regs *regs);
57extern void program_check_exception(struct pt_regs *regs);
58extern void single_step_exception(struct pt_regs *regs);
Paul Mackerras20c8c212005-09-28 20:28:14 +100059extern int sys_sigreturn(struct pt_regs *regs);
60
Paul Mackerras20c8c212005-09-28 20:28:14 +100061EXPORT_SYMBOL(clear_pages);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100062EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
63EXPORT_SYMBOL(DMA_MODE_READ);
64EXPORT_SYMBOL(DMA_MODE_WRITE);
65EXPORT_SYMBOL(__div64_32);
66
Paul Mackerras20c8c212005-09-28 20:28:14 +100067EXPORT_SYMBOL(do_signal);
68EXPORT_SYMBOL(transfer_to_handler);
69EXPORT_SYMBOL(do_IRQ);
Stephen Rothwelldc1c1ca2005-10-01 18:43:42 +100070EXPORT_SYMBOL(machine_check_exception);
71EXPORT_SYMBOL(alignment_exception);
72EXPORT_SYMBOL(program_check_exception);
73EXPORT_SYMBOL(single_step_exception);
Paul Mackerras20c8c212005-09-28 20:28:14 +100074EXPORT_SYMBOL(sys_sigreturn);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100075#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +100076
Paul Mackerras20c8c212005-09-28 20:28:14 +100077EXPORT_SYMBOL(strcpy);
78EXPORT_SYMBOL(strncpy);
79EXPORT_SYMBOL(strcat);
Paul Mackerras20c8c212005-09-28 20:28:14 +100080EXPORT_SYMBOL(strlen);
Paul Mackerras20c8c212005-09-28 20:28:14 +100081EXPORT_SYMBOL(strcmp);
Paul Mackerras20c8c212005-09-28 20:28:14 +100082EXPORT_SYMBOL(strcasecmp);
Kumar Gala34ddf732006-04-02 16:01:58 -050083EXPORT_SYMBOL(strncasecmp);
Paul Mackerras20c8c212005-09-28 20:28:14 +100084
85EXPORT_SYMBOL(csum_partial);
86EXPORT_SYMBOL(csum_partial_copy_generic);
87EXPORT_SYMBOL(ip_fast_csum);
88EXPORT_SYMBOL(csum_tcpudp_magic);
89
90EXPORT_SYMBOL(__copy_tofrom_user);
91EXPORT_SYMBOL(__clear_user);
92EXPORT_SYMBOL(__strncpy_from_user);
93EXPORT_SYMBOL(__strnlen_user);
David Howells3dd836a2006-09-12 16:04:25 +010094#ifdef CONFIG_PPC64
95EXPORT_SYMBOL(copy_4K_page);
96#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +100097
Ben Collinsfa63b222005-11-15 00:09:09 -080098#ifndef __powerpc64__
99EXPORT_SYMBOL(__ide_mm_insl);
100EXPORT_SYMBOL(__ide_mm_outsw);
101EXPORT_SYMBOL(__ide_mm_insw);
102EXPORT_SYMBOL(__ide_mm_outsl);
103#endif
104
Paul Mackerras20c8c212005-09-28 20:28:14 +1000105EXPORT_SYMBOL(_insb);
106EXPORT_SYMBOL(_outsb);
107EXPORT_SYMBOL(_insw);
108EXPORT_SYMBOL(_outsw);
109EXPORT_SYMBOL(_insl);
110EXPORT_SYMBOL(_outsl);
111EXPORT_SYMBOL(_insw_ns);
112EXPORT_SYMBOL(_outsw_ns);
113EXPORT_SYMBOL(_insl_ns);
114EXPORT_SYMBOL(_outsl_ns);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000115
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000116#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE))
Paul Mackerras20c8c212005-09-28 20:28:14 +1000117EXPORT_SYMBOL(ppc_ide_md);
118#endif
119
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000120#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
Paul Mackerras20c8c212005-09-28 20:28:14 +1000121EXPORT_SYMBOL(isa_io_base);
122EXPORT_SYMBOL(isa_mem_base);
123EXPORT_SYMBOL(pci_dram_offset);
124EXPORT_SYMBOL(pci_alloc_consistent);
125EXPORT_SYMBOL(pci_free_consistent);
126EXPORT_SYMBOL(pci_bus_io_base);
127EXPORT_SYMBOL(pci_bus_io_base_phys);
128EXPORT_SYMBOL(pci_bus_mem_base_phys);
129EXPORT_SYMBOL(pci_bus_to_hose);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000130#endif /* CONFIG_PCI */
131
Paul Mackerras20c8c212005-09-28 20:28:14 +1000132EXPORT_SYMBOL(start_thread);
133EXPORT_SYMBOL(kernel_thread);
134
Paul Mackerras20c8c212005-09-28 20:28:14 +1000135EXPORT_SYMBOL(giveup_fpu);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000136#ifdef CONFIG_ALTIVEC
Paul Mackerras20c8c212005-09-28 20:28:14 +1000137EXPORT_SYMBOL(giveup_altivec);
138#endif /* CONFIG_ALTIVEC */
139#ifdef CONFIG_SPE
Paul Mackerras20c8c212005-09-28 20:28:14 +1000140EXPORT_SYMBOL(giveup_spe);
141#endif /* CONFIG_SPE */
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000142
Paul Mackerras666acb92005-11-29 15:50:58 +1100143#ifndef CONFIG_PPC64
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000144EXPORT_SYMBOL(flush_instruction_cache);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000145EXPORT_SYMBOL(flush_tlb_kernel_range);
146EXPORT_SYMBOL(flush_tlb_page);
147EXPORT_SYMBOL(_tlbie);
148#endif
Paul Mackerras666acb92005-11-29 15:50:58 +1100149EXPORT_SYMBOL(__flush_icache_range);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000150EXPORT_SYMBOL(flush_dcache_range);
151
Paul Mackerras20c8c212005-09-28 20:28:14 +1000152#ifdef CONFIG_SMP
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000153#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000154EXPORT_SYMBOL(smp_hw_index);
155#endif
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000156#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +1000157
158#ifdef CONFIG_ADB
159EXPORT_SYMBOL(adb_request);
160EXPORT_SYMBOL(adb_register);
161EXPORT_SYMBOL(adb_unregister);
162EXPORT_SYMBOL(adb_poll);
163EXPORT_SYMBOL(adb_try_handler_change);
164#endif /* CONFIG_ADB */
165#ifdef CONFIG_ADB_CUDA
166EXPORT_SYMBOL(cuda_request);
167EXPORT_SYMBOL(cuda_poll);
168#endif /* CONFIG_ADB_CUDA */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000169#ifdef CONFIG_VT
170EXPORT_SYMBOL(kd_mksound);
171#endif
172EXPORT_SYMBOL(to_tm);
173
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000174#ifdef CONFIG_PPC32
175long long __ashrdi3(long long, int);
176long long __ashldi3(long long, int);
177long long __lshrdi3(long long, int);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000178EXPORT_SYMBOL(__ashrdi3);
179EXPORT_SYMBOL(__ashldi3);
180EXPORT_SYMBOL(__lshrdi3);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000181#endif
182
Paul Mackerras20c8c212005-09-28 20:28:14 +1000183EXPORT_SYMBOL(memcpy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000184EXPORT_SYMBOL(memset);
185EXPORT_SYMBOL(memmove);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000186EXPORT_SYMBOL(memcmp);
187EXPORT_SYMBOL(memchr);
188
189#if defined(CONFIG_FB_VGA16_MODULE)
190EXPORT_SYMBOL(screen_info);
191#endif
192
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000193#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000194EXPORT_SYMBOL(timer_interrupt);
195EXPORT_SYMBOL(irq_desc);
196EXPORT_SYMBOL(tb_ticks_per_jiffy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000197EXPORT_SYMBOL(console_drivers);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000198EXPORT_SYMBOL(cacheable_memcpy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000199#endif
200
Paul Mackerras20c8c212005-09-28 20:28:14 +1000201#ifdef CONFIG_8xx
202EXPORT_SYMBOL(cpm_install_handler);
203EXPORT_SYMBOL(cpm_free_handler);
204#endif /* CONFIG_8xx */
Kumar Gala7d13d21a2006-01-13 11:19:58 -0600205#if defined(CONFIG_8xx) || defined(CONFIG_40x)
Paul Mackerras20c8c212005-09-28 20:28:14 +1000206EXPORT_SYMBOL(__res);
207#endif
208
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000209#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000210EXPORT_SYMBOL(next_mmu_context);
211EXPORT_SYMBOL(set_context);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000212#endif
213
214#ifdef CONFIG_PPC_STD_MMU_32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000215extern long mol_trampoline;
216EXPORT_SYMBOL(mol_trampoline); /* For MOL */
217EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
218#ifdef CONFIG_SMP
219extern int mmu_hash_lock;
220EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
221#endif /* CONFIG_SMP */
222extern long *intercept_table;
223EXPORT_SYMBOL(intercept_table);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000224#endif /* CONFIG_PPC_STD_MMU_32 */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000225#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
226EXPORT_SYMBOL(__mtdcr);
227EXPORT_SYMBOL(__mfdcr);
228#endif