aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-08-19 18:00:05 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2014-09-25 09:14:40 -0400
commit5144b6bfe25fda7c51f6f9d8d79cf0fe61df5c28 (patch)
tree106dd73d74fa3ba6305eb6460a1bb7bff55d082f
parent7b20a955c3eec58e87f3d32cc1438eab6447ff4c (diff)
powerpc: Separate ppc32 symbol exports into ppc_ksyms_32.c
Simplify things considerably by moving all the ppc32 specific symbol exports into its own file. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/Makefile3
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c123
-rw-r--r--arch/powerpc/kernel/ppc_ksyms_32.c61
3 files changed, 79 insertions, 108 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 670c312d914e..502cf69b6c89 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -93,6 +93,9 @@ obj-$(CONFIG_PPC32) += entry_32.o setup_32.o
93obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o 93obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o
94obj-$(CONFIG_KGDB) += kgdb.o 94obj-$(CONFIG_KGDB) += kgdb.o
95obj-$(CONFIG_MODULES) += ppc_ksyms.o 95obj-$(CONFIG_MODULES) += ppc_ksyms.o
96ifeq ($(CONFIG_PPC32),y)
97obj-$(CONFIG_MODULES) += ppc_ksyms_32.o
98endif
96obj-$(CONFIG_BOOTX_TEXT) += btext.o 99obj-$(CONFIG_BOOTX_TEXT) += btext.o
97obj-$(CONFIG_SMP) += smp.o 100obj-$(CONFIG_SMP) += smp.o
98obj-$(CONFIG_KPROBES) += kprobes.o 101obj-$(CONFIG_KPROBES) += kprobes.o
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index aba41f344936..c4dfff6c2719 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -1,135 +1,42 @@
1#include <linux/export.h> 1#include <linux/ftrace.h>
2#include <linux/threads.h> 2#include <linux/mm.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>
8#include <linux/vt_kern.h>
9#include <linux/nvram.h>
10#include <linux/irq.h>
11#include <linux/pci.h>
12#include <linux/delay.h>
13#include <linux/bitops.h>
14 3
15#include <asm/page.h>
16#include <asm/processor.h> 4#include <asm/processor.h>
17#include <asm/cacheflush.h>
18#include <asm/uaccess.h>
19#include <asm/io.h>
20#include <linux/atomic.h>
21#include <asm/checksum.h>
22#include <asm/pgtable.h>
23#include <asm/tlbflush.h>
24#include <linux/adb.h>
25#include <linux/cuda.h>
26#include <linux/pmu.h>
27#include <asm/prom.h>
28#include <asm/pci-bridge.h>
29#include <asm/irq.h>
30#include <asm/pmac_feature.h>
31#include <asm/dma.h>
32#include <asm/machdep.h>
33#include <asm/hw_irq.h>
34#include <asm/nvram.h>
35#include <asm/mmu_context.h>
36#include <asm/backlight.h>
37#include <asm/time.h>
38#include <asm/cputable.h>
39#include <asm/btext.h>
40#include <asm/div64.h>
41#include <asm/signal.h>
42#include <asm/dcr.h>
43#include <asm/ftrace.h>
44#include <asm/switch_to.h> 5#include <asm/switch_to.h>
6#include <asm/cacheflush.h>
45#include <asm/epapr_hcalls.h> 7#include <asm/epapr_hcalls.h>
46 8
47#ifdef CONFIG_PPC32 9EXPORT_SYMBOL(flush_dcache_range);
48EXPORT_SYMBOL(clear_pages); 10EXPORT_SYMBOL(flush_icache_range);
49EXPORT_SYMBOL(ISA_DMA_THRESHOLD); 11
50EXPORT_SYMBOL(DMA_MODE_READ); 12EXPORT_SYMBOL(empty_zero_page);
51EXPORT_SYMBOL(DMA_MODE_WRITE); 13
52#endif 14long long __bswapdi2(long long);
15EXPORT_SYMBOL(__bswapdi2);
53 16
54#ifdef CONFIG_FUNCTION_TRACER 17#ifdef CONFIG_FUNCTION_TRACER
55EXPORT_SYMBOL(_mcount); 18EXPORT_SYMBOL(_mcount);
56#endif 19#endif
57 20
58#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
59EXPORT_SYMBOL(isa_io_base);
60EXPORT_SYMBOL(isa_mem_base);
61EXPORT_SYMBOL(pci_dram_offset);
62#endif /* CONFIG_PCI */
63
64#ifdef CONFIG_PPC_FPU 21#ifdef CONFIG_PPC_FPU
65EXPORT_SYMBOL(giveup_fpu); 22EXPORT_SYMBOL(giveup_fpu);
66EXPORT_SYMBOL(load_fp_state); 23EXPORT_SYMBOL(load_fp_state);
67EXPORT_SYMBOL(store_fp_state); 24EXPORT_SYMBOL(store_fp_state);
68#endif 25#endif
26
69#ifdef CONFIG_ALTIVEC 27#ifdef CONFIG_ALTIVEC
70EXPORT_SYMBOL(giveup_altivec); 28EXPORT_SYMBOL(giveup_altivec);
71EXPORT_SYMBOL(load_vr_state); 29EXPORT_SYMBOL(load_vr_state);
72EXPORT_SYMBOL(store_vr_state); 30EXPORT_SYMBOL(store_vr_state);
73#endif /* CONFIG_ALTIVEC */
74#ifdef CONFIG_VSX
75EXPORT_SYMBOL_GPL(__giveup_vsx);
76#endif /* CONFIG_VSX */
77#ifdef CONFIG_SPE
78EXPORT_SYMBOL(giveup_spe);
79#endif /* CONFIG_SPE */
80
81#ifndef CONFIG_PPC64
82EXPORT_SYMBOL(flush_instruction_cache);
83#endif
84EXPORT_SYMBOL(flush_dcache_range);
85EXPORT_SYMBOL(flush_icache_range);
86
87#ifdef CONFIG_SMP
88#ifdef CONFIG_PPC32
89EXPORT_SYMBOL(smp_hw_index);
90#endif
91#endif
92
93#ifdef CONFIG_PPC32
94long long __ashrdi3(long long, int);
95long long __ashldi3(long long, int);
96long long __lshrdi3(long long, int);
97EXPORT_SYMBOL(__ashrdi3);
98EXPORT_SYMBOL(__ashldi3);
99EXPORT_SYMBOL(__lshrdi3);
100int __ucmpdi2(unsigned long long, unsigned long long);
101EXPORT_SYMBOL(__ucmpdi2);
102int __cmpdi2(long long, long long);
103EXPORT_SYMBOL(__cmpdi2);
104#endif
105long long __bswapdi2(long long);
106EXPORT_SYMBOL(__bswapdi2);
107
108#ifdef CONFIG_PPC32
109EXPORT_SYMBOL(timer_interrupt);
110EXPORT_SYMBOL(tb_ticks_per_jiffy);
111#endif 31#endif
112 32
113#ifdef CONFIG_PPC32 33#ifdef CONFIG_VSX
114EXPORT_SYMBOL(switch_mmu_context); 34EXPORT_SYMBOL_GPL(__giveup_vsx);
115#endif 35#endif
116 36
117#ifdef CONFIG_PPC_STD_MMU_32 37#ifdef CONFIG_SPE
118extern long mol_trampoline; 38EXPORT_SYMBOL(giveup_spe);
119EXPORT_SYMBOL(mol_trampoline); /* For MOL */
120EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
121#ifdef CONFIG_SMP
122extern int mmu_hash_lock;
123EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
124#endif /* CONFIG_SMP */
125extern long *intercept_table;
126EXPORT_SYMBOL(intercept_table);
127#endif /* CONFIG_PPC_STD_MMU_32 */
128#ifdef CONFIG_PPC_DCR_NATIVE
129EXPORT_SYMBOL(__mtdcr);
130EXPORT_SYMBOL(__mfdcr);
131#endif 39#endif
132EXPORT_SYMBOL(empty_zero_page);
133 40
134#ifdef CONFIG_EPAPR_PARAVIRT 41#ifdef CONFIG_EPAPR_PARAVIRT
135EXPORT_SYMBOL(epapr_hypercall_start); 42EXPORT_SYMBOL(epapr_hypercall_start);
diff --git a/arch/powerpc/kernel/ppc_ksyms_32.c b/arch/powerpc/kernel/ppc_ksyms_32.c
new file mode 100644
index 000000000000..30ddd8a24eee
--- /dev/null
+++ b/arch/powerpc/kernel/ppc_ksyms_32.c
@@ -0,0 +1,61 @@
1#include <linux/export.h>
2#include <linux/smp.h>
3
4#include <asm/page.h>
5#include <asm/dma.h>
6#include <asm/io.h>
7#include <asm/hw_irq.h>
8#include <asm/time.h>
9#include <asm/mmu_context.h>
10#include <asm/pgtable.h>
11#include <asm/dcr.h>
12
13EXPORT_SYMBOL(clear_pages);
14EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
15EXPORT_SYMBOL(DMA_MODE_READ);
16EXPORT_SYMBOL(DMA_MODE_WRITE);
17
18#if defined(CONFIG_PCI)
19EXPORT_SYMBOL(isa_io_base);
20EXPORT_SYMBOL(isa_mem_base);
21EXPORT_SYMBOL(pci_dram_offset);
22#endif
23
24#ifdef CONFIG_SMP
25EXPORT_SYMBOL(smp_hw_index);
26#endif
27
28long long __ashrdi3(long long, int);
29long long __ashldi3(long long, int);
30long long __lshrdi3(long long, int);
31int __ucmpdi2(unsigned long long, unsigned long long);
32int __cmpdi2(long long, long long);
33EXPORT_SYMBOL(__ashrdi3);
34EXPORT_SYMBOL(__ashldi3);
35EXPORT_SYMBOL(__lshrdi3);
36EXPORT_SYMBOL(__ucmpdi2);
37EXPORT_SYMBOL(__cmpdi2);
38
39EXPORT_SYMBOL(timer_interrupt);
40EXPORT_SYMBOL(tb_ticks_per_jiffy);
41
42EXPORT_SYMBOL(switch_mmu_context);
43
44#ifdef CONFIG_PPC_STD_MMU_32
45extern long mol_trampoline;
46EXPORT_SYMBOL(mol_trampoline); /* For MOL */
47EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
48#ifdef CONFIG_SMP
49extern int mmu_hash_lock;
50EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
51#endif /* CONFIG_SMP */
52extern long *intercept_table;
53EXPORT_SYMBOL(intercept_table);
54#endif /* CONFIG_PPC_STD_MMU_32 */
55
56#ifdef CONFIG_PPC_DCR_NATIVE
57EXPORT_SYMBOL(__mtdcr);
58EXPORT_SYMBOL(__mfdcr);
59#endif
60
61EXPORT_SYMBOL(flush_instruction_cache);