blob: 786a2700ec2d541d3544d23635b72b40dc75e64b [file] [log] [blame]
Paul Gortmaker4b16f8e2011-07-22 18:24:23 -04001#include <linux/export.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +10002#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>
Arun Sharma600634972011-07-26 16:09:06 -070021#include <linux/atomic.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100022#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>
Paul Mackerras20c8c212005-09-28 20:28:14 +100029#include <asm/pci-bridge.h>
30#include <asm/irq.h>
31#include <asm/pmac_feature.h>
32#include <asm/dma.h>
33#include <asm/machdep.h>
34#include <asm/hw_irq.h>
35#include <asm/nvram.h>
36#include <asm/mmu_context.h>
37#include <asm/backlight.h>
38#include <asm/time.h>
39#include <asm/cputable.h>
40#include <asm/btext.h>
41#include <asm/div64.h>
David Gibsonc5ff7002005-11-09 11:21:07 +110042#include <asm/signal.h>
David Gibsona2c70212007-02-06 11:48:28 +110043#include <asm/dcr.h>
Steven Rostedtccbfac22008-05-22 14:31:07 -040044#include <asm/ftrace.h>
David Howellsae3a197e2012-03-28 18:30:02 +010045#include <asm/switch_to.h>
Paul Mackerras20c8c212005-09-28 20:28:14 +100046
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100047#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +100048extern void transfer_to_handler(void);
49extern void do_IRQ(struct pt_regs *regs);
Stephen Rothwelldc1c1ca2005-10-01 18:43:42 +100050extern void machine_check_exception(struct pt_regs *regs);
51extern void alignment_exception(struct pt_regs *regs);
52extern void program_check_exception(struct pt_regs *regs);
53extern void single_step_exception(struct pt_regs *regs);
Paul Mackerras20c8c212005-09-28 20:28:14 +100054extern int sys_sigreturn(struct pt_regs *regs);
55
Paul Mackerras20c8c212005-09-28 20:28:14 +100056EXPORT_SYMBOL(clear_pages);
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
Steven Rostedt606576c2008-10-06 19:06:12 -040070#ifdef CONFIG_FUNCTION_TRACER
Steven Rostedtccbfac22008-05-22 14:31:07 -040071EXPORT_SYMBOL(_mcount);
72#endif
73
Paul Mackerras20c8c212005-09-28 20:28:14 +100074EXPORT_SYMBOL(strcpy);
75EXPORT_SYMBOL(strncpy);
76EXPORT_SYMBOL(strcat);
Paul Mackerras20c8c212005-09-28 20:28:14 +100077EXPORT_SYMBOL(strlen);
Paul Mackerras20c8c212005-09-28 20:28:14 +100078EXPORT_SYMBOL(strcmp);
Steven Rostedt01195362008-03-01 03:04:57 +110079EXPORT_SYMBOL(strncmp);
Paul Mackerras20c8c212005-09-28 20:28:14 +100080
81EXPORT_SYMBOL(csum_partial);
82EXPORT_SYMBOL(csum_partial_copy_generic);
83EXPORT_SYMBOL(ip_fast_csum);
84EXPORT_SYMBOL(csum_tcpudp_magic);
85
86EXPORT_SYMBOL(__copy_tofrom_user);
87EXPORT_SYMBOL(__clear_user);
88EXPORT_SYMBOL(__strncpy_from_user);
89EXPORT_SYMBOL(__strnlen_user);
Anton Blanchardd988f0e2011-05-08 21:18:38 +000090EXPORT_SYMBOL(copy_page);
Paul Mackerras20c8c212005-09-28 20:28:14 +100091
Paul Mackerras40ef8cb2005-10-10 22:50:37 +100092#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
Paul Mackerras20c8c212005-09-28 20:28:14 +100093EXPORT_SYMBOL(isa_io_base);
94EXPORT_SYMBOL(isa_mem_base);
95EXPORT_SYMBOL(pci_dram_offset);
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);
Alexander Graffbad5f12010-01-15 14:49:09 +0100107EXPORT_SYMBOL_GPL(__giveup_vsx);
Michael Neulingce48b212008-06-25 14:07:18 +1000108#endif /* CONFIG_VSX */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000109#ifdef CONFIG_SPE
Paul Mackerras20c8c212005-09-28 20:28:14 +1000110EXPORT_SYMBOL(giveup_spe);
111#endif /* CONFIG_SPE */
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000112
Paul Mackerras666acb92005-11-29 15:50:58 +1100113#ifndef CONFIG_PPC64
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000114EXPORT_SYMBOL(flush_instruction_cache);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000115#endif
Paul Mackerras666acb92005-11-29 15:50:58 +1100116EXPORT_SYMBOL(__flush_icache_range);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000117EXPORT_SYMBOL(flush_dcache_range);
118
Paul Mackerras20c8c212005-09-28 20:28:14 +1000119#ifdef CONFIG_SMP
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000120#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000121EXPORT_SYMBOL(smp_hw_index);
122#endif
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000123#endif
Paul Mackerras20c8c212005-09-28 20:28:14 +1000124
125#ifdef CONFIG_ADB
126EXPORT_SYMBOL(adb_request);
127EXPORT_SYMBOL(adb_register);
128EXPORT_SYMBOL(adb_unregister);
129EXPORT_SYMBOL(adb_poll);
130EXPORT_SYMBOL(adb_try_handler_change);
131#endif /* CONFIG_ADB */
132#ifdef CONFIG_ADB_CUDA
133EXPORT_SYMBOL(cuda_request);
134EXPORT_SYMBOL(cuda_poll);
135#endif /* CONFIG_ADB_CUDA */
Paul Mackerras20c8c212005-09-28 20:28:14 +1000136EXPORT_SYMBOL(to_tm);
137
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000138#ifdef CONFIG_PPC32
139long long __ashrdi3(long long, int);
140long long __ashldi3(long long, int);
141long long __lshrdi3(long long, int);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000142EXPORT_SYMBOL(__ashrdi3);
143EXPORT_SYMBOL(__ashldi3);
144EXPORT_SYMBOL(__lshrdi3);
Paul Mackerras95ff54f2008-03-13 09:39:55 +1100145int __ucmpdi2(unsigned long long, unsigned long long);
146EXPORT_SYMBOL(__ucmpdi2);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000147#endif
148
Paul Mackerras20c8c212005-09-28 20:28:14 +1000149EXPORT_SYMBOL(memcpy);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000150EXPORT_SYMBOL(memset);
151EXPORT_SYMBOL(memmove);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000152EXPORT_SYMBOL(memcmp);
153EXPORT_SYMBOL(memchr);
154
155#if defined(CONFIG_FB_VGA16_MODULE)
156EXPORT_SYMBOL(screen_info);
157#endif
158
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000159#ifdef CONFIG_PPC32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000160EXPORT_SYMBOL(timer_interrupt);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000161EXPORT_SYMBOL(tb_ticks_per_jiffy);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000162EXPORT_SYMBOL(cacheable_memcpy);
Kumar Gala1edda9c2009-01-06 23:00:05 -0600163EXPORT_SYMBOL(cacheable_memzero);
Paul Mackerras20c8c212005-09-28 20:28:14 +1000164#endif
165
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000166#ifdef CONFIG_PPC32
Benjamin Herrenschmidt5e696612008-12-18 19:13:24 +0000167EXPORT_SYMBOL(switch_mmu_context);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000168#endif
169
170#ifdef CONFIG_PPC_STD_MMU_32
Paul Mackerras20c8c212005-09-28 20:28:14 +1000171extern long mol_trampoline;
172EXPORT_SYMBOL(mol_trampoline); /* For MOL */
173EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
174#ifdef CONFIG_SMP
175extern int mmu_hash_lock;
176EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
177#endif /* CONFIG_SMP */
178extern long *intercept_table;
179EXPORT_SYMBOL(intercept_table);
Paul Mackerras40ef8cb2005-10-10 22:50:37 +1000180#endif /* CONFIG_PPC_STD_MMU_32 */
Kumar Gala45d8e7a2006-12-10 23:15:47 -0600181#ifdef CONFIG_PPC_DCR_NATIVE
Paul Mackerras20c8c212005-09-28 20:28:14 +1000182EXPORT_SYMBOL(__mtdcr);
183EXPORT_SYMBOL(__mfdcr);
184#endif
Stephen Rothwellbceabd12008-03-13 16:20:31 +1100185EXPORT_SYMBOL(empty_zero_page);
Anton Blanchard64ff3122010-08-12 16:28:09 +0000186
187#ifdef CONFIG_PPC64
188EXPORT_SYMBOL(__arch_hweight8);
189EXPORT_SYMBOL(__arch_hweight16);
190EXPORT_SYMBOL(__arch_hweight32);
191EXPORT_SYMBOL(__arch_hweight64);
192#endif