Skip to content

Commit

Permalink
ppc: move exports to definitions
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Aug 8, 2016
1 parent 4dd1837 commit 9445aa1
Show file tree
Hide file tree
Showing 37 changed files with 98 additions and 131 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
generic-y += clkdev.h
generic-y += div64.h
generic-y += export.h
generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += local64.h
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ obj-$(CONFIG_RELOCATABLE) += reloc_$(CONFIG_WORD_SIZE).o
obj-$(CONFIG_PPC32) += entry_32.o setup_32.o
obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o
obj-$(CONFIG_KGDB) += kgdb.o
obj-$(CONFIG_MODULES) += ppc_ksyms.o
ifeq ($(CONFIG_PPC32),y)
obj-$(CONFIG_MODULES) += ppc_ksyms_32.o
endif
obj-$(CONFIG_BOOTX_TEXT) += btext.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_KPROBES) += kprobes.o
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <asm/unistd.h>
#include <asm/ftrace.h>
#include <asm/ptrace.h>
#include <asm/export.h>

/*
* MSR_KERNEL is > 0x10000 on 4xx/Book-E since it include MSR_CE.
Expand Down Expand Up @@ -1359,6 +1360,7 @@ _GLOBAL(_mcount)
MCOUNT_RESTORE_FRAME
bctr
#endif
EXPORT_SYMBOL(_mcount)

_GLOBAL(ftrace_stub)
blr
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <asm/context_tracking.h>
#include <asm/tm.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>

/*
* System calls.
Expand Down Expand Up @@ -1180,6 +1181,7 @@ _GLOBAL(enter_prom)
#ifdef CONFIG_DYNAMIC_FTRACE
_GLOBAL(mcount)
_GLOBAL(_mcount)
EXPORT_SYMBOL(_mcount)
mflr r12
mtctr r12
mtlr r0
Expand Down Expand Up @@ -1416,6 +1418,7 @@ livepatch_handler:

#else
_GLOBAL_TOC(_mcount)
EXPORT_SYMBOL(_mcount)
/* Taken from output of objdump from lib64/glibc */
mflr r3
ld r11, 0(r1)
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/epapr_hcalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <asm/ppc_asm.h>
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>
#include <asm/export.h>

#ifndef CONFIG_PPC64
/* epapr_ev_idle() was derived from e500_idle() */
Expand Down Expand Up @@ -53,3 +54,4 @@ epapr_hypercall_start:
nop
nop
blr
EXPORT_SYMBOL(epapr_hypercall_start)
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/export.h>

#ifdef CONFIG_VSX
#define __REST_32FPVSRS(n,c,base) \
Expand Down Expand Up @@ -85,6 +86,7 @@ _GLOBAL(load_fp_state)
MTFSF_L(fr0)
REST_32FPVSRS(0, R4, R3)
blr
EXPORT_SYMBOL(load_fp_state)

/*
* Store FP state into memory, including FPSCR
Expand All @@ -95,6 +97,7 @@ _GLOBAL(store_fp_state)
mffs fr0
stfd fr0,FPSTATE_FPSCR(r3)
blr
EXPORT_SYMBOL(store_fp_state)

/*
* This task wants to use the FPU now.
Expand Down
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/ptrace.h>
#include <asm/bug.h>
#include <asm/kvm_book3s_asm.h>
#include <asm/export.h>

/* 601 only have IBAT; cr0.eq is set on 601 when using this macro */
#define LOAD_BAT(n, reg, RA, RB) \
Expand Down Expand Up @@ -739,6 +740,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)

.globl mol_trampoline
.set mol_trampoline, i0x2f00
EXPORT_SYMBOL(mol_trampoline)

. = 0x3000

Expand Down Expand Up @@ -1048,6 +1050,7 @@ _ENTRY(switch_mmu_context)
4: trap
EMIT_BUG_ENTRY 4b,__FILE__,__LINE__,0
blr
EXPORT_SYMBOL(switch_mmu_context)

/*
* An undocumented "feature" of 604e requires that the v bit
Expand Down Expand Up @@ -1275,6 +1278,7 @@ sdata:
.globl empty_zero_page
empty_zero_page:
.space 4096
EXPORT_SYMBOL(empty_zero_page)

.globl swapper_pg_dir
swapper_pg_dir:
Expand All @@ -1288,6 +1292,7 @@ intercept_table:
.long 0, 0, 0, 0, 0, 0, 0, 0
.long 0, 0, 0, 0, 0, 0, 0, 0
.long 0, 0, 0, 0, 0, 0, 0, 0
EXPORT_SYMBOL(intercept_table)

/* Room for two PTE pointers, usually the kernel and current user pointers
* to their respective root page table.
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/head_40x.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/export.h>

/* As with the other PowerPC ports, it is expected that when code
* execution begins here, the following registers contain valid, yet
Expand Down Expand Up @@ -971,6 +972,7 @@ sdata:
.globl empty_zero_page
empty_zero_page:
.space 4096
EXPORT_SYMBOL(empty_zero_page)
.globl swapper_pg_dir
swapper_pg_dir:
.space PGD_TABLE_SIZE
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/synch.h>
#include <asm/export.h>
#include "head_booke.h"


Expand Down Expand Up @@ -1254,6 +1255,7 @@ sdata:
.globl empty_zero_page
empty_zero_page:
.space PAGE_SIZE
EXPORT_SYMBOL(empty_zero_page)

/*
* To support >32-bit physical addresses, we use an 8KB pgdir.
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <asm/hw_irq.h>
#include <asm/cputhreads.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>

/* The physical memory is laid out such that the secondary processor
* spin code sits at 0x0000...0x00ff. On server, the vectors follow
Expand Down Expand Up @@ -983,3 +984,4 @@ swapper_pg_dir:
.globl empty_zero_page
empty_zero_page:
.space PAGE_SIZE
EXPORT_SYMBOL(empty_zero_page)
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/head_8xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/fixmap.h>
#include <asm/export.h>

/* Macro to make the code more readable. */
#ifdef CONFIG_8xx_CPU6
Expand Down Expand Up @@ -895,6 +896,7 @@ sdata:
.align PAGE_SHIFT
empty_zero_page:
.space PAGE_SIZE
EXPORT_SYMBOL(empty_zero_page)

.globl swapper_pg_dir
swapper_pg_dir:
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/head_fsl_booke.S
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <asm/asm-offsets.h>
#include <asm/cache.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include "head_booke.h"

/* As with the other PowerPC ports, it is expected that when code
Expand Down Expand Up @@ -1223,6 +1224,7 @@ sdata:
.globl empty_zero_page
empty_zero_page:
.space 4096
EXPORT_SYMBOL(empty_zero_page)
.globl swapper_pg_dir
swapper_pg_dir:
.space PGD_TABLE_SIZE
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/misc.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <asm/unistd.h>
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>
#include <asm/export.h>

.text

Expand Down Expand Up @@ -118,3 +119,4 @@ _GLOBAL(longjmp)
_GLOBAL(current_stack_pointer)
PPC_LL r3,0(r1)
blr
EXPORT_SYMBOL(current_stack_pointer)
11 changes: 11 additions & 0 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <asm/kexec.h>
#include <asm/bug.h>
#include <asm/ptrace.h>
#include <asm/export.h>

.text

Expand Down Expand Up @@ -319,6 +320,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
#endif /* CONFIG_4xx */
isync
blr
EXPORT_SYMBOL(flush_instruction_cache)
#endif /* CONFIG_PPC_8xx */

/*
Expand Down Expand Up @@ -358,6 +360,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
sync /* additional sync needed on g4 */
isync
blr
EXPORT_SYMBOL(flush_icache_range)
/*
* Flush a particular page from the data cache to RAM.
* Note: this is necessary because the instruction cache does *not*
Expand Down Expand Up @@ -450,6 +453,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
stw r7,8(r3); \
stw r8,12(r3); \
stwu r9,16(r3)
EXPORT_SYMBOL(clear_pages)

_GLOBAL(copy_page)
addi r3,r3,-4
Expand Down Expand Up @@ -495,6 +499,7 @@ _GLOBAL(copy_page)
li r0,MAX_COPY_PREFETCH
li r11,4
b 2b
EXPORT_SYMBOL(copy_page)

/*
* Extended precision shifts.
Expand Down Expand Up @@ -522,6 +527,7 @@ _GLOBAL(__ashrdi3)
sraw r3,r3,r5 # MSW = MSW >> count
or r4,r4,r7 # LSW |= t2
blr
EXPORT_SYMBOL(__ashrdi3)

_GLOBAL(__ashldi3)
subfic r6,r5,32
Expand All @@ -533,6 +539,7 @@ _GLOBAL(__ashldi3)
slw r4,r4,r5 # LSW = LSW << count
or r3,r3,r7 # MSW |= t2
blr
EXPORT_SYMBOL(__ashldi3)

_GLOBAL(__lshrdi3)
subfic r6,r5,32
Expand All @@ -544,6 +551,7 @@ _GLOBAL(__lshrdi3)
srw r3,r3,r5 # MSW = MSW >> count
or r4,r4,r7 # LSW |= t2
blr
EXPORT_SYMBOL(__lshrdi3)

/*
* 64-bit comparison: __cmpdi2(s64 a, s64 b)
Expand All @@ -559,6 +567,7 @@ _GLOBAL(__cmpdi2)
bltlr
li r3,2
blr
EXPORT_SYMBOL(__cmpdi2)
/*
* 64-bit comparison: __ucmpdi2(u64 a, u64 b)
* Returns 0 if a < b, 1 if a == b, 2 if a > b.
Expand All @@ -573,6 +582,7 @@ _GLOBAL(__ucmpdi2)
bltlr
li r3,2
blr
EXPORT_SYMBOL(__ucmpdi2)

_GLOBAL(__bswapdi2)
rotlwi r9,r4,8
Expand All @@ -584,6 +594,7 @@ _GLOBAL(__bswapdi2)
mr r3,r9
mr r4,r10
blr
EXPORT_SYMBOL(__bswapdi2)

#ifdef CONFIG_SMP
_GLOBAL(start_secondary_resume)
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/misc_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <asm/kexec.h>
#include <asm/ptrace.h>
#include <asm/mmu.h>
#include <asm/export.h>

.text

Expand Down Expand Up @@ -110,6 +111,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
isync
blr
.previous .text
EXPORT_SYMBOL(flush_icache_range)
/*
* Like above, but only do the D-cache.
*
Expand Down Expand Up @@ -139,6 +141,7 @@ _GLOBAL(flush_dcache_range)
bdnz 0b
sync
blr
EXPORT_SYMBOL(flush_dcache_range)

/*
* Like above, but works on non-mapped physical addresses.
Expand Down Expand Up @@ -242,6 +245,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
blr

_GLOBAL(__bswapdi2)
EXPORT_SYMBOL(__bswapdi2)
srdi r8,r3,32
rlwinm r7,r3,8,0xffffffff
rlwimi r7,r3,24,0,7
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ static DECLARE_BITMAP(phb_bitmap, MAX_PHBS);

/* ISA Memory physical address */
resource_size_t isa_mem_base;
EXPORT_SYMBOL(isa_mem_base);


static struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
unsigned long isa_io_base = 0;
unsigned long pci_dram_offset = 0;
int pcibios_assign_bus_offset = 1;
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(pci_dram_offset);

void pcibios_make_OF_bus_map(void);

Expand Down
37 changes: 0 additions & 37 deletions arch/powerpc/kernel/ppc_ksyms.c

This file was deleted.

Loading

0 comments on commit 9445aa1

Please sign in to comment.