diff options
author | Anton Blanchard <anton@samba.org> | 2014-08-19 18:00:05 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-09-25 09:14:40 -0400 |
commit | 5144b6bfe25fda7c51f6f9d8d79cf0fe61df5c28 (patch) | |
tree | 106dd73d74fa3ba6305eb6460a1bb7bff55d082f | |
parent | 7b20a955c3eec58e87f3d32cc1438eab6447ff4c (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/Makefile | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms.c | 123 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms_32.c | 61 |
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 | |||
93 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o | 93 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o |
94 | obj-$(CONFIG_KGDB) += kgdb.o | 94 | obj-$(CONFIG_KGDB) += kgdb.o |
95 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 95 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
96 | ifeq ($(CONFIG_PPC32),y) | ||
97 | obj-$(CONFIG_MODULES) += ppc_ksyms_32.o | ||
98 | endif | ||
96 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 99 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
97 | obj-$(CONFIG_SMP) += smp.o | 100 | obj-$(CONFIG_SMP) += smp.o |
98 | obj-$(CONFIG_KPROBES) += kprobes.o | 101 | obj-$(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 | 9 | EXPORT_SYMBOL(flush_dcache_range); |
48 | EXPORT_SYMBOL(clear_pages); | 10 | EXPORT_SYMBOL(flush_icache_range); |
49 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); | 11 | |
50 | EXPORT_SYMBOL(DMA_MODE_READ); | 12 | EXPORT_SYMBOL(empty_zero_page); |
51 | EXPORT_SYMBOL(DMA_MODE_WRITE); | 13 | |
52 | #endif | 14 | long long __bswapdi2(long long); |
15 | EXPORT_SYMBOL(__bswapdi2); | ||
53 | 16 | ||
54 | #ifdef CONFIG_FUNCTION_TRACER | 17 | #ifdef CONFIG_FUNCTION_TRACER |
55 | EXPORT_SYMBOL(_mcount); | 18 | EXPORT_SYMBOL(_mcount); |
56 | #endif | 19 | #endif |
57 | 20 | ||
58 | #if defined(CONFIG_PCI) && defined(CONFIG_PPC32) | ||
59 | EXPORT_SYMBOL(isa_io_base); | ||
60 | EXPORT_SYMBOL(isa_mem_base); | ||
61 | EXPORT_SYMBOL(pci_dram_offset); | ||
62 | #endif /* CONFIG_PCI */ | ||
63 | |||
64 | #ifdef CONFIG_PPC_FPU | 21 | #ifdef CONFIG_PPC_FPU |
65 | EXPORT_SYMBOL(giveup_fpu); | 22 | EXPORT_SYMBOL(giveup_fpu); |
66 | EXPORT_SYMBOL(load_fp_state); | 23 | EXPORT_SYMBOL(load_fp_state); |
67 | EXPORT_SYMBOL(store_fp_state); | 24 | EXPORT_SYMBOL(store_fp_state); |
68 | #endif | 25 | #endif |
26 | |||
69 | #ifdef CONFIG_ALTIVEC | 27 | #ifdef CONFIG_ALTIVEC |
70 | EXPORT_SYMBOL(giveup_altivec); | 28 | EXPORT_SYMBOL(giveup_altivec); |
71 | EXPORT_SYMBOL(load_vr_state); | 29 | EXPORT_SYMBOL(load_vr_state); |
72 | EXPORT_SYMBOL(store_vr_state); | 30 | EXPORT_SYMBOL(store_vr_state); |
73 | #endif /* CONFIG_ALTIVEC */ | ||
74 | #ifdef CONFIG_VSX | ||
75 | EXPORT_SYMBOL_GPL(__giveup_vsx); | ||
76 | #endif /* CONFIG_VSX */ | ||
77 | #ifdef CONFIG_SPE | ||
78 | EXPORT_SYMBOL(giveup_spe); | ||
79 | #endif /* CONFIG_SPE */ | ||
80 | |||
81 | #ifndef CONFIG_PPC64 | ||
82 | EXPORT_SYMBOL(flush_instruction_cache); | ||
83 | #endif | ||
84 | EXPORT_SYMBOL(flush_dcache_range); | ||
85 | EXPORT_SYMBOL(flush_icache_range); | ||
86 | |||
87 | #ifdef CONFIG_SMP | ||
88 | #ifdef CONFIG_PPC32 | ||
89 | EXPORT_SYMBOL(smp_hw_index); | ||
90 | #endif | ||
91 | #endif | ||
92 | |||
93 | #ifdef CONFIG_PPC32 | ||
94 | long long __ashrdi3(long long, int); | ||
95 | long long __ashldi3(long long, int); | ||
96 | long long __lshrdi3(long long, int); | ||
97 | EXPORT_SYMBOL(__ashrdi3); | ||
98 | EXPORT_SYMBOL(__ashldi3); | ||
99 | EXPORT_SYMBOL(__lshrdi3); | ||
100 | int __ucmpdi2(unsigned long long, unsigned long long); | ||
101 | EXPORT_SYMBOL(__ucmpdi2); | ||
102 | int __cmpdi2(long long, long long); | ||
103 | EXPORT_SYMBOL(__cmpdi2); | ||
104 | #endif | ||
105 | long long __bswapdi2(long long); | ||
106 | EXPORT_SYMBOL(__bswapdi2); | ||
107 | |||
108 | #ifdef CONFIG_PPC32 | ||
109 | EXPORT_SYMBOL(timer_interrupt); | ||
110 | EXPORT_SYMBOL(tb_ticks_per_jiffy); | ||
111 | #endif | 31 | #endif |
112 | 32 | ||
113 | #ifdef CONFIG_PPC32 | 33 | #ifdef CONFIG_VSX |
114 | EXPORT_SYMBOL(switch_mmu_context); | 34 | EXPORT_SYMBOL_GPL(__giveup_vsx); |
115 | #endif | 35 | #endif |
116 | 36 | ||
117 | #ifdef CONFIG_PPC_STD_MMU_32 | 37 | #ifdef CONFIG_SPE |
118 | extern long mol_trampoline; | 38 | EXPORT_SYMBOL(giveup_spe); |
119 | EXPORT_SYMBOL(mol_trampoline); /* For MOL */ | ||
120 | EXPORT_SYMBOL(flush_hash_pages); /* For MOL */ | ||
121 | #ifdef CONFIG_SMP | ||
122 | extern int mmu_hash_lock; | ||
123 | EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */ | ||
124 | #endif /* CONFIG_SMP */ | ||
125 | extern long *intercept_table; | ||
126 | EXPORT_SYMBOL(intercept_table); | ||
127 | #endif /* CONFIG_PPC_STD_MMU_32 */ | ||
128 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
129 | EXPORT_SYMBOL(__mtdcr); | ||
130 | EXPORT_SYMBOL(__mfdcr); | ||
131 | #endif | 39 | #endif |
132 | EXPORT_SYMBOL(empty_zero_page); | ||
133 | 40 | ||
134 | #ifdef CONFIG_EPAPR_PARAVIRT | 41 | #ifdef CONFIG_EPAPR_PARAVIRT |
135 | EXPORT_SYMBOL(epapr_hypercall_start); | 42 | EXPORT_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 | |||
13 | EXPORT_SYMBOL(clear_pages); | ||
14 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); | ||
15 | EXPORT_SYMBOL(DMA_MODE_READ); | ||
16 | EXPORT_SYMBOL(DMA_MODE_WRITE); | ||
17 | |||
18 | #if defined(CONFIG_PCI) | ||
19 | EXPORT_SYMBOL(isa_io_base); | ||
20 | EXPORT_SYMBOL(isa_mem_base); | ||
21 | EXPORT_SYMBOL(pci_dram_offset); | ||
22 | #endif | ||
23 | |||
24 | #ifdef CONFIG_SMP | ||
25 | EXPORT_SYMBOL(smp_hw_index); | ||
26 | #endif | ||
27 | |||
28 | long long __ashrdi3(long long, int); | ||
29 | long long __ashldi3(long long, int); | ||
30 | long long __lshrdi3(long long, int); | ||
31 | int __ucmpdi2(unsigned long long, unsigned long long); | ||
32 | int __cmpdi2(long long, long long); | ||
33 | EXPORT_SYMBOL(__ashrdi3); | ||
34 | EXPORT_SYMBOL(__ashldi3); | ||
35 | EXPORT_SYMBOL(__lshrdi3); | ||
36 | EXPORT_SYMBOL(__ucmpdi2); | ||
37 | EXPORT_SYMBOL(__cmpdi2); | ||
38 | |||
39 | EXPORT_SYMBOL(timer_interrupt); | ||
40 | EXPORT_SYMBOL(tb_ticks_per_jiffy); | ||
41 | |||
42 | EXPORT_SYMBOL(switch_mmu_context); | ||
43 | |||
44 | #ifdef CONFIG_PPC_STD_MMU_32 | ||
45 | extern long mol_trampoline; | ||
46 | EXPORT_SYMBOL(mol_trampoline); /* For MOL */ | ||
47 | EXPORT_SYMBOL(flush_hash_pages); /* For MOL */ | ||
48 | #ifdef CONFIG_SMP | ||
49 | extern int mmu_hash_lock; | ||
50 | EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */ | ||
51 | #endif /* CONFIG_SMP */ | ||
52 | extern long *intercept_table; | ||
53 | EXPORT_SYMBOL(intercept_table); | ||
54 | #endif /* CONFIG_PPC_STD_MMU_32 */ | ||
55 | |||
56 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
57 | EXPORT_SYMBOL(__mtdcr); | ||
58 | EXPORT_SYMBOL(__mfdcr); | ||
59 | #endif | ||
60 | |||
61 | EXPORT_SYMBOL(flush_instruction_cache); | ||