diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-13 23:33:46 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-07 23:50:09 -0400 |
commit | 9445aa1a3062a75a4d9de78026816ebc941e7b99 (patch) | |
tree | 6ee8ffd4ab14b01e2d692e376d32fe36fefb8220 | |
parent | 4dd1837d7589f468ed109556513f476e7a7f9121 (diff) |
ppc: move exports to definitions
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
37 files changed, 98 insertions, 131 deletions
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index ab9f4e0ed4cf..5c4fbc80dc6c 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
@@ -1,5 +1,6 @@ | |||
1 | generic-y += clkdev.h | 1 | generic-y += clkdev.h |
2 | generic-y += div64.h | 2 | generic-y += div64.h |
3 | generic-y += export.h | ||
3 | generic-y += irq_regs.h | 4 | generic-y += irq_regs.h |
4 | generic-y += irq_work.h | 5 | generic-y += irq_work.h |
5 | generic-y += local64.h | 6 | generic-y += local64.h |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index b2027a5cf508..68e074e85ec9 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -91,10 +91,6 @@ obj-$(CONFIG_RELOCATABLE) += reloc_$(CONFIG_WORD_SIZE).o | |||
91 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o | 91 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
92 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o | 92 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o |
93 | obj-$(CONFIG_KGDB) += kgdb.o | 93 | obj-$(CONFIG_KGDB) += kgdb.o |
94 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | ||
95 | ifeq ($(CONFIG_PPC32),y) | ||
96 | obj-$(CONFIG_MODULES) += ppc_ksyms_32.o | ||
97 | endif | ||
98 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 94 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
99 | obj-$(CONFIG_SMP) += smp.o | 95 | obj-$(CONFIG_SMP) += smp.o |
100 | obj-$(CONFIG_KPROBES) += kprobes.o | 96 | obj-$(CONFIG_KPROBES) += kprobes.o |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 9899032230b4..c2c0bf003dd1 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/unistd.h> | 33 | #include <asm/unistd.h> |
34 | #include <asm/ftrace.h> | 34 | #include <asm/ftrace.h> |
35 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
36 | #include <asm/export.h> | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE. | 39 | * MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE. |
@@ -1359,6 +1360,7 @@ _GLOBAL(_mcount) | |||
1359 | MCOUNT_RESTORE_FRAME | 1360 | MCOUNT_RESTORE_FRAME |
1360 | bctr | 1361 | bctr |
1361 | #endif | 1362 | #endif |
1363 | EXPORT_SYMBOL(_mcount) | ||
1362 | 1364 | ||
1363 | _GLOBAL(ftrace_stub) | 1365 | _GLOBAL(ftrace_stub) |
1364 | blr | 1366 | blr |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 6b8bc0dd09d4..254518d466f0 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/context_tracking.h> | 38 | #include <asm/context_tracking.h> |
39 | #include <asm/tm.h> | 39 | #include <asm/tm.h> |
40 | #include <asm/ppc-opcode.h> | 40 | #include <asm/ppc-opcode.h> |
41 | #include <asm/export.h> | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * System calls. | 44 | * System calls. |
@@ -1180,6 +1181,7 @@ _GLOBAL(enter_prom) | |||
1180 | #ifdef CONFIG_DYNAMIC_FTRACE | 1181 | #ifdef CONFIG_DYNAMIC_FTRACE |
1181 | _GLOBAL(mcount) | 1182 | _GLOBAL(mcount) |
1182 | _GLOBAL(_mcount) | 1183 | _GLOBAL(_mcount) |
1184 | EXPORT_SYMBOL(_mcount) | ||
1183 | mflr r12 | 1185 | mflr r12 |
1184 | mtctr r12 | 1186 | mtctr r12 |
1185 | mtlr r0 | 1187 | mtlr r0 |
@@ -1416,6 +1418,7 @@ livepatch_handler: | |||
1416 | 1418 | ||
1417 | #else | 1419 | #else |
1418 | _GLOBAL_TOC(_mcount) | 1420 | _GLOBAL_TOC(_mcount) |
1421 | EXPORT_SYMBOL(_mcount) | ||
1419 | /* Taken from output of objdump from lib64/glibc */ | 1422 | /* Taken from output of objdump from lib64/glibc */ |
1420 | mflr r3 | 1423 | mflr r3 |
1421 | ld r11, 0(r1) | 1424 | ld r11, 0(r1) |
diff --git a/arch/powerpc/kernel/epapr_hcalls.S b/arch/powerpc/kernel/epapr_hcalls.S index 9f1ebf7338f1..52ca2471ee1a 100644 --- a/arch/powerpc/kernel/epapr_hcalls.S +++ b/arch/powerpc/kernel/epapr_hcalls.S | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/ppc_asm.h> | 16 | #include <asm/ppc_asm.h> |
17 | #include <asm/asm-compat.h> | 17 | #include <asm/asm-compat.h> |
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | #include <asm/export.h> | ||
19 | 20 | ||
20 | #ifndef CONFIG_PPC64 | 21 | #ifndef CONFIG_PPC64 |
21 | /* epapr_ev_idle() was derived from e500_idle() */ | 22 | /* epapr_ev_idle() was derived from e500_idle() */ |
@@ -53,3 +54,4 @@ epapr_hypercall_start: | |||
53 | nop | 54 | nop |
54 | nop | 55 | nop |
55 | blr | 56 | blr |
57 | EXPORT_SYMBOL(epapr_hypercall_start) | ||
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 15da2b5df85e..aa52b6be9026 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/ppc_asm.h> | 24 | #include <asm/ppc_asm.h> |
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <asm/ptrace.h> | 26 | #include <asm/ptrace.h> |
27 | #include <asm/export.h> | ||
27 | 28 | ||
28 | #ifdef CONFIG_VSX | 29 | #ifdef CONFIG_VSX |
29 | #define __REST_32FPVSRS(n,c,base) \ | 30 | #define __REST_32FPVSRS(n,c,base) \ |
@@ -85,6 +86,7 @@ _GLOBAL(load_fp_state) | |||
85 | MTFSF_L(fr0) | 86 | MTFSF_L(fr0) |
86 | REST_32FPVSRS(0, R4, R3) | 87 | REST_32FPVSRS(0, R4, R3) |
87 | blr | 88 | blr |
89 | EXPORT_SYMBOL(load_fp_state) | ||
88 | 90 | ||
89 | /* | 91 | /* |
90 | * Store FP state into memory, including FPSCR | 92 | * Store FP state into memory, including FPSCR |
@@ -95,6 +97,7 @@ _GLOBAL(store_fp_state) | |||
95 | mffs fr0 | 97 | mffs fr0 |
96 | stfd fr0,FPSTATE_FPSCR(r3) | 98 | stfd fr0,FPSTATE_FPSCR(r3) |
97 | blr | 99 | blr |
100 | EXPORT_SYMBOL(store_fp_state) | ||
98 | 101 | ||
99 | /* | 102 | /* |
100 | * This task wants to use the FPU now. | 103 | * This task wants to use the FPU now. |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index dc0488b6f6e1..590fe4aa26c9 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/ptrace.h> | 34 | #include <asm/ptrace.h> |
35 | #include <asm/bug.h> | 35 | #include <asm/bug.h> |
36 | #include <asm/kvm_book3s_asm.h> | 36 | #include <asm/kvm_book3s_asm.h> |
37 | #include <asm/export.h> | ||
37 | 38 | ||
38 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ | 39 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ |
39 | #define LOAD_BAT(n, reg, RA, RB) \ | 40 | #define LOAD_BAT(n, reg, RA, RB) \ |
@@ -739,6 +740,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) | |||
739 | 740 | ||
740 | .globl mol_trampoline | 741 | .globl mol_trampoline |
741 | .set mol_trampoline, i0x2f00 | 742 | .set mol_trampoline, i0x2f00 |
743 | EXPORT_SYMBOL(mol_trampoline) | ||
742 | 744 | ||
743 | . = 0x3000 | 745 | . = 0x3000 |
744 | 746 | ||
@@ -1048,6 +1050,7 @@ _ENTRY(switch_mmu_context) | |||
1048 | 4: trap | 1050 | 4: trap |
1049 | EMIT_BUG_ENTRY 4b,__FILE__,__LINE__,0 | 1051 | EMIT_BUG_ENTRY 4b,__FILE__,__LINE__,0 |
1050 | blr | 1052 | blr |
1053 | EXPORT_SYMBOL(switch_mmu_context) | ||
1051 | 1054 | ||
1052 | /* | 1055 | /* |
1053 | * An undocumented "feature" of 604e requires that the v bit | 1056 | * An undocumented "feature" of 604e requires that the v bit |
@@ -1275,6 +1278,7 @@ sdata: | |||
1275 | .globl empty_zero_page | 1278 | .globl empty_zero_page |
1276 | empty_zero_page: | 1279 | empty_zero_page: |
1277 | .space 4096 | 1280 | .space 4096 |
1281 | EXPORT_SYMBOL(empty_zero_page) | ||
1278 | 1282 | ||
1279 | .globl swapper_pg_dir | 1283 | .globl swapper_pg_dir |
1280 | swapper_pg_dir: | 1284 | swapper_pg_dir: |
@@ -1288,6 +1292,7 @@ intercept_table: | |||
1288 | .long 0, 0, 0, 0, 0, 0, 0, 0 | 1292 | .long 0, 0, 0, 0, 0, 0, 0, 0 |
1289 | .long 0, 0, 0, 0, 0, 0, 0, 0 | 1293 | .long 0, 0, 0, 0, 0, 0, 0, 0 |
1290 | .long 0, 0, 0, 0, 0, 0, 0, 0 | 1294 | .long 0, 0, 0, 0, 0, 0, 0, 0 |
1295 | EXPORT_SYMBOL(intercept_table) | ||
1291 | 1296 | ||
1292 | /* Room for two PTE pointers, usually the kernel and current user pointers | 1297 | /* Room for two PTE pointers, usually the kernel and current user pointers |
1293 | * to their respective root page table. | 1298 | * to their respective root page table. |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 7d7d8635227a..41374a468d1c 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/ppc_asm.h> | 41 | #include <asm/ppc_asm.h> |
42 | #include <asm/asm-offsets.h> | 42 | #include <asm/asm-offsets.h> |
43 | #include <asm/ptrace.h> | 43 | #include <asm/ptrace.h> |
44 | #include <asm/export.h> | ||
44 | 45 | ||
45 | /* As with the other PowerPC ports, it is expected that when code | 46 | /* As with the other PowerPC ports, it is expected that when code |
46 | * execution begins here, the following registers contain valid, yet | 47 | * execution begins here, the following registers contain valid, yet |
@@ -971,6 +972,7 @@ sdata: | |||
971 | .globl empty_zero_page | 972 | .globl empty_zero_page |
972 | empty_zero_page: | 973 | empty_zero_page: |
973 | .space 4096 | 974 | .space 4096 |
975 | EXPORT_SYMBOL(empty_zero_page) | ||
974 | .globl swapper_pg_dir | 976 | .globl swapper_pg_dir |
975 | swapper_pg_dir: | 977 | swapper_pg_dir: |
976 | .space PGD_TABLE_SIZE | 978 | .space PGD_TABLE_SIZE |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 9cdf5c71e426..37e4a7cf0065 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/asm-offsets.h> | 39 | #include <asm/asm-offsets.h> |
40 | #include <asm/ptrace.h> | 40 | #include <asm/ptrace.h> |
41 | #include <asm/synch.h> | 41 | #include <asm/synch.h> |
42 | #include <asm/export.h> | ||
42 | #include "head_booke.h" | 43 | #include "head_booke.h" |
43 | 44 | ||
44 | 45 | ||
@@ -1254,6 +1255,7 @@ sdata: | |||
1254 | .globl empty_zero_page | 1255 | .globl empty_zero_page |
1255 | empty_zero_page: | 1256 | empty_zero_page: |
1256 | .space PAGE_SIZE | 1257 | .space PAGE_SIZE |
1258 | EXPORT_SYMBOL(empty_zero_page) | ||
1257 | 1259 | ||
1258 | /* | 1260 | /* |
1259 | * To support >32-bit physical addresses, we use an 8KB pgdir. | 1261 | * To support >32-bit physical addresses, we use an 8KB pgdir. |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index f765b0434731..09655eaa46ff 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/hw_irq.h> | 42 | #include <asm/hw_irq.h> |
43 | #include <asm/cputhreads.h> | 43 | #include <asm/cputhreads.h> |
44 | #include <asm/ppc-opcode.h> | 44 | #include <asm/ppc-opcode.h> |
45 | #include <asm/export.h> | ||
45 | 46 | ||
46 | /* The physical memory is laid out such that the secondary processor | 47 | /* The physical memory is laid out such that the secondary processor |
47 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow | 48 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow |
@@ -983,3 +984,4 @@ swapper_pg_dir: | |||
983 | .globl empty_zero_page | 984 | .globl empty_zero_page |
984 | empty_zero_page: | 985 | empty_zero_page: |
985 | .space PAGE_SIZE | 986 | .space PAGE_SIZE |
987 | EXPORT_SYMBOL(empty_zero_page) | ||
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 43ddaae42baf..863251511b42 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/asm-offsets.h> | 31 | #include <asm/asm-offsets.h> |
32 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
33 | #include <asm/fixmap.h> | 33 | #include <asm/fixmap.h> |
34 | #include <asm/export.h> | ||
34 | 35 | ||
35 | /* Macro to make the code more readable. */ | 36 | /* Macro to make the code more readable. */ |
36 | #ifdef CONFIG_8xx_CPU6 | 37 | #ifdef CONFIG_8xx_CPU6 |
@@ -895,6 +896,7 @@ sdata: | |||
895 | .align PAGE_SHIFT | 896 | .align PAGE_SHIFT |
896 | empty_zero_page: | 897 | empty_zero_page: |
897 | .space PAGE_SIZE | 898 | .space PAGE_SIZE |
899 | EXPORT_SYMBOL(empty_zero_page) | ||
898 | 900 | ||
899 | .globl swapper_pg_dir | 901 | .globl swapper_pg_dir |
900 | swapper_pg_dir: | 902 | swapper_pg_dir: |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 3bfa3150911f..bf4c6021515f 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/asm-offsets.h> | 42 | #include <asm/asm-offsets.h> |
43 | #include <asm/cache.h> | 43 | #include <asm/cache.h> |
44 | #include <asm/ptrace.h> | 44 | #include <asm/ptrace.h> |
45 | #include <asm/export.h> | ||
45 | #include "head_booke.h" | 46 | #include "head_booke.h" |
46 | 47 | ||
47 | /* As with the other PowerPC ports, it is expected that when code | 48 | /* As with the other PowerPC ports, it is expected that when code |
@@ -1223,6 +1224,7 @@ sdata: | |||
1223 | .globl empty_zero_page | 1224 | .globl empty_zero_page |
1224 | empty_zero_page: | 1225 | empty_zero_page: |
1225 | .space 4096 | 1226 | .space 4096 |
1227 | EXPORT_SYMBOL(empty_zero_page) | ||
1226 | .globl swapper_pg_dir | 1228 | .globl swapper_pg_dir |
1227 | swapper_pg_dir: | 1229 | swapper_pg_dir: |
1228 | .space PGD_TABLE_SIZE | 1230 | .space PGD_TABLE_SIZE |
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S index 0d432194c018..384357cb8bc0 100644 --- a/arch/powerpc/kernel/misc.S +++ b/arch/powerpc/kernel/misc.S | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/unistd.h> | 18 | #include <asm/unistd.h> |
19 | #include <asm/asm-compat.h> | 19 | #include <asm/asm-compat.h> |
20 | #include <asm/asm-offsets.h> | 20 | #include <asm/asm-offsets.h> |
21 | #include <asm/export.h> | ||
21 | 22 | ||
22 | .text | 23 | .text |
23 | 24 | ||
@@ -118,3 +119,4 @@ _GLOBAL(longjmp) | |||
118 | _GLOBAL(current_stack_pointer) | 119 | _GLOBAL(current_stack_pointer) |
119 | PPC_LL r3,0(r1) | 120 | PPC_LL r3,0(r1) |
120 | blr | 121 | blr |
122 | EXPORT_SYMBOL(current_stack_pointer) | ||
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index d9c912b6e632..ea26a9181586 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/kexec.h> | 33 | #include <asm/kexec.h> |
34 | #include <asm/bug.h> | 34 | #include <asm/bug.h> |
35 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
36 | #include <asm/export.h> | ||
36 | 37 | ||
37 | .text | 38 | .text |
38 | 39 | ||
@@ -319,6 +320,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE) | |||
319 | #endif /* CONFIG_4xx */ | 320 | #endif /* CONFIG_4xx */ |
320 | isync | 321 | isync |
321 | blr | 322 | blr |
323 | EXPORT_SYMBOL(flush_instruction_cache) | ||
322 | #endif /* CONFIG_PPC_8xx */ | 324 | #endif /* CONFIG_PPC_8xx */ |
323 | 325 | ||
324 | /* | 326 | /* |
@@ -358,6 +360,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) | |||
358 | sync /* additional sync needed on g4 */ | 360 | sync /* additional sync needed on g4 */ |
359 | isync | 361 | isync |
360 | blr | 362 | blr |
363 | EXPORT_SYMBOL(flush_icache_range) | ||
361 | /* | 364 | /* |
362 | * Flush a particular page from the data cache to RAM. | 365 | * Flush a particular page from the data cache to RAM. |
363 | * Note: this is necessary because the instruction cache does *not* | 366 | * Note: this is necessary because the instruction cache does *not* |
@@ -450,6 +453,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) | |||
450 | stw r7,8(r3); \ | 453 | stw r7,8(r3); \ |
451 | stw r8,12(r3); \ | 454 | stw r8,12(r3); \ |
452 | stwu r9,16(r3) | 455 | stwu r9,16(r3) |
456 | EXPORT_SYMBOL(clear_pages) | ||
453 | 457 | ||
454 | _GLOBAL(copy_page) | 458 | _GLOBAL(copy_page) |
455 | addi r3,r3,-4 | 459 | addi r3,r3,-4 |
@@ -495,6 +499,7 @@ _GLOBAL(copy_page) | |||
495 | li r0,MAX_COPY_PREFETCH | 499 | li r0,MAX_COPY_PREFETCH |
496 | li r11,4 | 500 | li r11,4 |
497 | b 2b | 501 | b 2b |
502 | EXPORT_SYMBOL(copy_page) | ||
498 | 503 | ||
499 | /* | 504 | /* |
500 | * Extended precision shifts. | 505 | * Extended precision shifts. |
@@ -522,6 +527,7 @@ _GLOBAL(__ashrdi3) | |||
522 | sraw r3,r3,r5 # MSW = MSW >> count | 527 | sraw r3,r3,r5 # MSW = MSW >> count |
523 | or r4,r4,r7 # LSW |= t2 | 528 | or r4,r4,r7 # LSW |= t2 |
524 | blr | 529 | blr |
530 | EXPORT_SYMBOL(__ashrdi3) | ||
525 | 531 | ||
526 | _GLOBAL(__ashldi3) | 532 | _GLOBAL(__ashldi3) |
527 | subfic r6,r5,32 | 533 | subfic r6,r5,32 |
@@ -533,6 +539,7 @@ _GLOBAL(__ashldi3) | |||
533 | slw r4,r4,r5 # LSW = LSW << count | 539 | slw r4,r4,r5 # LSW = LSW << count |
534 | or r3,r3,r7 # MSW |= t2 | 540 | or r3,r3,r7 # MSW |= t2 |
535 | blr | 541 | blr |
542 | EXPORT_SYMBOL(__ashldi3) | ||
536 | 543 | ||
537 | _GLOBAL(__lshrdi3) | 544 | _GLOBAL(__lshrdi3) |
538 | subfic r6,r5,32 | 545 | subfic r6,r5,32 |
@@ -544,6 +551,7 @@ _GLOBAL(__lshrdi3) | |||
544 | srw r3,r3,r5 # MSW = MSW >> count | 551 | srw r3,r3,r5 # MSW = MSW >> count |
545 | or r4,r4,r7 # LSW |= t2 | 552 | or r4,r4,r7 # LSW |= t2 |
546 | blr | 553 | blr |
554 | EXPORT_SYMBOL(__lshrdi3) | ||
547 | 555 | ||
548 | /* | 556 | /* |
549 | * 64-bit comparison: __cmpdi2(s64 a, s64 b) | 557 | * 64-bit comparison: __cmpdi2(s64 a, s64 b) |
@@ -559,6 +567,7 @@ _GLOBAL(__cmpdi2) | |||
559 | bltlr | 567 | bltlr |
560 | li r3,2 | 568 | li r3,2 |
561 | blr | 569 | blr |
570 | EXPORT_SYMBOL(__cmpdi2) | ||
562 | /* | 571 | /* |
563 | * 64-bit comparison: __ucmpdi2(u64 a, u64 b) | 572 | * 64-bit comparison: __ucmpdi2(u64 a, u64 b) |
564 | * Returns 0 if a < b, 1 if a == b, 2 if a > b. | 573 | * Returns 0 if a < b, 1 if a == b, 2 if a > b. |
@@ -573,6 +582,7 @@ _GLOBAL(__ucmpdi2) | |||
573 | bltlr | 582 | bltlr |
574 | li r3,2 | 583 | li r3,2 |
575 | blr | 584 | blr |
585 | EXPORT_SYMBOL(__ucmpdi2) | ||
576 | 586 | ||
577 | _GLOBAL(__bswapdi2) | 587 | _GLOBAL(__bswapdi2) |
578 | rotlwi r9,r4,8 | 588 | rotlwi r9,r4,8 |
@@ -584,6 +594,7 @@ _GLOBAL(__bswapdi2) | |||
584 | mr r3,r9 | 594 | mr r3,r9 |
585 | mr r4,r10 | 595 | mr r4,r10 |
586 | blr | 596 | blr |
597 | EXPORT_SYMBOL(__bswapdi2) | ||
587 | 598 | ||
588 | #ifdef CONFIG_SMP | 599 | #ifdef CONFIG_SMP |
589 | _GLOBAL(start_secondary_resume) | 600 | _GLOBAL(start_secondary_resume) |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index cb195157b318..8b526846e72a 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/kexec.h> | 27 | #include <asm/kexec.h> |
28 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
29 | #include <asm/mmu.h> | 29 | #include <asm/mmu.h> |
30 | #include <asm/export.h> | ||
30 | 31 | ||
31 | .text | 32 | .text |
32 | 33 | ||
@@ -110,6 +111,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) | |||
110 | isync | 111 | isync |
111 | blr | 112 | blr |
112 | .previous .text | 113 | .previous .text |
114 | EXPORT_SYMBOL(flush_icache_range) | ||
113 | /* | 115 | /* |
114 | * Like above, but only do the D-cache. | 116 | * Like above, but only do the D-cache. |
115 | * | 117 | * |
@@ -139,6 +141,7 @@ _GLOBAL(flush_dcache_range) | |||
139 | bdnz 0b | 141 | bdnz 0b |
140 | sync | 142 | sync |
141 | blr | 143 | blr |
144 | EXPORT_SYMBOL(flush_dcache_range) | ||
142 | 145 | ||
143 | /* | 146 | /* |
144 | * Like above, but works on non-mapped physical addresses. | 147 | * Like above, but works on non-mapped physical addresses. |
@@ -242,6 +245,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) | |||
242 | blr | 245 | blr |
243 | 246 | ||
244 | _GLOBAL(__bswapdi2) | 247 | _GLOBAL(__bswapdi2) |
248 | EXPORT_SYMBOL(__bswapdi2) | ||
245 | srdi r8,r3,32 | 249 | srdi r8,r3,32 |
246 | rlwinm r7,r3,8,0xffffffff | 250 | rlwinm r7,r3,8,0xffffffff |
247 | rlwimi r7,r3,24,0,7 | 251 | rlwimi r7,r3,24,0,7 |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index a5c0153ede37..7c63811fcdab 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -56,6 +56,7 @@ static DECLARE_BITMAP(phb_bitmap, MAX_PHBS); | |||
56 | 56 | ||
57 | /* ISA Memory physical address */ | 57 | /* ISA Memory physical address */ |
58 | resource_size_t isa_mem_base; | 58 | resource_size_t isa_mem_base; |
59 | EXPORT_SYMBOL(isa_mem_base); | ||
59 | 60 | ||
60 | 61 | ||
61 | static struct dma_map_ops *pci_dma_ops = &dma_direct_ops; | 62 | static struct dma_map_ops *pci_dma_ops = &dma_direct_ops; |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 1f7930037cb7..678f87a63645 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -32,6 +32,8 @@ | |||
32 | unsigned long isa_io_base = 0; | 32 | unsigned long isa_io_base = 0; |
33 | unsigned long pci_dram_offset = 0; | 33 | unsigned long pci_dram_offset = 0; |
34 | int pcibios_assign_bus_offset = 1; | 34 | int pcibios_assign_bus_offset = 1; |
35 | EXPORT_SYMBOL(isa_io_base); | ||
36 | EXPORT_SYMBOL(pci_dram_offset); | ||
35 | 37 | ||
36 | void pcibios_make_OF_bus_map(void); | 38 | void pcibios_make_OF_bus_map(void); |
37 | 39 | ||
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c deleted file mode 100644 index 9f01e28ecef3..000000000000 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #include <linux/ftrace.h> | ||
2 | #include <linux/mm.h> | ||
3 | |||
4 | #include <asm/processor.h> | ||
5 | #include <asm/switch_to.h> | ||
6 | #include <asm/cacheflush.h> | ||
7 | #include <asm/epapr_hcalls.h> | ||
8 | |||
9 | #ifdef CONFIG_PPC64 | ||
10 | EXPORT_SYMBOL(flush_dcache_range); | ||
11 | #endif | ||
12 | EXPORT_SYMBOL(flush_icache_range); | ||
13 | |||
14 | EXPORT_SYMBOL(empty_zero_page); | ||
15 | |||
16 | long long __bswapdi2(long long); | ||
17 | EXPORT_SYMBOL(__bswapdi2); | ||
18 | |||
19 | #ifdef CONFIG_FUNCTION_TRACER | ||
20 | EXPORT_SYMBOL(_mcount); | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_PPC_FPU | ||
24 | EXPORT_SYMBOL(load_fp_state); | ||
25 | EXPORT_SYMBOL(store_fp_state); | ||
26 | #endif | ||
27 | |||
28 | #ifdef CONFIG_ALTIVEC | ||
29 | EXPORT_SYMBOL(load_vr_state); | ||
30 | EXPORT_SYMBOL(store_vr_state); | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_EPAPR_PARAVIRT | ||
34 | EXPORT_SYMBOL(epapr_hypercall_start); | ||
35 | #endif | ||
36 | |||
37 | EXPORT_SYMBOL(current_stack_pointer); | ||
diff --git a/arch/powerpc/kernel/ppc_ksyms_32.c b/arch/powerpc/kernel/ppc_ksyms_32.c deleted file mode 100644 index 2bfaafe5be99..000000000000 --- a/arch/powerpc/kernel/ppc_ksyms_32.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
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(ISA_DMA_THRESHOLD); | ||
14 | EXPORT_SYMBOL(DMA_MODE_READ); | ||
15 | EXPORT_SYMBOL(DMA_MODE_WRITE); | ||
16 | |||
17 | #if defined(CONFIG_PCI) | ||
18 | EXPORT_SYMBOL(isa_io_base); | ||
19 | EXPORT_SYMBOL(isa_mem_base); | ||
20 | EXPORT_SYMBOL(pci_dram_offset); | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_SMP | ||
24 | EXPORT_SYMBOL(smp_hw_index); | ||
25 | #endif | ||
26 | |||
27 | long long __ashrdi3(long long, int); | ||
28 | long long __ashldi3(long long, int); | ||
29 | long long __lshrdi3(long long, int); | ||
30 | int __ucmpdi2(unsigned long long, unsigned long long); | ||
31 | int __cmpdi2(long long, long long); | ||
32 | EXPORT_SYMBOL(__ashrdi3); | ||
33 | EXPORT_SYMBOL(__ashldi3); | ||
34 | EXPORT_SYMBOL(__lshrdi3); | ||
35 | EXPORT_SYMBOL(__ucmpdi2); | ||
36 | EXPORT_SYMBOL(__cmpdi2); | ||
37 | |||
38 | EXPORT_SYMBOL(timer_interrupt); | ||
39 | EXPORT_SYMBOL(tb_ticks_per_jiffy); | ||
40 | |||
41 | EXPORT_SYMBOL(switch_mmu_context); | ||
42 | |||
43 | #ifdef CONFIG_PPC_STD_MMU_32 | ||
44 | extern long mol_trampoline; | ||
45 | EXPORT_SYMBOL(mol_trampoline); /* For MOL */ | ||
46 | EXPORT_SYMBOL(flush_hash_pages); /* For MOL */ | ||
47 | #ifdef CONFIG_SMP | ||
48 | extern int mmu_hash_lock; | ||
49 | EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */ | ||
50 | #endif /* CONFIG_SMP */ | ||
51 | extern long *intercept_table; | ||
52 | EXPORT_SYMBOL(intercept_table); | ||
53 | #endif /* CONFIG_PPC_STD_MMU_32 */ | ||
54 | |||
55 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
56 | EXPORT_SYMBOL(__mtdcr); | ||
57 | EXPORT_SYMBOL(__mfdcr); | ||
58 | #endif | ||
59 | |||
60 | EXPORT_SYMBOL(flush_instruction_cache); | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index c3e861df4b20..c842b8e31cb9 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/console.h> | 17 | #include <linux/console.h> |
18 | #include <linux/memblock.h> | 18 | #include <linux/memblock.h> |
19 | #include <linux/export.h> | ||
19 | 20 | ||
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
@@ -47,11 +48,16 @@ int boot_cpuid_phys; | |||
47 | EXPORT_SYMBOL_GPL(boot_cpuid_phys); | 48 | EXPORT_SYMBOL_GPL(boot_cpuid_phys); |
48 | 49 | ||
49 | int smp_hw_index[NR_CPUS]; | 50 | int smp_hw_index[NR_CPUS]; |
51 | EXPORT_SYMBOL(smp_hw_index); | ||
50 | 52 | ||
51 | unsigned long ISA_DMA_THRESHOLD; | 53 | unsigned long ISA_DMA_THRESHOLD; |
52 | unsigned int DMA_MODE_READ; | 54 | unsigned int DMA_MODE_READ; |
53 | unsigned int DMA_MODE_WRITE; | 55 | unsigned int DMA_MODE_WRITE; |
54 | 56 | ||
57 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); | ||
58 | EXPORT_SYMBOL(DMA_MODE_READ); | ||
59 | EXPORT_SYMBOL(DMA_MODE_WRITE); | ||
60 | |||
55 | /* | 61 | /* |
56 | * These are used in binfmt_elf.c to put aux entries on the stack | 62 | * These are used in binfmt_elf.c to put aux entries on the stack |
57 | * for each elf executable being started. | 63 | * for each elf executable being started. |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 3efbedefba6a..0ce8b76c6150 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -595,6 +595,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
595 | irq_exit(); | 595 | irq_exit(); |
596 | set_irq_regs(old_regs); | 596 | set_irq_regs(old_regs); |
597 | } | 597 | } |
598 | EXPORT_SYMBOL(timer_interrupt); | ||
598 | 599 | ||
599 | /* | 600 | /* |
600 | * Hypervisor decrementer interrupts shouldn't occur but are sometimes | 601 | * Hypervisor decrementer interrupts shouldn't occur but are sometimes |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index 616a6d854638..388ec6477fc4 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <asm/thread_info.h> | 6 | #include <asm/thread_info.h> |
7 | #include <asm/page.h> | 7 | #include <asm/page.h> |
8 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
9 | #include <asm/export.h> | ||
9 | 10 | ||
10 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 11 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
11 | /* void do_load_up_transact_altivec(struct thread_struct *thread) | 12 | /* void do_load_up_transact_altivec(struct thread_struct *thread) |
@@ -42,6 +43,7 @@ _GLOBAL(load_vr_state) | |||
42 | mtvscr v0 | 43 | mtvscr v0 |
43 | REST_32VRS(0,r4,r3) | 44 | REST_32VRS(0,r4,r3) |
44 | blr | 45 | blr |
46 | EXPORT_SYMBOL(load_vr_state) | ||
45 | 47 | ||
46 | /* | 48 | /* |
47 | * Store VMX state into memory, including VSCR. | 49 | * Store VMX state into memory, including VSCR. |
@@ -53,6 +55,7 @@ _GLOBAL(store_vr_state) | |||
53 | li r4, VRSTATE_VSCR | 55 | li r4, VRSTATE_VSCR |
54 | stvx v0, r4, r3 | 56 | stvx v0, r4, r3 |
55 | blr | 57 | blr |
58 | EXPORT_SYMBOL(store_vr_state) | ||
56 | 59 | ||
57 | /* | 60 | /* |
58 | * Disable VMX for the task which had it previously, | 61 | * Disable VMX for the task which had it previously, |
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index ba21be15310f..555ff1a61c5e 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -9,7 +9,7 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) | |||
9 | CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE) | 9 | CFLAGS_REMOVE_code-patching.o = $(CC_FLAGS_FTRACE) |
10 | CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE) | 10 | CFLAGS_REMOVE_feature-fixups.o = $(CC_FLAGS_FTRACE) |
11 | 11 | ||
12 | obj-y += string.o alloc.o crtsavres.o ppc_ksyms.o code-patching.o \ | 12 | obj-y += string.o alloc.o crtsavres.o code-patching.o \ |
13 | feature-fixups.o | 13 | feature-fixups.o |
14 | 14 | ||
15 | obj-$(CONFIG_PPC32) += div64.o copy_32.o | 15 | obj-$(CONFIG_PPC32) += div64.o copy_32.o |
diff --git a/arch/powerpc/lib/checksum_32.S b/arch/powerpc/lib/checksum_32.S index d90870a66b60..da678bdfc4ac 100644 --- a/arch/powerpc/lib/checksum_32.S +++ b/arch/powerpc/lib/checksum_32.S | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/cache.h> | 17 | #include <asm/cache.h> |
18 | #include <asm/errno.h> | 18 | #include <asm/errno.h> |
19 | #include <asm/ppc_asm.h> | 19 | #include <asm/ppc_asm.h> |
20 | #include <asm/export.h> | ||
20 | 21 | ||
21 | .text | 22 | .text |
22 | 23 | ||
@@ -68,6 +69,7 @@ _GLOBAL(__csum_partial) | |||
68 | adde r5,r5,r0 | 69 | adde r5,r5,r0 |
69 | 5: addze r3,r5 /* add in final carry */ | 70 | 5: addze r3,r5 /* add in final carry */ |
70 | blr | 71 | blr |
72 | EXPORT_SYMBOL(__csum_partial) | ||
71 | 73 | ||
72 | /* | 74 | /* |
73 | * Computes the checksum of a memory block at src, length len, | 75 | * Computes the checksum of a memory block at src, length len, |
@@ -295,3 +297,4 @@ dst_error: | |||
295 | .long 41b,dst_error | 297 | .long 41b,dst_error |
296 | .long 50b,src_error | 298 | .long 50b,src_error |
297 | .long 51b,dst_error | 299 | .long 51b,dst_error |
300 | EXPORT_SYMBOL(csum_partial_copy_generic) | ||
diff --git a/arch/powerpc/lib/checksum_64.S b/arch/powerpc/lib/checksum_64.S index fdec6e613e95..fd9176671f9f 100644 --- a/arch/powerpc/lib/checksum_64.S +++ b/arch/powerpc/lib/checksum_64.S | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
17 | #include <asm/errno.h> | 17 | #include <asm/errno.h> |
18 | #include <asm/ppc_asm.h> | 18 | #include <asm/ppc_asm.h> |
19 | #include <asm/export.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * Computes the checksum of a memory block at buff, length len, | 22 | * Computes the checksum of a memory block at buff, length len, |
@@ -176,6 +177,7 @@ _GLOBAL(__csum_partial) | |||
176 | add r3,r4,r0 | 177 | add r3,r4,r0 |
177 | srdi r3,r3,32 | 178 | srdi r3,r3,32 |
178 | blr | 179 | blr |
180 | EXPORT_SYMBOL(__csum_partial) | ||
179 | 181 | ||
180 | 182 | ||
181 | .macro srcnr | 183 | .macro srcnr |
@@ -430,3 +432,4 @@ dstnr; stb r6,0(r4) | |||
430 | li r6,-EFAULT | 432 | li r6,-EFAULT |
431 | stw r6,0(r8) | 433 | stw r6,0(r8) |
432 | blr | 434 | blr |
435 | EXPORT_SYMBOL(csum_partial_copy_generic) | ||
diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S index 99f37f24185c..40cce33b08d6 100644 --- a/arch/powerpc/lib/copy_32.S +++ b/arch/powerpc/lib/copy_32.S | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/cache.h> | 12 | #include <asm/cache.h> |
13 | #include <asm/errno.h> | 13 | #include <asm/errno.h> |
14 | #include <asm/ppc_asm.h> | 14 | #include <asm/ppc_asm.h> |
15 | #include <asm/export.h> | ||
15 | 16 | ||
16 | #define COPY_16_BYTES \ | 17 | #define COPY_16_BYTES \ |
17 | lwz r7,4(r4); \ | 18 | lwz r7,4(r4); \ |
@@ -92,6 +93,7 @@ _GLOBAL(memset) | |||
92 | subf r6,r0,r6 | 93 | subf r6,r0,r6 |
93 | cmplwi 0,r4,0 | 94 | cmplwi 0,r4,0 |
94 | bne 2f /* Use normal procedure if r4 is not zero */ | 95 | bne 2f /* Use normal procedure if r4 is not zero */ |
96 | EXPORT_SYMBOL(memset) | ||
95 | _GLOBAL(memset_nocache_branch) | 97 | _GLOBAL(memset_nocache_branch) |
96 | b 2f /* Skip optimised bloc until cache is enabled */ | 98 | b 2f /* Skip optimised bloc until cache is enabled */ |
97 | 99 | ||
@@ -216,6 +218,8 @@ _GLOBAL(memcpy) | |||
216 | stbu r0,1(r6) | 218 | stbu r0,1(r6) |
217 | bdnz 40b | 219 | bdnz 40b |
218 | 65: blr | 220 | 65: blr |
221 | EXPORT_SYMBOL(memcpy) | ||
222 | EXPORT_SYMBOL(memmove) | ||
219 | 223 | ||
220 | generic_memcpy: | 224 | generic_memcpy: |
221 | srwi. r7,r5,3 | 225 | srwi. r7,r5,3 |
@@ -507,3 +511,4 @@ _GLOBAL(__copy_tofrom_user) | |||
507 | .long 112b,120b | 511 | .long 112b,120b |
508 | .long 114b,120b | 512 | .long 114b,120b |
509 | .text | 513 | .text |
514 | EXPORT_SYMBOL(__copy_tofrom_user) | ||
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index a3c4dc4defdd..21367b3a8146 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | #include <asm/ppc_asm.h> | 11 | #include <asm/ppc_asm.h> |
12 | #include <asm/asm-offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | #include <asm/export.h> | ||
13 | 14 | ||
14 | .section ".toc","aw" | 15 | .section ".toc","aw" |
15 | PPC64_CACHES: | 16 | PPC64_CACHES: |
@@ -110,3 +111,4 @@ END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ) | |||
110 | std r11,120(r3) | 111 | std r11,120(r3) |
111 | std r12,128(r3) | 112 | std r12,128(r3) |
112 | blr | 113 | blr |
114 | EXPORT_SYMBOL(copy_page) | ||
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index f09899e35991..f19a15b0cff9 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/ppc_asm.h> |
11 | #include <asm/export.h> | ||
11 | 12 | ||
12 | #ifdef __BIG_ENDIAN__ | 13 | #ifdef __BIG_ENDIAN__ |
13 | #define sLd sld /* Shift towards low-numbered address. */ | 14 | #define sLd sld /* Shift towards low-numbered address. */ |
@@ -671,3 +672,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) | |||
671 | .llong 89b,100b | 672 | .llong 89b,100b |
672 | .llong 90b,100b | 673 | .llong 90b,100b |
673 | .llong 91b,100b | 674 | .llong 91b,100b |
675 | EXPORT_SYMBOL(__copy_tofrom_user) | ||
diff --git a/arch/powerpc/lib/hweight_64.S b/arch/powerpc/lib/hweight_64.S index 19e66001a4f9..3de7ac154f24 100644 --- a/arch/powerpc/lib/hweight_64.S +++ b/arch/powerpc/lib/hweight_64.S | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
21 | #include <asm/ppc_asm.h> | 21 | #include <asm/ppc_asm.h> |
22 | #include <asm/export.h> | ||
22 | 23 | ||
23 | /* Note: This code relies on -mminimal-toc */ | 24 | /* Note: This code relies on -mminimal-toc */ |
24 | 25 | ||
@@ -32,6 +33,7 @@ FTR_SECTION_ELSE | |||
32 | clrldi r3,r3,64-8 | 33 | clrldi r3,r3,64-8 |
33 | blr | 34 | blr |
34 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) | 35 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) |
36 | EXPORT_SYMBOL(__arch_hweight8) | ||
35 | 37 | ||
36 | _GLOBAL(__arch_hweight16) | 38 | _GLOBAL(__arch_hweight16) |
37 | BEGIN_FTR_SECTION | 39 | BEGIN_FTR_SECTION |
@@ -54,6 +56,7 @@ FTR_SECTION_ELSE | |||
54 | blr | 56 | blr |
55 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 50) | 57 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 50) |
56 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) | 58 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) |
59 | EXPORT_SYMBOL(__arch_hweight16) | ||
57 | 60 | ||
58 | _GLOBAL(__arch_hweight32) | 61 | _GLOBAL(__arch_hweight32) |
59 | BEGIN_FTR_SECTION | 62 | BEGIN_FTR_SECTION |
@@ -79,6 +82,7 @@ FTR_SECTION_ELSE | |||
79 | blr | 82 | blr |
80 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 51) | 83 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 51) |
81 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) | 84 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) |
85 | EXPORT_SYMBOL(__arch_hweight32) | ||
82 | 86 | ||
83 | _GLOBAL(__arch_hweight64) | 87 | _GLOBAL(__arch_hweight64) |
84 | BEGIN_FTR_SECTION | 88 | BEGIN_FTR_SECTION |
@@ -108,3 +112,4 @@ FTR_SECTION_ELSE | |||
108 | blr | 112 | blr |
109 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 52) | 113 | ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 52) |
110 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) | 114 | ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) |
115 | EXPORT_SYMBOL(__arch_hweight64) | ||
diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S index 43435c6892fb..2d128df161ec 100644 --- a/arch/powerpc/lib/mem_64.S +++ b/arch/powerpc/lib/mem_64.S | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/errno.h> | 12 | #include <asm/errno.h> |
13 | #include <asm/ppc_asm.h> | 13 | #include <asm/ppc_asm.h> |
14 | #include <asm/export.h> | ||
14 | 15 | ||
15 | _GLOBAL(memset) | 16 | _GLOBAL(memset) |
16 | neg r0,r3 | 17 | neg r0,r3 |
@@ -76,6 +77,7 @@ _GLOBAL(memset) | |||
76 | 10: bflr 31 | 77 | 10: bflr 31 |
77 | stb r4,0(r6) | 78 | stb r4,0(r6) |
78 | blr | 79 | blr |
80 | EXPORT_SYMBOL(memset) | ||
79 | 81 | ||
80 | _GLOBAL_TOC(memmove) | 82 | _GLOBAL_TOC(memmove) |
81 | cmplw 0,r3,r4 | 83 | cmplw 0,r3,r4 |
@@ -117,3 +119,4 @@ _GLOBAL(backwards_memcpy) | |||
117 | beq 2b | 119 | beq 2b |
118 | mtctr r7 | 120 | mtctr r7 |
119 | b 1b | 121 | b 1b |
122 | EXPORT_SYMBOL(memmove) | ||
diff --git a/arch/powerpc/lib/memcmp_64.S b/arch/powerpc/lib/memcmp_64.S index 8953d2382a65..d75d18b7bd55 100644 --- a/arch/powerpc/lib/memcmp_64.S +++ b/arch/powerpc/lib/memcmp_64.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/ppc_asm.h> |
11 | #include <asm/export.h> | ||
11 | 12 | ||
12 | #define off8 r6 | 13 | #define off8 r6 |
13 | #define off16 r7 | 14 | #define off16 r7 |
@@ -231,3 +232,4 @@ _GLOBAL(memcmp) | |||
231 | ld r28,-32(r1) | 232 | ld r28,-32(r1) |
232 | ld r27,-40(r1) | 233 | ld r27,-40(r1) |
233 | blr | 234 | blr |
235 | EXPORT_SYMBOL(memcmp) | ||
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 32a06ec395d2..f4d6088e2d53 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/ppc_asm.h> |
11 | #include <asm/export.h> | ||
11 | 12 | ||
12 | .align 7 | 13 | .align 7 |
13 | _GLOBAL_TOC(memcpy) | 14 | _GLOBAL_TOC(memcpy) |
@@ -219,3 +220,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) | |||
219 | 4: ld r3,-STACKFRAMESIZE+STK_REG(R31)(r1) /* return dest pointer */ | 220 | 4: ld r3,-STACKFRAMESIZE+STK_REG(R31)(r1) /* return dest pointer */ |
220 | blr | 221 | blr |
221 | #endif | 222 | #endif |
223 | EXPORT_SYMBOL(memcpy) | ||
diff --git a/arch/powerpc/lib/ppc_ksyms.c b/arch/powerpc/lib/ppc_ksyms.c deleted file mode 100644 index ae69d846a841..000000000000 --- a/arch/powerpc/lib/ppc_ksyms.c +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #include <linux/string.h> | ||
2 | #include <linux/uaccess.h> | ||
3 | #include <linux/bitops.h> | ||
4 | #include <net/checksum.h> | ||
5 | |||
6 | EXPORT_SYMBOL(memcpy); | ||
7 | EXPORT_SYMBOL(memset); | ||
8 | EXPORT_SYMBOL(memmove); | ||
9 | EXPORT_SYMBOL(memcmp); | ||
10 | EXPORT_SYMBOL(memchr); | ||
11 | |||
12 | EXPORT_SYMBOL(strncpy); | ||
13 | EXPORT_SYMBOL(strncmp); | ||
14 | |||
15 | #ifndef CONFIG_GENERIC_CSUM | ||
16 | EXPORT_SYMBOL(__csum_partial); | ||
17 | EXPORT_SYMBOL(csum_partial_copy_generic); | ||
18 | #endif | ||
19 | |||
20 | EXPORT_SYMBOL(__copy_tofrom_user); | ||
21 | EXPORT_SYMBOL(__clear_user); | ||
22 | EXPORT_SYMBOL(copy_page); | ||
23 | |||
24 | #ifdef CONFIG_PPC64 | ||
25 | EXPORT_SYMBOL(__arch_hweight8); | ||
26 | EXPORT_SYMBOL(__arch_hweight16); | ||
27 | EXPORT_SYMBOL(__arch_hweight32); | ||
28 | EXPORT_SYMBOL(__arch_hweight64); | ||
29 | #endif | ||
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index beabc68d9a1e..d13e07603519 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/errno.h> | 12 | #include <asm/errno.h> |
13 | #include <asm/ppc_asm.h> | 13 | #include <asm/ppc_asm.h> |
14 | #include <asm/export.h> | ||
14 | 15 | ||
15 | .section __ex_table,"a" | 16 | .section __ex_table,"a" |
16 | PPC_LONG_ALIGN | 17 | PPC_LONG_ALIGN |
@@ -36,6 +37,7 @@ _GLOBAL(strncpy) | |||
36 | 2: stbu r0,1(r6) /* clear it out if so */ | 37 | 2: stbu r0,1(r6) /* clear it out if so */ |
37 | bdnz 2b | 38 | bdnz 2b |
38 | blr | 39 | blr |
40 | EXPORT_SYMBOL(strncpy) | ||
39 | 41 | ||
40 | _GLOBAL(strncmp) | 42 | _GLOBAL(strncmp) |
41 | PPC_LCMPI 0,r5,0 | 43 | PPC_LCMPI 0,r5,0 |
@@ -53,6 +55,7 @@ _GLOBAL(strncmp) | |||
53 | blr | 55 | blr |
54 | 2: li r3,0 | 56 | 2: li r3,0 |
55 | blr | 57 | blr |
58 | EXPORT_SYMBOL(strncmp) | ||
56 | 59 | ||
57 | #ifdef CONFIG_PPC32 | 60 | #ifdef CONFIG_PPC32 |
58 | _GLOBAL(memcmp) | 61 | _GLOBAL(memcmp) |
@@ -68,6 +71,7 @@ _GLOBAL(memcmp) | |||
68 | blr | 71 | blr |
69 | 2: li r3,0 | 72 | 2: li r3,0 |
70 | blr | 73 | blr |
74 | EXPORT_SYMBOL(memcmp) | ||
71 | #endif | 75 | #endif |
72 | 76 | ||
73 | _GLOBAL(memchr) | 77 | _GLOBAL(memchr) |
@@ -82,6 +86,7 @@ _GLOBAL(memchr) | |||
82 | beqlr | 86 | beqlr |
83 | 2: li r3,0 | 87 | 2: li r3,0 |
84 | blr | 88 | blr |
89 | EXPORT_SYMBOL(memchr) | ||
85 | 90 | ||
86 | #ifdef CONFIG_PPC32 | 91 | #ifdef CONFIG_PPC32 |
87 | _GLOBAL(__clear_user) | 92 | _GLOBAL(__clear_user) |
@@ -125,4 +130,5 @@ _GLOBAL(__clear_user) | |||
125 | PPC_LONG 1b,91b | 130 | PPC_LONG 1b,91b |
126 | PPC_LONG 8b,92b | 131 | PPC_LONG 8b,92b |
127 | .text | 132 | .text |
133 | EXPORT_SYMBOL(__clear_user) | ||
128 | #endif | 134 | #endif |
diff --git a/arch/powerpc/lib/string_64.S b/arch/powerpc/lib/string_64.S index 7bd9549a90a2..57ace356c949 100644 --- a/arch/powerpc/lib/string_64.S +++ b/arch/powerpc/lib/string_64.S | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/ppc_asm.h> | 21 | #include <asm/ppc_asm.h> |
22 | #include <asm/asm-offsets.h> | 22 | #include <asm/asm-offsets.h> |
23 | #include <asm/export.h> | ||
23 | 24 | ||
24 | .section ".toc","aw" | 25 | .section ".toc","aw" |
25 | PPC64_CACHES: | 26 | PPC64_CACHES: |
@@ -200,3 +201,4 @@ err1; dcbz r0,r3 | |||
200 | cmpdi r4,32 | 201 | cmpdi r4,32 |
201 | blt .Lshort_clear | 202 | blt .Lshort_clear |
202 | b .Lmedium_clear | 203 | b .Lmedium_clear |
204 | EXPORT_SYMBOL(__clear_user) | ||
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 115347f74ce5..09cc50c8dace 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/ppc_asm.h> | 26 | #include <asm/ppc_asm.h> |
27 | #include <asm/thread_info.h> | 27 | #include <asm/thread_info.h> |
28 | #include <asm/asm-offsets.h> | 28 | #include <asm/asm-offsets.h> |
29 | #include <asm/export.h> | ||
29 | 30 | ||
30 | #ifdef CONFIG_SMP | 31 | #ifdef CONFIG_SMP |
31 | .section .bss | 32 | .section .bss |
@@ -33,6 +34,7 @@ | |||
33 | .globl mmu_hash_lock | 34 | .globl mmu_hash_lock |
34 | mmu_hash_lock: | 35 | mmu_hash_lock: |
35 | .space 4 | 36 | .space 4 |
37 | EXPORT_SYMBOL(mmu_hash_lock) | ||
36 | #endif /* CONFIG_SMP */ | 38 | #endif /* CONFIG_SMP */ |
37 | 39 | ||
38 | /* | 40 | /* |
@@ -575,6 +577,7 @@ _GLOBAL(flush_hash_pages) | |||
575 | rlwinm r8,r8,0,31,29 /* clear HASHPTE bit */ | 577 | rlwinm r8,r8,0,31,29 /* clear HASHPTE bit */ |
576 | stwcx. r8,0,r5 /* update the pte */ | 578 | stwcx. r8,0,r5 /* update the pte */ |
577 | bne- 33b | 579 | bne- 33b |
580 | EXPORT_SYMBOL(flush_hash_pages) | ||
578 | 581 | ||
579 | /* Get the address of the primary PTE group in the hash table (r3) */ | 582 | /* Get the address of the primary PTE group in the hash table (r3) */ |
580 | _GLOBAL(flush_hash_patch_A) | 583 | _GLOBAL(flush_hash_patch_A) |
diff --git a/arch/powerpc/sysdev/dcr-low.S b/arch/powerpc/sysdev/dcr-low.S index d3098ef1404a..e687bb2003ff 100644 --- a/arch/powerpc/sysdev/dcr-low.S +++ b/arch/powerpc/sysdev/dcr-low.S | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/bug.h> | 14 | #include <asm/bug.h> |
15 | #include <asm/export.h> | ||
15 | 16 | ||
16 | #define DCR_ACCESS_PROLOG(table) \ | 17 | #define DCR_ACCESS_PROLOG(table) \ |
17 | cmpli cr0,r3,1024; \ | 18 | cmpli cr0,r3,1024; \ |
@@ -28,9 +29,11 @@ | |||
28 | 29 | ||
29 | _GLOBAL(__mfdcr) | 30 | _GLOBAL(__mfdcr) |
30 | DCR_ACCESS_PROLOG(__mfdcr_table) | 31 | DCR_ACCESS_PROLOG(__mfdcr_table) |
32 | EXPORT_SYMBOL(__mfdcr) | ||
31 | 33 | ||
32 | _GLOBAL(__mtdcr) | 34 | _GLOBAL(__mtdcr) |
33 | DCR_ACCESS_PROLOG(__mtdcr_table) | 35 | DCR_ACCESS_PROLOG(__mtdcr_table) |
36 | EXPORT_SYMBOL(__mtdcr) | ||
34 | 37 | ||
35 | __mfdcr_table: | 38 | __mfdcr_table: |
36 | mfdcr r3,0; blr | 39 | mfdcr r3,0; blr |