blob: 958ecb9ae7dca9e5705000debc3d19f0a48428f1 [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>
Paul Mackerras20c8c212005-09-28 20:28:14 +100011#include <linux/irq.h>
12#include <linux/pci.h>
13#include <linux/delay.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100014#include <linux/bitops.h>
15
16#include <asm/page.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100017#include <asm/processor.h>
Emil Medve576e3932007-09-20 12:25:17 +100018#include <asm/cacheflush.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100019#include <asm/uaccess.h>
20#include <asm/io.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100021#include <asm/atomic.h>
22#include <asm/checksum.h>
23#include <asm/pgtable.h>
24#include <asm/tlbflush.h>
25#include <linux/adb.h>
26#include <linux/cuda.h>
27#include <linux/pmu.h>
28#include <asm/prom.h>
29#include <asm/system.h>
30#include <asm/pci-bridge.h>
31#include <asm/irq.h>
32#include <asm/pmac_feature.h>
33#include <asm/dma.h>
34#include <asm/machdep.h>
35#include <asm/hw_irq.h>
36#include <asm/nvram.h>
37#include <asm/mmu_context.h>
38#include <asm/backlight.h>
39#include <asm/time.h>
40#include <asm/cputable.h>
41#include <asm/btext.h>
42#include <asm/div64.h>
David Gibsonc5ff7002005-11-09 11:21:07 +110043#include <asm/signal.h>
David Gibsona2c70212007-02-06 11:48:28 +110044#include <asm/dcr.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100045
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100046#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +100047extern void transfer_to_handler(void);
48extern void do_IRQ(struct pt_regs *regs);
Stephen Rothwelldc1c1ca2005-10-01 18:43:42 +100049extern void machine_check_exception(struct pt_regs *regs);
50extern void alignment_exception(struct pt_regs *regs);
51extern void program_check_exception(struct pt_regs *regs);
52extern void single_step_exception(struct pt_regs *regs);
Paul Mackerras20c8c212005-09-28 20:28:14 +100053extern int sys_sigreturn(struct pt_regs *regs);
54
Paul Mackerras20c8c212005-09-28 20:28:14 +100055EXPORT_SYMBOL(clear_pages);
Joseph Fanninab1f89b2008-01-02 02:36:07 +110056EXPORT_SYMBOL(copy_page);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100057EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
58EXPORT_SYMBOL(DMA_MODE_READ);
59EXPORT_SYMBOL(DMA_MODE_WRITE);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100060
Paul Mackerras20c8c212005-09-28 20:28:14 +100061EXPORT_SYMBOL(transfer_to_handler);
62EXPORT_SYMBOL(do_IRQ);
Stephen Rothwelldc1c1ca2005-10-01 18:43:42 +100063EXPORT_SYMBOL(machine_check_exception);
64EXPORT_SYMBOL(alignment_exception);
65EXPORT_SYMBOL(program_check_exception);
66EXPORT_SYMBOL(single_step_exception);
Paul Mackerras20c8c212005-09-28 20:28:14 +100067EXPORT_SYMBOL(sys_sigreturn);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100068#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +100069
Paul Mackerras20c8c212005-09-28 20:28:14 +100070EXPORT_SYMBOL(strcpy);
71EXPORT_SYMBOL(strncpy);
72EXPORT_SYMBOL(strcat);
Paul Mackerras20c8c212005-09-28 20:28:14 +100073EXPORT_SYMBOL(strlen);
Paul Mackerras20c8c212005-09-28 20:28:14 +100074EXPORT_SYMBOL(strcmp);
Steven Rostedt01195362008-03-01 03:04:57 +110075EXPORT_SYMBOL(strncmp);
Paul Mackerras20c8c212005-09-28 20:28:14 +100076
77EXPORT_SYMBOL(csum_partial);
78EXPORT_SYMBOL(csum_partial_copy_generic);
79EXPORT_SYMBOL(ip_fast_csum);
80EXPORT_SYMBOL(csum_tcpudp_magic);
81
82EXPORT_SYMBOL(__copy_tofrom_user);
83EXPORT_SYMBOL(__clear_user);
84EXPORT_SYMBOL(__strncpy_from_user);
85EXPORT_SYMBOL(__strnlen_user);
David Howells3dd836a2006-09-12 16:04:25 +010086#ifdef CONFIG_PPC64
87EXPORT_SYMBOL(copy_4K_page);
88#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +100089
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100090#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
Paul Mackerras20c8c212005-09-28 20:28:14 +100091EXPORT_SYMBOL(isa_io_base);
92EXPORT_SYMBOL(isa_mem_base);
93EXPORT_SYMBOL(pci_dram_offset);
94EXPORT_SYMBOL(pci_alloc_consistent);
95EXPORT_SYMBOL(pci_free_consistent);
Paul Mackerras20c8c212005-09-28 20:28:14 +100096#endif /* CONFIG_PCI */
97
Paul Mackerras20c8c212005-09-28 20:28:14 +100098EXPORT_SYMBOL(start_thread);
99EXPORT_SYMBOL(kernel_thread);
100
Paul Mackerras20c8c212005-09-28 20:28:14 +1000101EXPORT_SYMBOL(giveup_fpu);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000102#ifdef CONFIG_ALTIVEC
Paul Mackerras20c8c212005-09-28 20:28:14 +1000103EXPORT_SYMBOL(giveup_altivec);
104#endif /* CONFIG_ALTIVEC */
Michael Neulingce48b212008-06-25 14:07:18 +1000105#ifdef CONFIG_VSX
106EXPORT_SYMBOL(giveup_vsx);
107#endif /* CONFIG_VSX */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000108#ifdef CONFIG_SPE
Paul Mackerras20c8c212005-09-28 20:28:14 +1000109EXPORT_SYMBOL(giveup_spe);
110#endif /* CONFIG_SPE */
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000111
Paul Mackerras666acb92005-11-29 15:50:58 +1100112#ifndef CONFIG_PPC64
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000113EXPORT_SYMBOL(flush_instruction_cache);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000114EXPORT_SYMBOL(flush_tlb_kernel_range);
115EXPORT_SYMBOL(flush_tlb_page);
116EXPORT_SYMBOL(_tlbie);
117#endif
Paul Mackerras666acb92005-11-29 15:50:58 +1100118EXPORT_SYMBOL(__flush_icache_range);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000119EXPORT_SYMBOL(flush_dcache_range);
120
Paul Mackerras20c8c212005-09-28 20:28:14 +1000121#ifdef CONFIG_SMP
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000122#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000123EXPORT_SYMBOL(smp_hw_index);
124#endif
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000125#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +1000126
127#ifdef CONFIG_ADB
128EXPORT_SYMBOL(adb_request);
129EXPORT_SYMBOL(adb_register);
130EXPORT_SYMBOL(adb_unregister);
131EXPORT_SYMBOL(adb_poll);
132EXPORT_SYMBOL(adb_try_handler_change);
133#endif /* CONFIG_ADB */
134#ifdef CONFIG_ADB_CUDA
135EXPORT_SYMBOL(cuda_request);
136EXPORT_SYMBOL(cuda_poll);
137#endif /* CONFIG_ADB_CUDA */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000138EXPORT_SYMBOL(to_tm);
139
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000140#ifdef CONFIG_PPC32
141long long __ashrdi3(long long, int);
142long long __ashldi3(long long, int);
143long long __lshrdi3(long long, int);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000144EXPORT_SYMBOL(__ashrdi3);
145EXPORT_SYMBOL(__ashldi3);
146EXPORT_SYMBOL(__lshrdi3);
Paul Mackerras95ff54f2008-03-13 09:39:55 +1100147int __ucmpdi2(unsigned long long, unsigned long long);
148EXPORT_SYMBOL(__ucmpdi2);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000149#endif
150
Paul Mackerras20c8c212005-09-28 20:28:14 +1000151EXPORT_SYMBOL(memcpy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000152EXPORT_SYMBOL(memset);
153EXPORT_SYMBOL(memmove);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000154EXPORT_SYMBOL(memcmp);
155EXPORT_SYMBOL(memchr);
156
157#if defined(CONFIG_FB_VGA16_MODULE)
158EXPORT_SYMBOL(screen_info);
159#endif
160
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000161#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000162EXPORT_SYMBOL(timer_interrupt);
163EXPORT_SYMBOL(irq_desc);
164EXPORT_SYMBOL(tb_ticks_per_jiffy);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000165EXPORT_SYMBOL(cacheable_memcpy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000166#endif
167
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000168#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000169EXPORT_SYMBOL(next_mmu_context);
170EXPORT_SYMBOL(set_context);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000171#endif
172
173#ifdef CONFIG_PPC_STD_MMU_32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000174extern long mol_trampoline;
175EXPORT_SYMBOL(mol_trampoline); /* For MOL */
176EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
177#ifdef CONFIG_SMP
178extern int mmu_hash_lock;
179EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
180#endif /* CONFIG_SMP */
181extern long *intercept_table;
182EXPORT_SYMBOL(intercept_table);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000183#endif /* CONFIG_PPC_STD_MMU_32 */
Kumar Gala45d8e7a2006-12-10 23:15:47 -0600184#ifdef CONFIG_PPC_DCR_NATIVE
Paul Mackerras20c8c212005-09-28 20:28:14 +1000185EXPORT_SYMBOL(__mtdcr);
186EXPORT_SYMBOL(__mfdcr);
187#endif
Stephen Rothwellbceabd12008-03-13 16:20:31 +1100188EXPORT_SYMBOL(empty_zero_page);