aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-13 23:33:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-08-07 23:50:09 -0400
commit9445aa1a3062a75a4d9de78026816ebc941e7b99 (patch)
tree6ee8ffd4ab14b01e2d692e376d32fe36fefb8220 /arch/powerpc/kernel
parent4dd1837d7589f468ed109556513f476e7a7f9121 (diff)
ppc: move exports to definitions
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/Makefile4
-rw-r--r--arch/powerpc/kernel/entry_32.S2
-rw-r--r--arch/powerpc/kernel/entry_64.S3
-rw-r--r--arch/powerpc/kernel/epapr_hcalls.S2
-rw-r--r--arch/powerpc/kernel/fpu.S3
-rw-r--r--arch/powerpc/kernel/head_32.S5
-rw-r--r--arch/powerpc/kernel/head_40x.S2
-rw-r--r--arch/powerpc/kernel/head_44x.S2
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/head_8xx.S2
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S2
-rw-r--r--arch/powerpc/kernel/misc.S2
-rw-r--r--arch/powerpc/kernel/misc_32.S11
-rw-r--r--arch/powerpc/kernel/misc_64.S4
-rw-r--r--arch/powerpc/kernel/pci-common.c1
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c37
-rw-r--r--arch/powerpc/kernel/ppc_ksyms_32.c60
-rw-r--r--arch/powerpc/kernel/setup_32.c6
-rw-r--r--arch/powerpc/kernel/time.c1
-rw-r--r--arch/powerpc/kernel/vector.S3
21 files changed, 55 insertions, 101 deletions
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
91obj-$(CONFIG_PPC32) += entry_32.o setup_32.o 91obj-$(CONFIG_PPC32) += entry_32.o setup_32.o
92obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o 92obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o
93obj-$(CONFIG_KGDB) += kgdb.o 93obj-$(CONFIG_KGDB) += kgdb.o
94obj-$(CONFIG_MODULES) += ppc_ksyms.o
95ifeq ($(CONFIG_PPC32),y)
96obj-$(CONFIG_MODULES) += ppc_ksyms_32.o
97endif
98obj-$(CONFIG_BOOTX_TEXT) += btext.o 94obj-$(CONFIG_BOOTX_TEXT) += btext.o
99obj-$(CONFIG_SMP) += smp.o 95obj-$(CONFIG_SMP) += smp.o
100obj-$(CONFIG_KPROBES) += kprobes.o 96obj-$(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
1363EXPORT_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)
1184EXPORT_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)
1421EXPORT_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
57EXPORT_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
89EXPORT_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
100EXPORT_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)
10484: trap 10504: trap
1049 EMIT_BUG_ENTRY 4b,__FILE__,__LINE__,0 1051 EMIT_BUG_ENTRY 4b,__FILE__,__LINE__,0
1050 blr 1052 blr
1053EXPORT_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
1276empty_zero_page: 1279empty_zero_page:
1277 .space 4096 1280 .space 4096
1281EXPORT_SYMBOL(empty_zero_page)
1278 1282
1279 .globl swapper_pg_dir 1283 .globl swapper_pg_dir
1280swapper_pg_dir: 1284swapper_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
1295EXPORT_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
972empty_zero_page: 973empty_zero_page:
973 .space 4096 974 .space 4096
975EXPORT_SYMBOL(empty_zero_page)
974 .globl swapper_pg_dir 976 .globl swapper_pg_dir
975swapper_pg_dir: 977swapper_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
1255empty_zero_page: 1256empty_zero_page:
1256 .space PAGE_SIZE 1257 .space PAGE_SIZE
1258EXPORT_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
984empty_zero_page: 985empty_zero_page:
985 .space PAGE_SIZE 986 .space PAGE_SIZE
987EXPORT_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
896empty_zero_page: 897empty_zero_page:
897 .space PAGE_SIZE 898 .space PAGE_SIZE
899EXPORT_SYMBOL(empty_zero_page)
898 900
899 .globl swapper_pg_dir 901 .globl swapper_pg_dir
900swapper_pg_dir: 902swapper_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
1224empty_zero_page: 1225empty_zero_page:
1225 .space 4096 1226 .space 4096
1227EXPORT_SYMBOL(empty_zero_page)
1226 .globl swapper_pg_dir 1228 .globl swapper_pg_dir
1227swapper_pg_dir: 1229swapper_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
122EXPORT_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
323EXPORT_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
363EXPORT_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)
456EXPORT_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
502EXPORT_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
530EXPORT_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
542EXPORT_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
554EXPORT_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
570EXPORT_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
585EXPORT_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
597EXPORT_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
114EXPORT_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
144EXPORT_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)
248EXPORT_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 */
58resource_size_t isa_mem_base; 58resource_size_t isa_mem_base;
59EXPORT_SYMBOL(isa_mem_base);
59 60
60 61
61static struct dma_map_ops *pci_dma_ops = &dma_direct_ops; 62static 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 @@
32unsigned long isa_io_base = 0; 32unsigned long isa_io_base = 0;
33unsigned long pci_dram_offset = 0; 33unsigned long pci_dram_offset = 0;
34int pcibios_assign_bus_offset = 1; 34int pcibios_assign_bus_offset = 1;
35EXPORT_SYMBOL(isa_io_base);
36EXPORT_SYMBOL(pci_dram_offset);
35 37
36void pcibios_make_OF_bus_map(void); 38void 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
10EXPORT_SYMBOL(flush_dcache_range);
11#endif
12EXPORT_SYMBOL(flush_icache_range);
13
14EXPORT_SYMBOL(empty_zero_page);
15
16long long __bswapdi2(long long);
17EXPORT_SYMBOL(__bswapdi2);
18
19#ifdef CONFIG_FUNCTION_TRACER
20EXPORT_SYMBOL(_mcount);
21#endif
22
23#ifdef CONFIG_PPC_FPU
24EXPORT_SYMBOL(load_fp_state);
25EXPORT_SYMBOL(store_fp_state);
26#endif
27
28#ifdef CONFIG_ALTIVEC
29EXPORT_SYMBOL(load_vr_state);
30EXPORT_SYMBOL(store_vr_state);
31#endif
32
33#ifdef CONFIG_EPAPR_PARAVIRT
34EXPORT_SYMBOL(epapr_hypercall_start);
35#endif
36
37EXPORT_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
13EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
14EXPORT_SYMBOL(DMA_MODE_READ);
15EXPORT_SYMBOL(DMA_MODE_WRITE);
16
17#if defined(CONFIG_PCI)
18EXPORT_SYMBOL(isa_io_base);
19EXPORT_SYMBOL(isa_mem_base);
20EXPORT_SYMBOL(pci_dram_offset);
21#endif
22
23#ifdef CONFIG_SMP
24EXPORT_SYMBOL(smp_hw_index);
25#endif
26
27long long __ashrdi3(long long, int);
28long long __ashldi3(long long, int);
29long long __lshrdi3(long long, int);
30int __ucmpdi2(unsigned long long, unsigned long long);
31int __cmpdi2(long long, long long);
32EXPORT_SYMBOL(__ashrdi3);
33EXPORT_SYMBOL(__ashldi3);
34EXPORT_SYMBOL(__lshrdi3);
35EXPORT_SYMBOL(__ucmpdi2);
36EXPORT_SYMBOL(__cmpdi2);
37
38EXPORT_SYMBOL(timer_interrupt);
39EXPORT_SYMBOL(tb_ticks_per_jiffy);
40
41EXPORT_SYMBOL(switch_mmu_context);
42
43#ifdef CONFIG_PPC_STD_MMU_32
44extern long mol_trampoline;
45EXPORT_SYMBOL(mol_trampoline); /* For MOL */
46EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
47#ifdef CONFIG_SMP
48extern int mmu_hash_lock;
49EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
50#endif /* CONFIG_SMP */
51extern long *intercept_table;
52EXPORT_SYMBOL(intercept_table);
53#endif /* CONFIG_PPC_STD_MMU_32 */
54
55#ifdef CONFIG_PPC_DCR_NATIVE
56EXPORT_SYMBOL(__mtdcr);
57EXPORT_SYMBOL(__mfdcr);
58#endif
59
60EXPORT_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;
47EXPORT_SYMBOL_GPL(boot_cpuid_phys); 48EXPORT_SYMBOL_GPL(boot_cpuid_phys);
48 49
49int smp_hw_index[NR_CPUS]; 50int smp_hw_index[NR_CPUS];
51EXPORT_SYMBOL(smp_hw_index);
50 52
51unsigned long ISA_DMA_THRESHOLD; 53unsigned long ISA_DMA_THRESHOLD;
52unsigned int DMA_MODE_READ; 54unsigned int DMA_MODE_READ;
53unsigned int DMA_MODE_WRITE; 55unsigned int DMA_MODE_WRITE;
54 56
57EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
58EXPORT_SYMBOL(DMA_MODE_READ);
59EXPORT_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}
598EXPORT_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
46EXPORT_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
58EXPORT_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,