allowing exports in *.S
Subsystems (14)
RFC PATCH 1/1 allowing exports in *.S
The policy wrt exports right now is "put it next to the definition
of object being exported, unless it's in assembler". The reasons for having an export near the definition are obvious - it's easier to keep things in sync that way, the fact that function can be called by modules is obvious without grepping through the entire tree, etc.
The major exception is for things defined in assembler - exports
of those are kept in arch/*/*/*ksyms*.c. The reason is that EXPORT_SYMBOL and friends can't be used from assembler; all the reasons to keep them with definitions still apply, but we simply can't do that.
Another unpleasant issue is that lib-y objects need to be careful
about their exports - it *is* done in quite a few places, but it's only legitimate as long as any .config either doesn't include any modules using a symbol in question _or_ has built-in users of something from the same object. For something like ctype.c the latter is a safe bet, but something more subtle can suddenly get into trouble years later when such a config becomes possible - the lack of built-in users ends up with linker not picking the object at all, which leads to missing export. As the result, we have things like "here's a long series of lib-y, with that object in the middle going into obj-y" with no indication of the reasons why *and* nothing to guarantee that we won't need the same treatment for other objects there.
It is connected to the former, since quite a few *.S that contain
exported functions happen to be in lib-y.
This series (available in vfs.git#work.asm-exports) introduces
a new header (asm/export.h), to be included from *.S and defining variants of EXPORT_SYMBOL and EXPORT_SYMBOL_GPL usable there. It also allows safe exports from lib-* - any object that contains an export after it's been compiled gets automatically pulled into vmlinux.
The only real restriction left is that if you have a weak symbol,
exporting it from the same object file will forcibly peek _that_ definition, even if the symbol itself is overridden by another alternative at link time.
The first patch allows to export safely from lib-*, the second one adds asm-generic/export.h, usable as-is for almost all architectures. The only exceptions are 64bit x86, which wants unusually strong alignment for struct kernel_symbol and m68k, which wants only 16bit alignements for pointers (and for struct kernel_symbol as well). Such an architecture can add asm/export.h that defines a couple of macros (KSYM_ALIGN and KCRC_ALIGN) and includes <asm-generic/export.h>. Normally you only need to add generic-y += export.h to asm/Kbuild; of course, if you don't put any exports into asm files, you don't need to do anything at all.
The rest of that series is mostly proof-of-concept "let's take exports on <architecture> to the matching definitions" for a bunch of architectures; it's more of a demonstration that it can be done - any given architecture might prefer to add convenience macros, etc. This is just adding includes of asm/export.h and moves EXPORT_SYMBOL/EXPORT_SYMBOL_GPL to *.S. Usually it ends up with arch/*/*/*ksym*.c gone.
A bunch of detritus had been found and removed in process - e.g. exports of static inline, functions that had lost both in-tree callers and export, but forgotten and left behind, etc. I'm fairly sure that more junk like that is out there; that's one of the reasons why exports really ought to be near the definitions...
Of course, we don't have to move all exports at once (or move them at all); it's not a flagday conversion. The whole series so far can be picked atgit://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.asm-exports; I'll post individual patches in followups.
Please, review and comment.
Shortlog:
Al Viro (12):
[kbuild] handle exports in lib-y objects reliably EXPORT_SYMBOL() for asm
x86: move exports to actual definitions
alpha: move exports to actual definitions
m68k: move exports to definitions
s390: move exports to definitions
arm: move exports to definitions
ppc: move exports to definitions
sparc: move exports to definitions
ia64: move exports to definitions [sparc] unify 32bit and 64bit string.h
sparc32: debride memcpy.S a bit
Diffstat:
arch/alpha/include/asm/Kbuild | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/alpha_ksyms.c | 102 ------------------- arch/alpha/kernel/machvec_impl.h | 6 +- arch/alpha/kernel/setup.c | 1 + arch/alpha/lib/callback_srm.S | 5 + arch/alpha/lib/checksum.c | 3 + arch/alpha/lib/clear_page.S | 3 +- arch/alpha/lib/clear_user.S | 2 + arch/alpha/lib/copy_page.S | 3 +- arch/alpha/lib/copy_user.S | 3 + arch/alpha/lib/csum_ipv6_magic.S | 2 + arch/alpha/lib/csum_partial_copy.c | 2 + arch/alpha/lib/dec_and_lock.c | 2 + arch/alpha/lib/divide.S | 3 + arch/alpha/lib/ev6-clear_page.S | 3 +- arch/alpha/lib/ev6-clear_user.S | 3 +- arch/alpha/lib/ev6-copy_page.S | 3 +- arch/alpha/lib/ev6-copy_user.S | 3 +- arch/alpha/lib/ev6-csum_ipv6_magic.S | 2 + arch/alpha/lib/ev6-divide.S | 3 + arch/alpha/lib/ev6-memchr.S | 3 +- arch/alpha/lib/ev6-memcpy.S | 3 +- arch/alpha/lib/ev6-memset.S | 7 +- arch/alpha/lib/ev67-strcat.S | 3 +- arch/alpha/lib/ev67-strchr.S | 3 +- arch/alpha/lib/ev67-strlen.S | 3 +- arch/alpha/lib/ev67-strncat.S | 3 +- arch/alpha/lib/ev67-strrchr.S | 3 +- arch/alpha/lib/fpreg.c | 7 ++ arch/alpha/lib/memchr.S | 3 +- arch/alpha/lib/memcpy.c | 5 +- arch/alpha/lib/memmove.S | 3 +- arch/alpha/lib/memset.S | 7 +- arch/alpha/lib/strcat.S | 2 + arch/alpha/lib/strchr.S | 3 +- arch/alpha/lib/strcpy.S | 3 +- arch/alpha/lib/strlen.S | 3 +- arch/alpha/lib/strncat.S | 3 +- arch/alpha/lib/strncpy.S | 3 +- arch/alpha/lib/strrchr.S | 3 +- arch/arm/include/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ---------------------------------- arch/arm/kernel/entry-ftrace.S | 3 + arch/arm/kernel/head.S | 3 + arch/arm/kernel/smccc-call.S | 3 + arch/arm/lib/ashldi3.S | 3 + arch/arm/lib/ashrdi3.S | 3 + arch/arm/lib/bitops.h | 5 + arch/arm/lib/bswapsdi2.S | 3 + arch/arm/lib/clear_user.S | 4 + arch/arm/lib/copy_from_user.S | 2 + arch/arm/lib/copy_page.S | 2 + arch/arm/lib/copy_to_user.S | 4 + arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 + arch/arm/lib/csumpartialcopy.S | 1 + arch/arm/lib/csumpartialcopygeneric.S | 2 + arch/arm/lib/csumpartialcopyuser.S | 1 + arch/arm/lib/delay.c | 2 + arch/arm/lib/div64.S | 2 + arch/arm/lib/findbit.S | 9 ++ arch/arm/lib/getuser.S | 9 ++ arch/arm/lib/io-readsb.S | 2 + arch/arm/lib/io-readsl.S | 2 + arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 + arch/arm/lib/io-writesb.S | 2 + arch/arm/lib/io-writesl.S | 2 + arch/arm/lib/io-writesw-armv3.S | 2 + arch/arm/lib/io-writesw-armv4.S | 2 + arch/arm/lib/lib1funcs.S | 9 ++ arch/arm/lib/lshrdi3.S | 3 + arch/arm/lib/memchr.S | 2 + arch/arm/lib/memcpy.S | 3 + arch/arm/lib/memmove.S | 2 + arch/arm/lib/memset.S | 3 + arch/arm/lib/memzero.S | 2 + arch/arm/lib/muldi3.S | 3 + arch/arm/lib/putuser.S | 5 + arch/arm/lib/strchr.S | 2 + arch/arm/lib/strrchr.S | 2 + arch/arm/lib/uaccess_with_memcpy.c | 3 + arch/arm/lib/ucmpdi2.S | 3 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ---- arch/arm/mach-imx/ssi-fiq.S | 7 +- arch/ia64/include/asm/Kbuild | 1 + arch/ia64/kernel/entry.S | 3 + arch/ia64/kernel/esi_stub.S | 2 + arch/ia64/kernel/head.S | 3 + arch/ia64/kernel/ia64_ksyms.c | 94 +---------------- arch/ia64/kernel/ivt.S | 2 + arch/ia64/kernel/pal.S | 7 ++ arch/ia64/kernel/setup.c | 4 + arch/ia64/lib/clear_page.S | 2 + arch/ia64/lib/clear_user.S | 2 + arch/ia64/lib/copy_page.S | 2 + arch/ia64/lib/copy_page_mck.S | 2 + arch/ia64/lib/copy_user.S | 2 + arch/ia64/lib/flush.S | 2 + arch/ia64/lib/idiv32.S | 2 + arch/ia64/lib/idiv64.S | 2 + arch/ia64/lib/ip_fast_csum.S | 3 + arch/ia64/lib/memcpy.S | 2 + arch/ia64/lib/memcpy_mck.S | 3 + arch/ia64/lib/memset.S | 2 + arch/ia64/lib/strlen.S | 2 + arch/ia64/lib/strlen_user.S | 2 + arch/ia64/lib/strncpy_from_user.S | 2 + arch/ia64/lib/strnlen_user.S | 2 + arch/ia64/lib/xor.S | 5 + arch/m68k/include/asm/export.h | 3 + arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/m68k_ksyms.c | 32 ------ arch/m68k/lib/ashldi3.c | 4 + arch/m68k/lib/ashrdi3.c | 4 + arch/m68k/lib/divsi3.S | 3 + arch/m68k/lib/lshrdi3.c | 4 + arch/m68k/lib/modsi3.S | 3 + arch/m68k/lib/muldi3.c | 4 + arch/m68k/lib/mulsi3.S | 4 +- arch/m68k/lib/udivsi3.S | 4 +- arch/m68k/lib/umodsi3.S | 4 +- arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/kernel/Makefile | 4 - arch/powerpc/kernel/entry_32.S | 2 + arch/powerpc/kernel/entry_64.S | 3 + arch/powerpc/kernel/epapr_hcalls.S | 2 + arch/powerpc/kernel/fpu.S | 3 + arch/powerpc/kernel/head_32.S | 5 + arch/powerpc/kernel/head_40x.S | 2 + arch/powerpc/kernel/head_44x.S | 2 + arch/powerpc/kernel/head_64.S | 2 + arch/powerpc/kernel/head_8xx.S | 2 + arch/powerpc/kernel/head_fsl_booke.S | 2 + arch/powerpc/kernel/misc.S | 2 + arch/powerpc/kernel/misc_32.S | 12 +++ arch/powerpc/kernel/misc_64.S | 4 + arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/pci_32.c | 2 + arch/powerpc/kernel/ppc_ksyms.c | 39 -------- arch/powerpc/kernel/ppc_ksyms_32.c | 61 ------------ arch/powerpc/kernel/setup_32.c | 6 ++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/kernel/vector.S | 4 + arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/checksum_32.S | 4 + arch/powerpc/lib/checksum_64.S | 4 + arch/powerpc/lib/copy_32.S | 5 + arch/powerpc/lib/copypage_64.S | 2 + arch/powerpc/lib/copyuser_64.S | 2 + arch/powerpc/lib/hweight_64.S | 5 + arch/powerpc/lib/mem_64.S | 3 + arch/powerpc/lib/memcmp_64.S | 2 + arch/powerpc/lib/memcpy_64.S | 2 + arch/powerpc/lib/ppc_ksyms.c | 35 ------- arch/powerpc/lib/string.S | 10 ++ arch/powerpc/lib/string_64.S | 2 + arch/powerpc/mm/hash_low_32.S | 3 + arch/powerpc/sysdev/dcr-low.S | 3 + arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++ arch/s390/kernel/mcount.S | 3 + arch/s390/kernel/s390_ksyms.c | 15 --- arch/s390/lib/mem.S | 3 + arch/sparc/include/asm/Kbuild | 1 + arch/sparc/include/asm/string.h | 34 +++++++ arch/sparc/include/asm/string_32.h | 56 ----------- arch/sparc/include/asm/string_64.h | 44 -------- arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/entry.S | 3 + arch/sparc/kernel/head_32.S | 3 + arch/sparc/kernel/head_64.S | 7 +- arch/sparc/kernel/helpers.S | 2 + arch/sparc/kernel/hvcalls.S | 4 + arch/sparc/kernel/sparc_ksyms.c | 12 +++ arch/sparc/kernel/sparc_ksyms_32.c | 31 ------ arch/sparc/kernel/sparc_ksyms_64.c | 52 ---------- arch/sparc/lib/Makefile | 1 - arch/sparc/lib/U1memcpy.S | 2 + arch/sparc/lib/VISsave.S | 2 + arch/sparc/lib/ashldi3.S | 2 + arch/sparc/lib/ashrdi3.S | 2 + arch/sparc/lib/atomic_64.S | 10 +- arch/sparc/lib/bitops.S | 7 ++ arch/sparc/lib/blockops.S | 3 + arch/sparc/lib/bzero.S | 4 + arch/sparc/lib/checksum_32.S | 3 + arch/sparc/lib/checksum_64.S | 2 + arch/sparc/lib/clear_page.S | 3 + arch/sparc/lib/copy_in_user.S | 2 + arch/sparc/lib/copy_page.S | 2 + arch/sparc/lib/copy_user.S | 2 + arch/sparc/lib/csum_copy.S | 3 + arch/sparc/lib/divdi3.S | 2 + arch/sparc/lib/ffs.S | 3 + arch/sparc/lib/hweight.S | 5 + arch/sparc/lib/ipcsum.S | 2 + arch/sparc/lib/ksyms.c | 165 ------------------------------ arch/sparc/lib/locks.S | 5 + arch/sparc/lib/lshrdi3.S | 2 + arch/sparc/lib/mcount.S | 2 + arch/sparc/lib/memcmp.S | 2 + arch/sparc/lib/memcpy.S | 86 +--------------- arch/sparc/lib/memmove.S | 2 + arch/sparc/lib/memscan_32.S | 4 + arch/sparc/lib/memscan_64.S | 4 + arch/sparc/lib/memset.S | 3 + arch/sparc/lib/muldi3.S | 2 + arch/sparc/lib/strlen.S | 2 + arch/sparc/lib/strncmp_32.S | 2 + arch/sparc/lib/strncmp_64.S | 2 + arch/sparc/lib/xor.S | 9 ++ arch/x86/entry/entry_32.S | 2 + arch/x86/entry/entry_64.S | 2 + arch/x86/entry/thunk_32.S | 3 + arch/x86/entry/thunk_64.S | 3 + arch/x86/include/asm/export.h | 4 + arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/head_32.S | 2 + arch/x86/kernel/head_64.S | 3 + arch/x86/kernel/i386_ksyms_32.c | 44 -------- arch/x86/kernel/mcount_64.S | 2 + arch/x86/kernel/x8664_ksyms_64.c | 79 --------------- arch/x86/lib/checksum_32.S | 3 + arch/x86/lib/clear_page_64.S | 2 + arch/x86/lib/cmpxchg8b_emu.S | 2 + arch/x86/lib/copy_page_64.S | 2 + arch/x86/lib/copy_user_64.S | 8 ++ arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/getuser.S | 5 + arch/x86/lib/memcpy_64.S | 3 + arch/x86/lib/memmove_64.S | 3 + arch/x86/lib/memset_64.S | 3 + arch/x86/lib/putuser.S | 5 + arch/x86/lib/strstr_32.c | 3 +- arch/x86/um/Makefile | 2 +- arch/x86/um/checksum_32.S | 2 + arch/x86/um/ksyms.c | 13 --- include/asm-generic/export.h | 61 ++++++++++++ scripts/Makefile.build | 20 ++++ 244 files changed, 759 insertions(+), 1203 deletions(-) delete mode 100644 arch/alpha/kernel/alpha_ksyms.c delete mode 100644 arch/arm/kernel/armksyms.c delete mode 100644 arch/arm/mach-imx/ssi-fiq-ksym.c create mode 100644 arch/m68k/include/asm/export.h delete mode 100644 arch/m68k/kernel/m68k_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms_32.c delete mode 100644 arch/powerpc/lib/ppc_ksyms.c delete mode 100644 arch/s390/kernel/s390_ksyms.c create mode 100644 arch/sparc/kernel/sparc_ksyms.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_32.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_64.c delete mode 100644 arch/sparc/lib/ksyms.c create mode 100644 arch/x86/include/asm/export.h delete mode 100644 arch/x86/kernel/i386_ksyms_32.c delete mode 100644 arch/x86/kernel/x8664_ksyms_64.c delete mode 100644 arch/x86/um/ksyms.c create mode 100644 include/asm-generic/export.h
PATCH 1/12 handle exports in lib-y objects reliably
From: Al Viro <[email protected]>
Collect the symbols exported by anything that goes into lib.a and add an empty object (lib-exports.o) with explicit undefs for each of those to obj-y.
That allows to relax the rules regarding the use of exports in lib-* objects - right now an object with export can be in lib-* only if we are guaranteed that there always will be users in built-in parts of the tree, otherwise it needs to be in obj-*. As the result, we have an unholy mix of lib- and obj- in lib/Makefile and (especially) in arch/*/lib/Makefile. Moreover, a change in generic part of the kernel can lead to mysteriously missing exports on some configs. With this change we don't have to worry about that anymore.
--- scripts/Makefile.build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
scripts/Makefile.build +20 -0
@@ -81,6 +81,7 @@ endif ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),) lib-target := $(obj)/lib.a +obj-y += $(obj)/lib-ksyms.o endif ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
@@ -363,6 +364,25 @@ $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) targets += $(lib-target) + +dummy-object = $(obj)/__lib_exports.o +ksyms-lds = $(obj)/lib-ksyms.lds +ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX +ref_prefix = EXTERN(_ +else +ref_prefix = EXTERN( +endif + +quiet_cmd_export_list = EXPORTS $@ +cmd_export_list = $(OBJDUMP) -h $< | \ + sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\ + rm -f $(dummy-object);\ + $(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\ + $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\ + rm $(dummy-object) $(ksyms-lds) + +$(obj)/lib-ksyms.o: $(lib-target) FORCE + $(call if_changed,export_list) endif #
Signature · 1 line
2.1.4
PATCH 2/12 EXPORT_SYMBOL() for asm
In reply to Al ViroFrom: Al Viro <[email protected]>
Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add export.h to asm/Kbuild and start using <asm/export.h> from assembler. The area where the things might diverge from default is the alignment; normally it's 8 bytes on 64bit targets and 4 on 32bit ones, both for unsigned long and for struct kernel_symbol.
Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes (for both) and amd64 aligns struct kernel_symbol to 16 bytes. For those we'll need to have asm/export.h overriding the constants used by generic version (KSYM_ALIGN and KCRC_ALIGN for kernel_symbol and unsigned long resp.) and including asm-generic/export.h.
And no, __alignof__ would not do the trick - on amd64 __alignof__ of struct kernel_symbol is 8, not 16.
--- include/asm-generic/export.h | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/asm-generic/export.h
include/asm-generic/export.h new file +61 -0
@@ -0,0 +1,61 @@ +#ifndef __ASM_GENERIC_EXPORT_H +#define __ASM_GENERIC_EXPORT_H + +#ifdef CONFIG_64BIT +#define __put .quad +#ifndef KSYM_ALIGN +#define KSYM_ALIGN 8 +#endif +#ifndef KCRC_ALIGN +#define KCRC_ALIGN 8 +#endif +#else +#define __put .long +#ifndef KSYM_ALIGN +#define KSYM_ALIGN 4 +#endif +#ifndef KCRC_ALIGN +#define KCRC_ALIGN 4 +#endif +#endif +/* + * note on .section use: @progbits vs %progbits nastiness doesn't matter, + * since we immediately emit into those sections anyway. + */ +.macro __EXPORT_SYMBOL name,sec +#ifdef CONFIG_MODULES + .globl __ksymtab_\name + .section ___ksymtab\sec+\name,"a" + .balign KSYM_ALIGN +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX + ___ksymtab_\name: __put _\name, ___kstrtab_\name +#else + __ksymtab_\name: __put \name, __kstrtab_\name +#endif + .previous + .section __ksymtab_strings,"a" +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX + ___kstrtab_\name: .asciz "_\name" +#else + __kstrtab_\name: .asciz "\name" +#endif + .previous +#ifdef CONFIG_MODVERSIONS + .section ___kcrctab\sec+\name,"a" + .balign KCRC_ALIGN +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX + ___kcrctab_\name: __put ___crc_\name + .weak ___crc_\name +#else + __kcrctab_\name: __put __crc_\name + .weak __crc_\name +#endif + .previous +#endif +#endif +.endm +#undef __put +#define EXPORT_SYMBOL(name) __EXPORT_SYMBOL name +#define EXPORT_SYMBOL_GPL(name) __EXPORT_SYMBOL name, _gpl + +#endif
Signature · 1 line
2.1.4
Re: [PATCH 02/12] EXPORT_SYMBOL() for asm
Quoted 15 lines · On Friday 29 January 2016 19:18:24 Al Viro wrote:
From: Al Viro <[email protected]>
Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add
export.hto asm/Kbuild and start using <asm/export.h> from assembler. The area where the things might diverge from default is the alignment; normally it's 8 bytes on 64bit targets and 4 on 32bit ones, both for unsigned long and for structkernel_symbol.Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes (for both) and amd64 aligns struct
kernel_symbolto 16 bytes. For those we'll need to haveasm/export.hoverriding the constants used by generic version (KSYM_ALIGNandKCRC_ALIGNforkernel_symboland unsigned long resp.) and includingasm-generic/export.h.
Quoted 9 lines
And no,
__alignof__would not do the trick - on amd64__alignof__of structkernel_symbolis 8, not 16.Signed-off-by Al Viro <[email protected]>--- include/asm-generic/export.h | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/asm-generic/export.h
For asm-generic:
Re: [PATCH 02/12] EXPORT_SYMBOL() for asm
In reply to Al ViroQuoted 13 lines · Al Viro
Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add
export.hto asm/Kbuild and start using <asm/export.h> from assembler. The area where the things might diverge from default is the alignment; normally it's 8 bytes on 64bit targets and 4 on 32bit ones, both for unsigned long and for structkernel_symbol.Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes (for both) and amd64 aligns struct
kernel_symbolto 16 bytes. For those we'll need to haveasm/export.hoverriding the constants used by generic version (KSYM_ALIGNandKCRC_ALIGNforkernel_symboland unsigned long resp.) and includingasm-generic/export.h.
Quoted 4 lines
And no,
__alignof__would not do the trick - on amd64__alignof__of structkernel_symbolis 8, not 16.Signed-off-by Al Viro <[email protected]>
PATCH 3/12 x86: move exports to actual definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/x86/entry/entry_32.S | 2 + arch/x86/entry/entry_64.S | 2 + arch/x86/entry/thunk_32.S | 3 ++ arch/x86/entry/thunk_64.S | 3 ++ arch/x86/include/asm/export.h | 4 ++ arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/head_32.S | 2 + arch/x86/kernel/head_64.S | 3 ++ arch/x86/kernel/i386_ksyms_32.c | 44 ---------------------- arch/x86/kernel/mcount_64.S | 2 + arch/x86/kernel/x8664_ksyms_64.c | 79 ---------------------------------------- arch/x86/lib/checksum_32.S | 3 ++ arch/x86/lib/clear_page_64.S | 2 + arch/x86/lib/cmpxchg8b_emu.S | 2 + arch/x86/lib/copy_page_64.S | 2 + arch/x86/lib/copy_user_64.S | 8 ++++ arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/getuser.S | 5 +++ arch/x86/lib/memcpy_64.S | 3 ++ arch/x86/lib/memmove_64.S | 3 ++ arch/x86/lib/memset_64.S | 3 ++ arch/x86/lib/putuser.S | 5 +++ arch/x86/lib/strstr_32.c | 3 +- arch/x86/um/Makefile | 2 +- arch/x86/um/checksum_32.S | 2 + arch/x86/um/ksyms.c | 13 ------- 26 files changed, 64 insertions(+), 141 deletions(-) create mode 100644 arch/x86/include/asm/export.h delete mode 100644 arch/x86/kernel/i386_ksyms_32.c delete mode 100644 arch/x86/kernel/x8664_ksyms_64.c delete mode 100644 arch/x86/um/ksyms.c
arch/x86/entry/entry_32.S +2 -0
@@ -44,6 +44,7 @@ #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> .section .entry.text, "ax"
@@ -865,6 +866,7 @@ trace: jmp ftrace_stub END(mcount) #endif /* CONFIG_DYNAMIC_FTRACE */ +EXPORT_SYMBOL(mcount) #endif /* CONFIG_FUNCTION_TRACER */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
arch/x86/entry/entry_64.S +2 -0
@@ -35,6 +35,7 @@ #include <asm/asm.h> #include <asm/smap.h> #include <asm/pgtable_types.h> +#include <asm/export.h> #include <linux/err.h> /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
@@ -854,6 +855,7 @@ gs_change: popfq ret END(native_load_gs_index) +EXPORT_SYMBOL(native_load_gs_index) _ASM_EXTABLE(gs_change, bad_gs) .section .fixup, "ax"
arch/x86/entry/thunk_32.S +3 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> #include <asm/asm.h> + #include <asm/export.h> /* put return address in eax (arg1) */ .macro THUNK name, func, put_ret_addr_in_eax=0
@@ -36,5 +37,7 @@ #ifdef CONFIG_PREEMPT THUNK ___preempt_schedule, preempt_schedule THUNK ___preempt_schedule_notrace, preempt_schedule_notrace + EXPORT_SYMBOL(___preempt_schedule) + EXPORT_SYMBOL(___preempt_schedule_notrace) #endif
arch/x86/entry/thunk_64.S +3 -0
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include "calling.h" #include <asm/asm.h> +#include <asm/export.h> /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func, put_ret_addr_in_rdi=0
@@ -47,6 +48,8 @@ #ifdef CONFIG_PREEMPT THUNK ___preempt_schedule, preempt_schedule THUNK ___preempt_schedule_notrace, preempt_schedule_notrace + EXPORT_SYMBOL(___preempt_schedule) + EXPORT_SYMBOL(___preempt_schedule_notrace) #endif #if defined(CONFIG_TRACE_IRQFLAGS) \
arch/x86/include/asm/export.h new file +4 -0
@@ -0,0 +1,4 @@ +#ifdef CONFIG_64BIT +#define KSYM_ALIGN 16 +#endif +#include <asm-generic/export.h>
arch/x86/kernel/Makefile +1 -3
@@ -30,9 +30,7 @@ obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o obj-y += setup.o x86_init.o i8259.o irqinit.o jump_label.o obj-$(CONFIG_IRQ_WORK) += irq_work.o obj-y += probe_roms.o -obj-$(CONFIG_X86_32) += i386_ksyms_32.o -obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o -obj-$(CONFIG_X86_64) += mcount_64.o +obj-$(CONFIG_X86_64) += sys_x86_64.o mcount_64.o obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o obj-$(CONFIG_SYSFS) += ksysfs.o obj-y += bootflag.o e820.o
arch/x86/kernel/head_32.S +2 -0
@@ -23,6 +23,7 @@ #include <asm/percpu.h> #include <asm/nops.h> #include <asm/bootparam.h> +#include <asm/export.h> /* Physical address */ #define pa(X) ((X) - __PAGE_OFFSET)
@@ -678,6 +679,7 @@ ENTRY(empty_zero_page) .fill 4096,1,0 ENTRY(swapper_pg_dir) .fill 1024,4,0 +EXPORT_SYMBOL(empty_zero_page) /* * This starts the data section.
arch/x86/kernel/head_64.S +3 -0
@@ -20,6 +20,7 @@ #include <asm/processor-flags.h> #include <asm/percpu.h> #include <asm/nops.h> +#include <asm/export.h> #ifdef CONFIG_PARAVIRT #include <asm/asm-offsets.h>
@@ -523,10 +524,12 @@ early_gdt_descr_base: ENTRY(phys_base) /* This must match the first entry in level2_kernel_pgt */ .quad 0x0000000000000000 +EXPORT_SYMBOL(phys_base) #include "../../x86/xen/xen-head.S" __PAGE_ALIGNED_BSS NEXT_PAGE(empty_zero_page) .skip PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page)
arch/x86/kernel/i386_ksyms_32.c deleted +0 -44
44 lines not on this page · raw message
arch/x86/kernel/mcount_64.S +2 -0
@@ -7,6 +7,7 @@ #include <linux/linkage.h> #include <asm/ptrace.h> #include <asm/ftrace.h> +#include <asm/export.h> .code64
@@ -291,6 +292,7 @@ trace: jmp fgraph_trace END(function_hook) #endif /* CONFIG_DYNAMIC_FTRACE */ +EXPORT_SYMBOL(function_hook) #endif /* CONFIG_FUNCTION_TRACER */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
arch/x86/kernel/x8664_ksyms_64.c deleted +0 -79
79 lines not on this page · raw message
arch/x86/lib/checksum_32.S +3 -0
@@ -28,6 +28,7 @@ #include <linux/linkage.h> #include <asm/errno.h> #include <asm/asm.h> +#include <asm/export.h> /* * computes a partial checksum, e.g. for TCP/UDP fragments
@@ -251,6 +252,7 @@ ENTRY(csum_partial) ENDPROC(csum_partial) #endif +EXPORT_SYMBOL(csum_partial) /* unsigned int csum_partial_copy_generic (const char *src, char *dst,
@@ -490,3 +492,4 @@ ENDPROC(csum_partial_copy_generic) #undef ROUND1 #endif +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/x86/lib/clear_page_64.S +2 -0
@@ -1,6 +1,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * Most CPUs support enhanced REP MOVSB/STOSB instructions. It is
@@ -23,6 +24,7 @@ ENTRY(clear_page) rep stosq ret ENDPROC(clear_page) +EXPORT_SYMBOL(clear_page) ENTRY(clear_page_orig)
arch/x86/lib/cmpxchg8b_emu.S +2 -0
@@ -7,6 +7,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text
@@ -48,3 +49,4 @@ ENTRY(cmpxchg8b_emu) ret ENDPROC(cmpxchg8b_emu) +EXPORT_SYMBOL(cmpxchg8b_emu)
arch/x86/lib/copy_page_64.S +2 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * Some CPUs run faster using the string copy instructions (sane microcode).
@@ -17,6 +18,7 @@ ENTRY(copy_page) rep movsq ret ENDPROC(copy_page) +EXPORT_SYMBOL(copy_page) ENTRY(copy_page_regs) subq $2*8, %rsp
arch/x86/lib/copy_user_64.S +8 -0
@@ -14,6 +14,7 @@ #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> /* Standard copy_to_user with segment limit checking */ ENTRY(_copy_to_user)
@@ -29,6 +30,7 @@ ENTRY(_copy_to_user) "jmp copy_user_enhanced_fast_string", \ X86_FEATURE_ERMS ENDPROC(_copy_to_user) +EXPORT_SYMBOL(_copy_to_user) /* Standard copy_from_user with segment limit checking */ ENTRY(_copy_from_user)
@@ -44,6 +46,8 @@ ENTRY(_copy_from_user) "jmp copy_user_enhanced_fast_string", \ X86_FEATURE_ERMS ENDPROC(_copy_from_user) +EXPORT_SYMBOL(_copy_from_user) + .section .fixup,"ax" /* must zero dest */
@@ -155,6 +159,7 @@ ENTRY(copy_user_generic_unrolled) _ASM_EXTABLE(21b,50b) _ASM_EXTABLE(22b,50b) ENDPROC(copy_user_generic_unrolled) +EXPORT_SYMBOL(copy_user_generic_unrolled) /* Some CPUs run faster using the string copy instructions. * This is also a lot simpler. Use them when possible.
@@ -200,6 +205,7 @@ ENTRY(copy_user_generic_string) _ASM_EXTABLE(1b,11b) _ASM_EXTABLE(3b,12b) ENDPROC(copy_user_generic_string) +EXPORT_SYMBOL(copy_user_generic_string) /* * Some CPUs are adding enhanced REP MOVSB/STOSB instructions.
@@ -229,6 +235,7 @@ ENTRY(copy_user_enhanced_fast_string) _ASM_EXTABLE(1b,12b) ENDPROC(copy_user_enhanced_fast_string) +EXPORT_SYMBOL(copy_user_enhanced_fast_string) /* * copy_user_nocache - Uncached memory copy with exception handling
@@ -319,3 +326,4 @@ ENTRY(__copy_user_nocache) _ASM_EXTABLE(21b,50b) _ASM_EXTABLE(22b,50b) ENDPROC(__copy_user_nocache) +EXPORT_SYMBOL(__copy_user_nocache)
arch/x86/lib/csum-partial_64.c +1 -0
@@ -135,6 +135,7 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)return (__force __wsum )add32_with_carry (do_csum (buff, len), (__force u32 )sum); } +EXPORT_SYMBOL (csum_partial);/* * this routine is used for miscellaneous IP-like checksums, mainly
arch/x86/lib/getuser.S +5 -0
@@ -32,6 +32,7 @@ #include <asm/thread_info.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> .text ENTRY(__get_user_1)
@@ -44,6 +45,7 @@ ENTRY(__get_user_1) ASM_CLAC ret ENDPROC(__get_user_1) +EXPORT_SYMBOL(__get_user_1) ENTRY(__get_user_2) add $1,%_ASM_AX
@@ -57,6 +59,7 @@ ENTRY(__get_user_2) ASM_CLAC ret ENDPROC(__get_user_2) +EXPORT_SYMBOL(__get_user_2) ENTRY(__get_user_4) add $3,%_ASM_AX
@@ -70,6 +73,7 @@ ENTRY(__get_user_4) ASM_CLAC ret ENDPROC(__get_user_4) +EXPORT_SYMBOL(__get_user_4) ENTRY(__get_user_8) #ifdef CONFIG_X86_64
@@ -97,6 +101,7 @@ ENTRY(__get_user_8) ret #endif ENDPROC(__get_user_8) +EXPORT_SYMBOL(__get_user_8) bad_get_user:
arch/x86/lib/memcpy_64.S +3 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * We build a jump to memcpy_orig by default which gets NOPped out on
@@ -39,6 +40,8 @@ ENTRY(memcpy) ret ENDPROC(memcpy) ENDPROC(__memcpy) +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(__memcpy) /* * memcpy_erms() - enhanced fast string memcpy. This is faster and
arch/x86/lib/memmove_64.S +3 -0
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> #undef memmove
@@ -207,3 +208,5 @@ ENTRY(__memmove) retq ENDPROC(__memmove) ENDPROC(memmove) +EXPORT_SYMBOL(__memmove) +EXPORT_SYMBOL(memmove)
arch/x86/lib/memset_64.S +3 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> .weak memset
@@ -43,6 +44,8 @@ ENTRY(__memset) ret ENDPROC(memset) ENDPROC(__memset) +EXPORT_SYMBOL(memset) +EXPORT_SYMBOL(__memset) /* * ISO C memset - set a memory block to a byte value. This function uses
arch/x86/lib/putuser.S +5 -0
@@ -15,6 +15,7 @@ #include <asm/errno.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> /*
@@ -43,6 +44,7 @@ ENTRY(__put_user_1) xor %eax,%eax EXIT ENDPROC(__put_user_1) +EXPORT_SYMBOL(__put_user_1) ENTRY(__put_user_2) ENTER
@@ -55,6 +57,7 @@ ENTRY(__put_user_2) xor %eax,%eax EXIT ENDPROC(__put_user_2) +EXPORT_SYMBOL(__put_user_2) ENTRY(__put_user_4) ENTER
@@ -67,6 +70,7 @@ ENTRY(__put_user_4) xor %eax,%eax EXIT ENDPROC(__put_user_4) +EXPORT_SYMBOL(__put_user_4) ENTRY(__put_user_8) ENTER
@@ -82,6 +86,7 @@ ENTRY(__put_user_8) xor %eax,%eax EXIT ENDPROC(__put_user_8) +EXPORT_SYMBOL(__put_user_8) bad_put_user: movl $-EFAULT,%eax
arch/x86/lib/strstr_32.c +2 -1
@@ -1,4 +1,5 @@#include <linux/string.h> +#include <linux/export.h> char *strstr (const char *cs,const char *ct) {
@@ -28,4 +29,4 @@ __asm__ __volatile__( : "dx", "di");return __res; } - +EXPORT_SYMBOL (strstr);
arch/x86/um/Makefile +1 -1
@@ -8,7 +8,7 @@ else BITS := 64 endif -obj-y = bug.o bugs_$(BITS).o delay.o fault.o ksyms.o ldt.o \ +obj-y = bug.o bugs_$(BITS).o delay.o fault.o ldt.o \ ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ stub_$(BITS).o stub_segv.o \ sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
arch/x86/um/checksum_32.S +2 -0
@@ -27,6 +27,7 @@ #include <asm/errno.h> #include <asm/asm.h> +#include <asm/export.h> /* * computes a partial checksum, e.g. for TCP/UDP fragments
@@ -214,3 +215,4 @@ csum_partial: ret #endif + EXPORT_SYMBOL(csum_partial)
arch/x86/um/ksyms.c deleted +0 -13
@@ -1,13 +0,0 @@ -#include <linux/module.h> -#include <asm/string.h> -#include <asm/checksum.h> - -#ifndef CONFIG_X86_32 -/*XXX: we need them because they would be exported by x86_64 */ -#if (__GNUC__ ==4 && __GNUC_MINOR__ >=3 ) || __GNUC__ >4 -EXPORT_SYMBOL (memcpy); -#else -EXPORT_SYMBOL (__memcpy); -#endif -#endif -EXPORT_SYMBOL (csum_partial);
Signature · 1 line
2.1.4
Re: [PATCH 03/12] x86: move exports to actual definitions
Quoted 3 lines · Al Viro
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>
PATCH 4/12 alpha: move exports to actual definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/alpha/include/asm/Kbuild | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/alpha_ksyms.c | 102 ----------------------------------- arch/alpha/kernel/machvec_impl.h | 6 ++- arch/alpha/kernel/setup.c | 1 + arch/alpha/lib/callback_srm.S | 5 ++ arch/alpha/lib/checksum.c | 3 ++ arch/alpha/lib/clear_page.S | 3 +- arch/alpha/lib/clear_user.S | 2 + arch/alpha/lib/copy_page.S | 3 +- arch/alpha/lib/copy_user.S | 3 ++ arch/alpha/lib/csum_ipv6_magic.S | 2 + arch/alpha/lib/csum_partial_copy.c | 2 + arch/alpha/lib/dec_and_lock.c | 2 + arch/alpha/lib/divide.S | 3 ++ arch/alpha/lib/ev6-clear_page.S | 3 +- arch/alpha/lib/ev6-clear_user.S | 3 +- arch/alpha/lib/ev6-copy_page.S | 3 +- arch/alpha/lib/ev6-copy_user.S | 3 +- arch/alpha/lib/ev6-csum_ipv6_magic.S | 2 + arch/alpha/lib/ev6-divide.S | 3 ++ arch/alpha/lib/ev6-memchr.S | 3 +- arch/alpha/lib/ev6-memcpy.S | 3 +- arch/alpha/lib/ev6-memset.S | 7 ++- arch/alpha/lib/ev67-strcat.S | 3 +- arch/alpha/lib/ev67-strchr.S | 3 +- arch/alpha/lib/ev67-strlen.S | 3 +- arch/alpha/lib/ev67-strncat.S | 3 +- arch/alpha/lib/ev67-strrchr.S | 3 +- arch/alpha/lib/fpreg.c | 7 +++ arch/alpha/lib/memchr.S | 3 +- arch/alpha/lib/memcpy.c | 5 +- arch/alpha/lib/memmove.S | 3 +- arch/alpha/lib/memset.S | 7 ++- arch/alpha/lib/strcat.S | 2 + arch/alpha/lib/strchr.S | 3 +- arch/alpha/lib/strcpy.S | 3 +- arch/alpha/lib/strlen.S | 3 +- arch/alpha/lib/strncat.S | 3 +- arch/alpha/lib/strncpy.S | 3 +- arch/alpha/lib/strrchr.S | 3 +- 41 files changed, 99 insertions(+), 131 deletions(-) delete mode 100644 arch/alpha/kernel/alpha_ksyms.c
arch/alpha/include/asm/Kbuild +1 -0
@@ -3,6 +3,7 @@ generic-y += clkdev.h generic-y += cputime.h generic-y += exec.h +generic-y += export.h generic-y += irq_work.h generic-y += mcs_spinlock.h generic-y += mm-arch-hooks.h
arch/alpha/kernel/Makefile +1 -1
@@ -8,7 +8,7 @@ ccflags-y := -Wno-sign-compare obj-y := entry.o traps.o process.o osf_sys.o irq.o \ irq_alpha.o signal.o setup.o ptrace.o time.o \ - alpha_ksyms.o systbls.o err_common.o io.o + systbls.o err_common.o io.o obj-$(CONFIG_VGA_HOSE) += console.o obj-$(CONFIG_SMP) += smp.o
arch/alpha/kernel/alpha_ksyms.c deleted +0 -102
102 lines not on this page · raw message
arch/alpha/kernel/machvec_impl.h +4 -2
@@ -144,9 +144,11 @@else beforehand. Fine. We'll do it ourselves. */ #if 0 #define ALIAS_MV (system) \ - struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv"))); + struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv"))); \ + EXPORT_SYMBOL(alpha_mv);#else #define ALIAS_MV (system) \ - asm(".global alpha_mv\nalpha_mv = " #system "_mv"); + asm(".global alpha_mv\nalpha_mv = " #system "_mv"); \ + EXPORT_SYMBOL(alpha_mv);#endif #endif /* GENERIC */
arch/alpha/kernel/setup.c +1 -0
@@ -115,6 +115,7 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE;#ifdef CONFIG_ALPHA_GENERIC struct alpha_machine_vector alpha_mv; +EXPORT_SYMBOL (alpha_mv);#endif #ifndef alpha_using_srm
arch/alpha/lib/callback_srm.S +5 -0
@@ -3,6 +3,7 @@ */ #include <asm/console.h> +#include <asm/export.h> .text #define HWRPB_CRB_OFFSET 0xc0
@@ -92,6 +93,10 @@ CALLBACK(reset_env, CCB_RESET_ENV, 4) CALLBACK(save_env, CCB_SAVE_ENV, 1) CALLBACK(pswitch, CCB_PSWITCH, 3) CALLBACK(bios_emul, CCB_BIOS_EMUL, 5) + +EXPORT_SYMBOL(callback_getenv) +EXPORT_SYMBOL(callback_setenv) +EXPORT_SYMBOL(callback_save_env) .data __alpha_using_srm: # For use by bootpheader
arch/alpha/lib/checksum.c +3 -0
@@ -50,6 +50,7 @@ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, (__force u64 )saddr + (__force u64 )daddr + (__force u64)sum + ((len + proto) << 8)); } +EXPORT_SYMBOL (csum_tcpudp_magic); __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
@@ -148,6 +149,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) {return (__force __sum16 )~do_csum (iph,ihl*4 ); } +EXPORT_SYMBOL (ip_fast_csum);/* * computes the checksum of a memory block at buff, length len,
@@ -182,3 +184,4 @@ __sum16 ip_compute_csum(const void *buff, int len) {return (__force __sum16 )~from64to16 (do_csum (buff,len)); } +EXPORT_SYMBOL (ip_compute_csum);
arch/alpha/lib/clear_page.S +2 -1
@@ -3,7 +3,7 @@ * * Zero an entire page. */ - +#include <asm/export.h> .text .align 4 .global clear_page
@@ -37,3 +37,4 @@ clear_page: nop .end clear_page + EXPORT_SYMBOL(clear_page)
arch/alpha/lib/clear_user.S +2 -0
@@ -24,6 +24,7 @@ * Clobbers: * $1,$2,$3,$4,$5,$6 */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EX(x,y...) \
@@ -111,3 +112,4 @@ $exception: ret $31, ($28), 1 # .. e1 : .end __do_clear_user + EXPORT_SYMBOL(__do_clear_user)
arch/alpha/lib/copy_page.S +2 -1
@@ -3,7 +3,7 @@ * * Copy an entire page. */ - +#include <asm/export.h> .text .align 4 .global copy_page
@@ -47,3 +47,4 @@ copy_page: nop .end copy_page + EXPORT_SYMBOL(copy_page)
arch/alpha/lib/copy_user.S +3 -0
@@ -26,6 +26,8 @@ * $1,$2,$3,$4,$5,$6,$7 */ +#include <asm/export.h> + /* Allow an exception for an insn; exit if we get one. */ #define EXI(x,y...) \ 99: x,##y; \
@@ -143,3 +145,4 @@ $101: ret $31,($28),1 .end __copy_user +EXPORT_SYMBOL(__copy_user)
arch/alpha/lib/csum_ipv6_magic.S +2 -0
@@ -12,6 +12,7 @@ * added by Ivan Kokshaysky <[email protected]> */ +#include <asm/export.h> .globl csum_ipv6_magic .align 4 .ent csum_ipv6_magic
@@ -113,3 +114,4 @@ csum_ipv6_magic: ret # .. e1 : .end csum_ipv6_magic + EXPORT_SYMBOL(csum_ipv6_magic)
arch/alpha/lib/csum_partial_copy.c +2 -0
@@ -374,6 +374,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len, }return (__force __wsum )checksum; } +EXPORT_SYMBOL (csum_partial_copy_from_user);__wsum csum_partial_copy_nocheck (const void *src,void *dst,int len,__wsum sum)
@@ -386,3 +387,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)set_fs (oldfs);return checksum; } +EXPORT_SYMBOL (csum_partial_copy_nocheck);
arch/alpha/lib/dec_and_lock.c +2 -0
@@ -7,6 +7,7 @@#include <linux/spinlock.h> #include <linux/atomic.h> +#include <linux/export.h> asm (".text \n\ .global _atomic_dec_and_lock \n\
@@ -39,3 +40,4 @@ static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)spin_unlock (lock);return 0 ; } +EXPORT_SYMBOL (_atomic_dec_and_lock);
arch/alpha/lib/divide.S +3 -0
@@ -45,6 +45,7 @@ * $28 - compare status */ +#include <asm/export.h> #define halt .long 0 /*
@@ -151,6 +152,7 @@ ufunction: addq $30,STACK,$30 ret $31,($23),1 .end ufunction +EXPORT_SYMBOL(ufunction) /* * Uhh.. Ugly signed division. I'd rather not have it at all, but
@@ -193,3 +195,4 @@ sfunction: addq $30,STACK,$30 ret $31,($23),1 .end sfunction +EXPORT_SYMBOL(sfunction)
arch/alpha/lib/ev6-clear_page.S +2 -1
@@ -3,7 +3,7 @@ * * Zero an entire page. */ - +#include <asm/export.h> .text .align 4 .global clear_page
@@ -52,3 +52,4 @@ clear_page: nop .end clear_page + EXPORT_SYMBOL(clear_page)
arch/alpha/lib/ev6-clear_user.S +2 -1
@@ -43,6 +43,7 @@ * want to leave a hole (and we also want to avoid repeating lots of work) */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EX(x,y...) \ 99: x,##y; \
@@ -222,4 +223,4 @@ $exception: # Destination for exception recovery(?) nop # .. E .. .. : ret $31, ($28), 1 # L0 .. .. .. : L U L U .end __do_clear_user - + EXPORT_SYMBOL(__do_clear_user)
arch/alpha/lib/ev6-copy_page.S +2 -1
@@ -56,7 +56,7 @@ destination pages are in the dcache, but it is my guess that this is less important than the dcache miss case. */ - +#include <asm/export.h> .text .align 4 .global copy_page
@@ -201,3 +201,4 @@ copy_page: nop .end copy_page + EXPORT_SYMBOL(copy_page)
arch/alpha/lib/ev6-copy_user.S +2 -1
@@ -37,6 +37,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EXI(x,y...) \ 99: x,##y; \
@@ -256,4 +257,4 @@ $101: ret $31,($28),1 # L0 .end __copy_user - + EXPORT_SYMBOL(__copy_user)
arch/alpha/lib/ev6-csum_ipv6_magic.S +2 -0
@@ -52,6 +52,7 @@ * may cause additional delay in rare cases (load-load replay traps). */ +#include <asm/export.h> .globl csum_ipv6_magic .align 4 .ent csum_ipv6_magic
@@ -148,3 +149,4 @@ csum_ipv6_magic: ret # L0 : L U L U .end csum_ipv6_magic + EXPORT_SYMBOL(csum_ipv6_magic)
arch/alpha/lib/ev6-divide.S +3 -0
@@ -55,6 +55,7 @@ * Try not to change the actual algorithm if possible for consistency. */ +#include <asm/export.h> #define halt .long 0 /*
@@ -205,6 +206,7 @@ ufunction: addq $30,STACK,$30 # E : ret $31,($23),1 # L0 : L U U L .end ufunction +EXPORT_SYMBOL(ufunction) /* * Uhh.. Ugly signed division. I'd rather not have it at all, but
@@ -257,3 +259,4 @@ sfunction: addq $30,STACK,$30 # E : ret $31,($23),1 # L0 : L U U L .end sfunction +EXPORT_SYMBOL(sfunction)
arch/alpha/lib/ev6-memchr.S +2 -1
@@ -27,7 +27,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> .set noreorder .set noat
@@ -189,3 +189,4 @@ $not_found: ret # L0 : .end memchr + EXPORT_SYMBOL(memchr)
arch/alpha/lib/ev6-memcpy.S +2 -1
@@ -19,7 +19,7 @@ * Temp usage notes: * $1,$2, - scratch */ - +#include <asm/export.h> .set noreorder .set noat
@@ -242,6 +242,7 @@ $nomoredata: nop # E : .end memcpy + EXPORT_SYMBOL(memcpy) /* For backwards module compatibility. */ __memcpy = memcpy
arch/alpha/lib/ev6-memset.S +6 -1
@@ -26,7 +26,7 @@ * as fixes will need to be made in multiple places. The performance gain * is worth it. */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -229,6 +229,7 @@ end_b: nop ret $31,($26),1 # L0 : .end ___memset + EXPORT_SYMBOL(___memset) /* * This is the original body of code, prior to replication and
@@ -406,6 +407,7 @@ end: nop ret $31,($26),1 # L0 : .end __constant_c_memset + EXPORT_SYMBOL(__constant_c_memset) /* * This is a replicant of the __constant_c_memset code, rescheduled
@@ -594,6 +596,9 @@ end_w: ret $31,($26),1 # L0 : .end __memsetw + EXPORT_SYMBOL(__memsetw) memset = ___memset __memset = ___memset + EXPORT_SYMBOL(memset) + EXPORT_SYMBOL(__memset)
arch/alpha/lib/ev67-strcat.S +2 -1
@@ -19,7 +19,7 @@ * string once. */ - +#include <asm/export.h> .text .align 4
@@ -52,3 +52,4 @@ $found: cttz $2, $3 # U0 : br __stxcpy # L0 : .end strcat + EXPORT_SYMBOL(strcat)
arch/alpha/lib/ev67-strchr.S +2 -1
@@ -15,7 +15,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -86,3 +86,4 @@ $found: negq t0, t1 # E : clear all but least set bit ret # L0 : .end strchr + EXPORT_SYMBOL(strchr)
arch/alpha/lib/ev67-strlen.S +2 -1
@@ -17,7 +17,7 @@ * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1 * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ - +#include <asm/export.h> .set noreorder .set noat
@@ -47,3 +47,4 @@ $found: ret $31, ($26) # L0 : .end strlen + EXPORT_SYMBOL(strlen)
arch/alpha/lib/ev67-strncat.S +2 -1
@@ -20,7 +20,7 @@ * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> .text .align 4
@@ -92,3 +92,4 @@ $zerocount: ret # L0 : .end strncat + EXPORT_SYMBOL(strncat)
arch/alpha/lib/ev67-strrchr.S +2 -1
@@ -18,7 +18,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -107,3 +107,4 @@ $eos: nop .end strrchr + EXPORT_SYMBOL(strrchr)
arch/alpha/lib/fpreg.c +7 -0
@@ -4,6 +4,9 @@* (C) Copyright 1998 Linus Torvalds */ +#include <linux/compiler.h> +#include <linux/export.h> +#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define STT (reg,val) asm volatile ("ftoit $f"#reg",%0" : "=r"(val));#else
@@ -52,6 +55,7 @@ alpha_read_fp_reg (unsigned long reg) }return val; } +EXPORT_SYMBOL (alpha_read_fp_reg);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define LDT (reg,val) asm volatile ("itoft %0,$f"#reg : : "r"(val));
@@ -97,6 +101,7 @@ alpha_write_fp_reg (unsigned long reg, unsigned long val)case 31 :LDT (31 , val);break ; } } +EXPORT_SYMBOL (alpha_write_fp_reg);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define STS (reg,val) asm volatile ("ftois $f"#reg",%0" : "=r"(val));
@@ -146,6 +151,7 @@ alpha_read_fp_reg_s (unsigned long reg) }return val; } +EXPORT_SYMBOL (alpha_read_fp_reg_s);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define LDS (reg,val) asm volatile ("itofs %0,$f"#reg : : "r"(val));
@@ -191,3 +197,4 @@ alpha_write_fp_reg_s (unsigned long reg, unsigned long val)case 31 :LDS (31 , val);break ; } } +EXPORT_SYMBOL (alpha_write_fp_reg_s);
arch/alpha/lib/memchr.S +2 -1
@@ -31,7 +31,7 @@ For correctness consider that: - only minimum number of quadwords may be accessed - the third argument is an unsigned long */ - +#include <asm/export.h> .set noreorder .set noat
@@ -162,3 +162,4 @@ $not_found: ret # .. e1 : .end memchr + EXPORT_SYMBOL(memchr)
arch/alpha/lib/memcpy.c +2 -3
@@ -16,6 +16,7 @@*/ #include <linux/types.h> +#include <linux/export.h> /* * This should be done in one go with ldq_u*2/mask/stq_u. Do it
@@ -158,6 +159,4 @@ void * memcpy(void * dest, const void *src, size_t n)__memcpy_unaligned_up ((unsigned long ) dest, (unsigned long ) src, n);return dest; } - -/* For backward modules compatibility, define __memcpy. */ -asm("__memcpy = memcpy; .globl __memcpy" ); +EXPORT_SYMBOL (memcpy);
arch/alpha/lib/memmove.S +2 -1
@@ -6,7 +6,7 @@ * This is hand-massaged output from the original memcpy.c. We defer to * memcpy whenever possible; the backwards copy loops are not unrolled. */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -179,3 +179,4 @@ $egress: nop .end memmove + EXPORT_SYMBOL(memmove)
arch/alpha/lib/memset.S +6 -1
@@ -13,7 +13,7 @@ * The scheduling comments are according to the EV5 documentation (and done by * hand, so they might well be incorrect, please do tell me about it..) */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -106,6 +106,8 @@ within_one_quad: end: ret $31,($26),1 /* E1 */ .end ___memset +EXPORT_SYMBOL(___memset) +EXPORT_SYMBOL(__constant_c_memset) .align 5 .ent __memsetw
@@ -122,6 +124,9 @@ __memsetw: br __constant_c_memset /* .. E1 */ .end __memsetw +EXPORT_SYMBOL(__memsetw) memset = ___memset __memset = ___memset + EXPORT_SYMBOL(memset) + EXPORT_SYMBOL(__memset)
arch/alpha/lib/strcat.S +2 -0
@@ -4,6 +4,7 @@ * * Append a null-terminated string from SRC to DST. */ +#include <asm/export.h> .text
@@ -50,3 +51,4 @@ $found: negq $2, $3 # clear all but least set bit br __stxcpy .end strcat +EXPORT_SYMBOL(strcat);
arch/alpha/lib/strchr.S +2 -1
@@ -5,7 +5,7 @@ * Return the address of a given character within a null-terminated * string, or null if it is not found. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -68,3 +68,4 @@ $retnull: ret # .. e1 : .end strchr + EXPORT_SYMBOL(strchr)
arch/alpha/lib/strcpy.S +2 -1
@@ -5,7 +5,7 @@ * Copy a null-terminated string from SRC to DST. Return a pointer * to the null-terminator in the source. */ - +#include <asm/export.h> .text .align 3
@@ -21,3 +21,4 @@ strcpy: br __stxcpy # do the copy .end strcpy + EXPORT_SYMBOL(strcpy)
arch/alpha/lib/strlen.S +2 -1
@@ -11,7 +11,7 @@ * do this instead of the 9 instructions that * binary search needs). */ - +#include <asm/export.h> .set noreorder .set noat
@@ -55,3 +55,4 @@ done: subq $0, $16, $0 ret $31, ($26) .end strlen + EXPORT_SYMBOL(strlen)
arch/alpha/lib/strncat.S +2 -1
@@ -9,7 +9,7 @@ * past count, whereas libc may write to count+1. This follows the generic * implementation in lib/string.c and is, IMHO, more sensible. */ - +#include <asm/export.h> .text .align 3
@@ -82,3 +82,4 @@ $zerocount: ret .end strncat + EXPORT_SYMBOL(strncat)
arch/alpha/lib/strncpy.S +2 -1
@@ -10,7 +10,7 @@ * version has cropped that bit o' nastiness as well as assuming that * __stxncpy is in range of a branch. */ - +#include <asm/export.h> .set noat .set noreorder
@@ -79,3 +79,4 @@ $zerolen: ret .end strncpy + EXPORT_SYMBOL(strncpy)
arch/alpha/lib/strrchr.S +2 -1
@@ -5,7 +5,7 @@ * Return the address of the last occurrence of a given character * within a null-terminated string, or null if it is not found. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -85,3 +85,4 @@ $retnull: ret # .. e1 : .end strrchr + EXPORT_SYMBOL(strrchr)
Signature · 1 line
2.1.4
PATCH 5/12 m68k: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
the rest of architectures should just use generic-y += export.h in asm/Kbuild
--- arch/m68k/include/asm/export.h | 3 +++ arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/m68k_ksyms.c | 32 -------------------------------- arch/m68k/lib/ashldi3.c | 4 ++++ arch/m68k/lib/ashrdi3.c | 4 ++++ arch/m68k/lib/divsi3.S | 3 +++ arch/m68k/lib/lshrdi3.c | 4 ++++ arch/m68k/lib/modsi3.S | 3 +++ arch/m68k/lib/muldi3.c | 4 ++++ arch/m68k/lib/mulsi3.S | 4 ++-- arch/m68k/lib/udivsi3.S | 4 ++-- arch/m68k/lib/umodsi3.S | 4 ++-- 12 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 arch/m68k/include/asm/export.h delete mode 100644 arch/m68k/kernel/m68k_ksyms.c
arch/m68k/include/asm/export.h new file +3 -0
@@ -0,0 +1,3 @@ +#define KSYM_ALIGN 2 +#define KCRC_ALIGN 2 +#include <asm-generic/export.h>
arch/m68k/kernel/Makefile +1 -1
@@ -13,7 +13,7 @@ extra-$(CONFIG_SUN3X) := head.o extra-$(CONFIG_SUN3) := sun3-head.o extra-y += vmlinux.lds -obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o +obj-y := entry.o irq.o module.o process.o ptrace.o obj-y += setup.o signal.o sys_m68k.o syscalltable.o time.o traps.o obj-$(CONFIG_MMU_MOTOROLA) += ints.o vectors.o
arch/m68k/kernel/m68k_ksyms.c deleted +0 -32
@@ -1,32 +0,0 @@ -#include <linux/module.h> - -asmlinkage long long __ashldi3 (long long ,int ); -asmlinkage long long __ashrdi3 (long long ,int ); -asmlinkage long long __lshrdi3 (long long ,int ); -asmlinkage long long __muldi3 (long long ,long long ); - -/* The following are special because they're not called -explicitly (the C compiler generates them). Fortunately, -their interface isn't gonna change any time soon now, so -it's OK to leave it out of version control. */ -EXPORT_SYMBOL (__ashldi3); -EXPORT_SYMBOL (__ashrdi3); -EXPORT_SYMBOL (__lshrdi3); -EXPORT_SYMBOL (__muldi3); - -#if defined(CONFIG_CPU_HAS_NO_MULDIV64 ) -/* -* Simpler 68k and ColdFire parts also need a few other gcc functions. -*/ -extern long long __divsi3 (long long ,long long ); -extern long long __modsi3 (long long ,long long ); -extern long long __mulsi3 (long long ,long long ); -extern long long __udivsi3 (long long ,long long ); -extern long long __umodsi3 (long long ,long long ); - -EXPORT_SYMBOL (__divsi3); -EXPORT_SYMBOL (__modsi3); -EXPORT_SYMBOL (__mulsi3); -EXPORT_SYMBOL (__udivsi3); -EXPORT_SYMBOL (__umodsi3); -#endif
arch/m68k/lib/ashldi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -55,3 +58,4 @@ __ashldi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__ashldi3);
arch/m68k/lib/ashrdi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -56,3 +59,4 @@ __ashrdi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__ashrdi3);
arch/m68k/lib/divsi3.S +3 -0
@@ -33,6 +33,8 @@ General Public License for more details. */ D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ +#include <asm/export.h> + /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -118,3 +120,4 @@ L2: movel d1, sp@- L3: movel sp@+, d2 rts + EXPORT_SYMBOL(__divsi3)
arch/m68k/lib/lshrdi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -55,3 +58,4 @@ __lshrdi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__lshrdi3);
arch/m68k/lib/modsi3.S +3 -0
@@ -33,6 +33,8 @@ General Public License for more details. */ D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ +#include <asm/export.h> + /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -106,3 +108,4 @@ SYM (__modsi3): movel d1, d0 rts + EXPORT_SYMBOL(__modsi3)
arch/m68k/lib/muldi3.c +4 -0
@@ -14,6 +14,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#ifdef CONFIG_CPU_HAS_NO_MULDIV64 #define SI_TYPE_SIZE 32
@@ -90,3 +93,4 @@ __muldi3 (DItype u, DItype v)return w.ll; } +EXPORT_SYMBOL (__muldi3);
arch/m68k/lib/mulsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -102,4 +102,4 @@ SYM (__mulsi3): addl d1, d0 rts - + EXPORT_SYMBOL(__mulsi3)
arch/m68k/lib/udivsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -154,4 +154,4 @@ L2: subql IMM (1),d4 unlk a6 | and return rts #endif /* __mcf5200__ || __mcoldfire__ */ - + EXPORT_SYMBOL(__udivsi3)
arch/m68k/lib/umodsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -105,4 +105,4 @@ SYM (__umodsi3): subl d0, d1 /* d1 = a - (a/b)*b */ movel d1, d0 rts - + EXPORT_SYMBOL(__umodsi3)
Signature · 1 line
2.1.4
Re: [PATCH 05/12] m68k: move exports to definitions
Hi Al,
Quoted 6 lines · Al Viro
From: Al Viro <[email protected]>
the rest of architectures should just use generic-y +=
export.hin asm/KbuildSigned-off-by Al Viro <[email protected]>
Looks good, and (some of, not all) the symbols end up in kstrtab, so
Note that none of the m68k defconfigs build modules that refer to these symbols. This changes completely with allmodconfig, which adds lots of references in many of the same modules.CONFIG_LBDAF=y is set in the defconfigs.
Unfortunately I haven't managed to boot a kernel that uses these symbols in modules...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 05/12] m68k: move exports to definitions
Quoted 14 lines · Geert Uytterhoeven
Hi Al,
Quoted 6 lines · Al Viro
From: Al Viro <[email protected]>
the rest of architectures should just use generic-y +=
export.hin asm/KbuildSigned-off-by Al Viro <[email protected]>Looks good, and (some of, not all) the symbols end up in kstrtab, so
Quoted 7 lines
Note that none of the m68k defconfigs build modules that refer to these symbols. This changes completely with allmodconfig, which adds lots of references in many of the same modules.
CONFIG_LBDAF=yis set in the defconfigs.Unfortunately I haven't managed to boot a kernel that uses these symbols in modules...
Details, please... Which symbols are missing?
Geert Uytterhoeven
maintainerRe: [PATCH 05/12] m68k: move exports to definitions
Hi Al,
Quoted 18 lines · Al Viro
Quoted 17 lines · Geert Uytterhoeven
Quoted 6 lines · Al Viro
From: Al Viro <[email protected]>
the rest of architectures should just use generic-y +=
export.hin asm/KbuildSigned-off-by Al Viro <[email protected]>Looks good, and (some of, not all) the symbols end up in kstrtab, so
Note that none of the m68k defconfigs build modules that refer to these symbols. This changes completely with allmodconfig, which adds lots of references in many of the same modules.
CONFIG_LBDAF=yis set in the defconfigs.
Quoted 4 lines
Quoted 2 lines
Unfortunately I haven't managed to boot a kernel that uses these symbols in modules...
Details, please... Which symbols are missing?
The kernel has all the *di3 variants:
002eae2c T __ashldi3002eae70 T __ashrdi3002eaebc T __lshrdi3002eaf00 T __muldi30038a6d0 R __ksymtab___ashldi30038a6d8 R __ksymtab___ashrdi30038ab68 R __ksymtab___lshrdi30038ab90 R __ksymtab___muldi3003a8a5a r __kstrtab___ashldi3003a8a64 r __kstrtab___ashrdi3003a8a6e r __kstrtab___lshrdi3003a8a78 r __kstrtab___muldi3
Hence the *si3 are missing:
__divsi3__modsi3__mulsi3__udivsi3__umodsi3
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 05/12] m68k: move exports to definitions
Quoted 15 lines · Geert Uytterhoeven
The kernel has all the *di3 variants:
002eae2cT__ashldi3002eae70T__ashrdi3002eaebcT__lshrdi3002eaf00T__muldi30038a6d0R__ksymtab___ashldi30038a6d8R__ksymtab___ashrdi30038ab68R__ksymtab___lshrdi30038ab90R__ksymtab___muldi3003a8a5ar__kstrtab___ashldi3003a8a64r__kstrtab___ashrdi3003a8a6er__kstrtab___lshrdi3003a8a78r__kstrtab___muldi3
Quoted 7 lines
Hence the *si3 are missing:
__divsi3__modsi3__mulsi3__udivsi3__umodsi3
Does your .config have CPU_HAS_NO_MULDIV64? Because otherwise these objects won't be built and their exports had been conditional on that as well:
#if defined(CONFIG_CPU_HAS_NO_MULDIV64)
/*
* Simpler 68k and ColdFire parts also need a few other gcc functions. */
extern long long __divsi3(long long, long long);
extern long long __modsi3(long long, long long);
extern long long __mulsi3(long long, long long);
extern long long __udivsi3(long long, long long);
extern long long __umodsi3(long long, long long);
EXPORT_SYMBOL(__divsi3);EXPORT_SYMBOL(__modsi3);EXPORT_SYMBOL(__mulsi3);EXPORT_SYMBOL(__udivsi3);EXPORT_SYMBOL(__umodsi3);
#endif
is what we have in mainline m68k_ksyms.c. Neither allmodconfig, nor any of defconfigs have it. And on a coldfire build they are built and exported as expected:
$ grep si3 ../build/coldfire/System.map 002be860 T __divsi3 002be890 T __modsi3 002be8b8 T __mulsi3 002be8dc T __udivsi3 002be90c T __umodsi3 003ed960 R __ksymtab___divsi3 003edc80 R __ksymtab___modsi3 003edca8 R __ksymtab___mulsi3 003edff8 R __ksymtab___udivsi3 003ee000 R __ksymtab___umodsi3 003f7ba4 r __kcrctab___divsi3 003f7d34 r __kcrctab___modsi3 003f7d48 r __kcrctab___mulsi3 003f7ef0 r __kcrctab___udivsi3 003f7ef4 r __kcrctab___umodsi3 004144fe r __kstrtab___divsi3 00414507 r __kstrtab___modsi3 00414510 r __kstrtab___mulsi3 00414519 r __kstrtab___udivsi3 00414523 r __kstrtab___umodsi3
Geert Uytterhoeven
maintainerRe: [PATCH 05/12] m68k: move exports to definitions
Hi Al,
Quoted 37 lines · Al Viro
Quoted 15 lines · Geert Uytterhoeven
The kernel has all the *di3 variants:
002eae2cT__ashldi3002eae70T__ashrdi3002eaebcT__lshrdi3002eaf00T__muldi30038a6d0R__ksymtab___ashldi30038a6d8R__ksymtab___ashrdi30038ab68R__ksymtab___lshrdi30038ab90R__ksymtab___muldi3003a8a5ar__kstrtab___ashldi3003a8a64r__kstrtab___ashrdi3003a8a6er__kstrtab___lshrdi3003a8a78r__kstrtab___muldi3Quoted 7 lines
Hence the *si3 are missing:
__divsi3__modsi3__mulsi3__udivsi3__umodsi3Does your .config have
CPU_HAS_NO_MULDIV64? Because otherwise these objects won't be built and their exports had been conditional on that as well:#if
defined(CONFIG_CPU_HAS_NO_MULDIV64)
/*
* Simpler 68k and ColdFire parts also need a few other gcc functions. */
extern long long__divsi3(long long, long long);
extern long long__modsi3(long long, long long);
extern long long__mulsi3(long long, long long);
extern long long__udivsi3(long long, long long);
extern long long__umodsi3(long long, long long);
Quoted 6 lines
EXPORT_SYMBOL(__divsi3);EXPORT_SYMBOL(__modsi3);EXPORT_SYMBOL(__mulsi3);EXPORT_SYMBOL(__udivsi3);EXPORT_SYMBOL(__umodsi3);
#endif
Oh, I hadn't actually noticed that dependency.
No, CPU_HAS_NO_MULDIV64 is not set, as I handle the parts with MMU only.
Quoted 3 lines
is what we have in mainline
m68k_ksyms.c. Neither allmodconfig, nor any of defconfigs have it. And on a coldfire build they are built and exported as expected:
[...]
Then I assume everything is OK. Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH 6/12 s390: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++++++ arch/s390/kernel/mcount.S | 3 +++ arch/s390/kernel/s390_ksyms.c | 15 --------------- arch/s390/lib/mem.S | 3 +++ 6 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 arch/s390/kernel/s390_ksyms.c
arch/s390/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ generic-y += clkdev.h +generic-y += export.h generic-y += irq_work.h generic-y += mcs_spinlock.h generic-y += mm-arch-hooks.h
arch/s390/kernel/Makefile +1 -1
@@ -50,7 +50,7 @@ obj-y += entry.o reipl.o relocate_kernel.o extra-y += head.o head64.o vmlinux.lds -obj-$(CONFIG_MODULES) += s390_ksyms.o module.o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o obj-$(CONFIG_HIBERNATION) += suspend.o swsusp.o
arch/s390/kernel/entry.S +6 -0
@@ -23,6 +23,7 @@ #include <asm/vx-insn.h> #include <asm/setup.h> #include <asm/nmi.h> +#include <asm/export.h> __PT_R0 = __PT_GPRS __PT_R1 = __PT_GPRS + 8
@@ -249,6 +250,8 @@ sie_exit: EX_TABLE(.Lrewind_pad,.Lsie_fault) EX_TABLE(sie_exit,.Lsie_fault) +EXPORT_SYMBOL(sie64a) +EXPORT_SYMBOL(sie_exit) #endif /*
@@ -815,6 +818,9 @@ ENTRY(save_fpu_regs) oi __LC_CPU_FLAGS+7,_CIF_FPU br %r14 .Lsave_fpu_regs_end: +#if IS_ENABLED(CONFIG_KVM) +EXPORT_SYMBOL(save_fpu_regs) +#endif /* * Load floating-point controls and floating-point or vector registers.
arch/s390/kernel/mcount.S +3 -0
@@ -9,6 +9,7 @@ #include <asm/asm-offsets.h> #include <asm/ftrace.h> #include <asm/ptrace.h> +#include <asm/export.h> .section .kprobes.text, "ax"
@@ -23,6 +24,8 @@ ENTRY(ftrace_stub) ENTRY(_mcount) br %r14 +EXPORT_SYMBOL(_mcount) + ENTRY(ftrace_caller) .globl ftrace_regs_caller .set ftrace_regs_caller,ftrace_caller
arch/s390/kernel/s390_ksyms.c deleted +0 -15
@@ -1,15 +0,0 @@ -#include <linux/module.h> -#include <linux/kvm_host.h> -#include <asm/fpu/api.h> -#include <asm/ftrace.h> - -#ifdef CONFIG_FUNCTION_TRACER -EXPORT_SYMBOL (_mcount); -#endif -#if IS_ENABLED (CONFIG_KVM ) -EXPORT_SYMBOL (sie64a); -EXPORT_SYMBOL (sie_exit); -EXPORT_SYMBOL (save_fpu_regs); -#endif -EXPORT_SYMBOL (memcpy); -EXPORT_SYMBOL (memset);
arch/s390/lib/mem.S +3 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> /* * memset implementation
@@ -60,6 +61,7 @@ ENTRY(memset) xc 0(1,%r1),0(%r1) .Lmemset_mvc: mvc 1(1,%r1),0(%r1) +EXPORT_SYMBOL(memset) /* * memcpy implementation
@@ -86,3 +88,4 @@ ENTRY(memcpy) j .Lmemcpy_rest .Lmemcpy_mvc: mvc 0(1,%r1),0(%r3) +EXPORT_SYMBOL(memcpy)
Signature · 1 line
2.1.4
Re: [PATCH 06/12] s390: move exports to definitions
Quoted 12 lines · Al Viro
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>--- arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++++++ arch/s390/kernel/mcount.S | 3 +++ arch/s390/kernel/s390_ksyms.c | 15 --------------- arch/s390/lib/mem.S | 3 +++ 6 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 arch/s390/kernel/s390_ksyms.c
PATCH 7/12 arm: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/arm/include/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ---------------------------------- arch/arm/kernel/entry-ftrace.S | 3 + arch/arm/kernel/head.S | 3 + arch/arm/kernel/smccc-call.S | 3 + arch/arm/lib/ashldi3.S | 3 + arch/arm/lib/ashrdi3.S | 3 + arch/arm/lib/bitops.h | 5 + arch/arm/lib/bswapsdi2.S | 3 + arch/arm/lib/clear_user.S | 4 + arch/arm/lib/copy_from_user.S | 2 + arch/arm/lib/copy_page.S | 2 + arch/arm/lib/copy_to_user.S | 4 + arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 + arch/arm/lib/csumpartialcopy.S | 1 + arch/arm/lib/csumpartialcopygeneric.S | 2 + arch/arm/lib/csumpartialcopyuser.S | 1 + arch/arm/lib/delay.c | 2 + arch/arm/lib/div64.S | 2 + arch/arm/lib/findbit.S | 9 ++ arch/arm/lib/getuser.S | 9 ++ arch/arm/lib/io-readsb.S | 2 + arch/arm/lib/io-readsl.S | 2 + arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 + arch/arm/lib/io-writesb.S | 2 + arch/arm/lib/io-writesl.S | 2 + arch/arm/lib/io-writesw-armv3.S | 2 + arch/arm/lib/io-writesw-armv4.S | 2 + arch/arm/lib/lib1funcs.S | 9 ++ arch/arm/lib/lshrdi3.S | 3 + arch/arm/lib/memchr.S | 2 + arch/arm/lib/memcpy.S | 3 + arch/arm/lib/memmove.S | 2 + arch/arm/lib/memset.S | 3 + arch/arm/lib/memzero.S | 2 + arch/arm/lib/muldi3.S | 3 + arch/arm/lib/putuser.S | 5 + arch/arm/lib/strchr.S | 2 + arch/arm/lib/strrchr.S | 2 + arch/arm/lib/uaccess_with_memcpy.c | 3 + arch/arm/lib/ucmpdi2.S | 3 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ---- arch/arm/mach-imx/ssi-fiq.S | 7 +- 47 files changed, 131 insertions(+), 208 deletions(-) delete mode 100644 arch/arm/kernel/armksyms.c delete mode 100644 arch/arm/mach-imx/ssi-fiq-ksym.c
arch/arm/include/asm/Kbuild +1 -0
@@ -7,6 +7,7 @@ generic-y += early_ioremap.h generic-y += emergency-restart.h generic-y += errno.h generic-y += exec.h +generic-y += export.h generic-y += ioctl.h generic-y += ipcbuf.h generic-y += irq_regs.h
arch/arm/kernel/Makefile +1 -1
@@ -33,7 +33,7 @@ endif obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ISA_DMA_API) += dma.o obj-$(CONFIG_FIQ) += fiq.o fiqasm.o -obj-$(CONFIG_MODULES) += armksyms.o module.o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_ARM_MODULE_PLTS) += module-plts.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o
arch/arm/kernel/armksyms.c deleted +0 -183
183 lines not on this page · raw message
arch/arm/kernel/entry-ftrace.S +3 -0
@@ -7,6 +7,7 @@ #include <asm/assembler.h> #include <asm/ftrace.h> #include <asm/unwind.h> +#include <asm/export.h> #include "entry-header.S"
@@ -153,6 +154,7 @@ ENTRY(mcount) __mcount _old #endif ENDPROC(mcount) +EXPORT_SYMBOL(mcount) #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(ftrace_caller_old)
@@ -205,6 +207,7 @@ UNWIND(.fnstart) #endif UNWIND(.fnend) ENDPROC(__gnu_mcount_nc) +EXPORT_SYMBOL(__gnu_mcount_nc) #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(ftrace_caller)
arch/arm/kernel/head.S +3 -0
@@ -22,6 +22,7 @@ #include <asm/memory.h> #include <asm/thread_info.h> #include <asm/pgtable.h> +#include <asm/export.h> #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_SEMIHOSTING) #include CONFIG_DEBUG_LL_INCLUDE
@@ -727,6 +728,8 @@ __pv_phys_pfn_offset: __pv_offset: .quad 0 .size __pv_offset, . -__pv_offset +EXPORT_SYMBOL(__pv_phys_pfn_offset) +EXPORT_SYMBOL(__pv_offset) #endif #include "head-common.S"
arch/arm/kernel/smccc-call.S +3 -0
@@ -16,6 +16,7 @@ #include <asm/opcodes-sec.h> #include <asm/opcodes-virt.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Wrap c macros in asm macros to delay expansion until after the
@@ -51,6 +52,7 @@ UNWIND( .fnend) ENTRY(arm_smccc_smc) SMCCC SMCCC_SMC ENDPROC(arm_smccc_smc) +EXPORT_SYMBOL(arm_smccc_smc) /* * void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
@@ -60,3 +62,4 @@ ENDPROC(arm_smccc_smc) ENTRY(arm_smccc_hvc) SMCCC SMCCC_HVC ENDPROC(arm_smccc_hvc) +EXPORT_SYMBOL(arm_smccc_hvc)
arch/arm/lib/ashldi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_llsl) ENDPROC(__ashldi3) ENDPROC(__aeabi_llsl) +EXPORT_SYMBOL(__ashldi3) +EXPORT_SYMBOL(__aeabi_llsl)
arch/arm/lib/ashrdi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_lasr) ENDPROC(__ashrdi3) ENDPROC(__aeabi_lasr) +EXPORT_SYMBOL(__ashrdi3) +EXPORT_SYMBOL(__aeabi_lasr)
arch/arm/lib/bitops.h +5 -0
@@ -1,5 +1,6 @@#include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #if __LINUX_ARM_ARCH__ >=6 .macro bitop, name, instr
@@ -25,6 +26,7 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm .macro testop, name, instr, store
@@ -55,6 +57,7 @@ UNWIND( .fnstart ) 2: bx lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm #else .macro bitop, name, instr
@@ -74,6 +77,7 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm/**
@@ -102,5 +106,6 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm#endif
arch/arm/lib/bswapsdi2.S +3 -0
@@ -1,5 +1,6 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #if __LINUX_ARM_ARCH__ >= 6 ENTRY(__bswapsi2)
@@ -35,3 +36,5 @@ ENTRY(__bswapdi2) ret lr ENDPROC(__bswapdi2) #endif +EXPORT_SYMBOL(__bswapsi2) +EXPORT_SYMBOL(__bswapdi2)
arch/arm/lib/clear_user.S +4 -0
@@ -10,6 +10,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text
@@ -50,6 +51,9 @@ USER( strnebt r2, [r0]) UNWIND(.fnend) ENDPROC(arm_clear_user) ENDPROC(__clear_user_std) +#ifndef CONFIG_UACCESS_WITH_MEMCPY +EXPORT_SYMBOL(arm_clear_user) +#endif .pushsection .text.fixup,"ax" .align 0
arch/arm/lib/copy_from_user.S +2 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Prototype:
@@ -94,6 +95,7 @@ ENTRY(arm_copy_from_user) #include "copy_template.S" ENDPROC(arm_copy_from_user) +EXPORT_SYMBOL(arm_copy_from_user) .pushsection .fixup,"ax" .align 0
arch/arm/lib/copy_page.S +2 -0
@@ -13,6 +13,7 @@ #include <asm/assembler.h> #include <asm/asm-offsets.h> #include <asm/cache.h> +#include <asm/export.h> #define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))
@@ -45,3 +46,4 @@ ENTRY(copy_page) PLD( beq 2b ) ldmfd sp!, {r4, pc} @ 3 ENDPROC(copy_page) +EXPORT_SYMBOL(copy_page)
arch/arm/lib/copy_to_user.S +4 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Prototype:
@@ -99,6 +100,9 @@ WEAK(arm_copy_to_user) ENDPROC(arm_copy_to_user) ENDPROC(__copy_to_user_std) +#ifndef CONFIG_UACCESS_WITH_MEMCPY +EXPORT_SYMBOL(arm_copy_to_user) +#endif .pushsection .text.fixup,"ax" .align 0
arch/arm/lib/csumipv6.S +2 -1
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text
@@ -30,4 +31,4 @@ ENTRY(__csum_ipv6_magic) adcs r0, r0, #0 ldmfd sp!, {pc} ENDPROC(__csum_ipv6_magic) - +EXPORT_SYMBOL(__csum_ipv6_magic)
arch/arm/lib/csumpartial.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text
@@ -140,3 +141,4 @@ ENTRY(csum_partial) bne 4b b .Lless4 ENDPROC(csum_partial) +EXPORT_SYMBOL(csum_partial)
arch/arm/lib/csumpartialcopy.S +1 -0
@@ -49,5 +49,6 @@ #define FN_ENTRY ENTRY(csum_partial_copy_nocheck) #define FN_EXIT ENDPROC(csum_partial_copy_nocheck) +#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_nocheck) #include "csumpartialcopygeneric.S"
arch/arm/lib/csumpartialcopygeneric.S +2 -0
@@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ #include <asm/assembler.h> +#include <asm/export.h> /* * unsigned int
@@ -331,3 +332,4 @@ FN_ENTRY mov r5, r4, get_byte_1 b .Lexit FN_EXIT +FN_EXPORT
arch/arm/lib/csumpartialcopyuser.S +1 -0
@@ -73,6 +73,7 @@ #define FN_ENTRY ENTRY(csum_partial_copy_from_user) #define FN_EXIT ENDPROC(csum_partial_copy_from_user) +#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_from_user) #include "csumpartialcopygeneric.S"
arch/arm/lib/delay.c +2 -0
@@ -24,6 +24,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/export.h> #include <linux/timex.h> /*
@@ -34,6 +35,7 @@ struct arm_delay_ops arm_delay_ops = { .const_udelay = __loop_const_udelay, .udelay = __loop_udelay, }; +EXPORT_SYMBOL (arm_delay_ops);static const struct delay_timer *delay_timer;static bool delay_calibrated;
arch/arm/lib/div64.S +2 -0
@@ -15,6 +15,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -210,3 +211,4 @@ Ldiv0_64: UNWIND(.fnend) ENDPROC(__do_div64) +EXPORT_SYMBOL(__do_div64)
arch/arm/lib/findbit.S +9 -0
@@ -15,6 +15,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text /*
@@ -37,6 +38,7 @@ ENTRY(_find_first_zero_bit_le) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_zero_bit_le) +EXPORT_SYMBOL(_find_first_zero_bit_le) /* * Purpose : Find next 'zero' bit
@@ -57,6 +59,7 @@ ENTRY(_find_next_zero_bit_le) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_zero_bit_le) +EXPORT_SYMBOL(_find_next_zero_bit_le) /* * Purpose : Find a 'one' bit
@@ -78,6 +81,7 @@ ENTRY(_find_first_bit_le) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_bit_le) +EXPORT_SYMBOL(_find_first_bit_le) /* * Purpose : Find next 'one' bit
@@ -97,6 +101,7 @@ ENTRY(_find_next_bit_le) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_bit_le) +EXPORT_SYMBOL(_find_next_bit_le) #ifdef __ARMEB__
@@ -116,6 +121,7 @@ ENTRY(_find_first_zero_bit_be) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_zero_bit_be) +EXPORT_SYMBOL(_find_first_zero_bit_be) ENTRY(_find_next_zero_bit_be) teq r1, #0
@@ -133,6 +139,7 @@ ENTRY(_find_next_zero_bit_be) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_zero_bit_be) +EXPORT_SYMBOL(_find_next_zero_bit_be) ENTRY(_find_first_bit_be) teq r1, #0
@@ -150,6 +157,7 @@ ENTRY(_find_first_bit_be) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_bit_be) +EXPORT_SYMBOL(_find_first_bit_be) ENTRY(_find_next_bit_be) teq r1, #0
@@ -166,6 +174,7 @@ ENTRY(_find_next_bit_be) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_bit_be) +EXPORT_SYMBOL(_find_next_bit_be) #endif
arch/arm/lib/getuser.S +9 -0
@@ -31,6 +31,7 @@ #include <asm/assembler.h> #include <asm/errno.h> #include <asm/domain.h> +#include <asm/export.h> ENTRY(__get_user_1) check_uaccess r0, 1, r1, r2, __get_user_bad
@@ -38,6 +39,7 @@ ENTRY(__get_user_1) mov r0, #0 ret lr ENDPROC(__get_user_1) +EXPORT_SYMBOL(__get_user_1) ENTRY(__get_user_2) check_uaccess r0, 2, r1, r2, __get_user_bad
@@ -58,6 +60,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_2) +EXPORT_SYMBOL(__get_user_2) ENTRY(__get_user_4) check_uaccess r0, 4, r1, r2, __get_user_bad
@@ -65,6 +68,7 @@ ENTRY(__get_user_4) mov r0, #0 ret lr ENDPROC(__get_user_4) +EXPORT_SYMBOL(__get_user_4) ENTRY(__get_user_8) check_uaccess r0, 8, r1, r2, __get_user_bad
@@ -78,6 +82,7 @@ ENTRY(__get_user_8) mov r0, #0 ret lr ENDPROC(__get_user_8) +EXPORT_SYMBOL(__get_user_8) #ifdef __ARMEB__ ENTRY(__get_user_32t_8)
@@ -91,6 +96,7 @@ ENTRY(__get_user_32t_8) mov r0, #0 ret lr ENDPROC(__get_user_32t_8) +EXPORT_SYMBOL(__get_user_32t_8) ENTRY(__get_user_64t_1) check_uaccess r0, 1, r1, r2, __get_user_bad8
@@ -98,6 +104,7 @@ ENTRY(__get_user_64t_1) mov r0, #0 ret lr ENDPROC(__get_user_64t_1) +EXPORT_SYMBOL(__get_user_64t_1) ENTRY(__get_user_64t_2) check_uaccess r0, 2, r1, r2, __get_user_bad8
@@ -114,6 +121,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_64t_2) +EXPORT_SYMBOL(__get_user_64t_2) ENTRY(__get_user_64t_4) check_uaccess r0, 4, r1, r2, __get_user_bad8
@@ -121,6 +129,7 @@ ENTRY(__get_user_64t_4) mov r0, #0 ret lr ENDPROC(__get_user_64t_4) +EXPORT_SYMBOL(__get_user_64t_4) #endif __get_user_bad8:
arch/arm/lib/io-readsb.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Linsb_align: rsb ip, ip, #4 cmp ip, r2
@@ -121,3 +122,4 @@ ENTRY(__raw_readsb) ldmfd sp!, {r4 - r6, pc} ENDPROC(__raw_readsb) +EXPORT_SYMBOL(__raw_readsb)
arch/arm/lib/io-readsl.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> ENTRY(__raw_readsl) teq r2, #0 @ do we have to check for the zero len?
@@ -77,3 +78,4 @@ ENTRY(__raw_readsl) strb r3, [r1, #0] ret lr ENDPROC(__raw_readsl) +EXPORT_SYMBOL(__raw_readsl)
arch/arm/lib/io-readsw-armv3.S +2 -1
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Linsw_bad_alignment: adr r0, .Linsw_bad_align_msg
@@ -103,4 +104,4 @@ ENTRY(__raw_readsw) ldmfd sp!, {r4, r5, r6, pc} - +EXPORT_SYMBOL(__raw_readsw)
arch/arm/lib/io-readsw-armv4.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro pack, rd, hw1, hw2 #ifndef __ARMEB__
@@ -129,3 +130,4 @@ ENTRY(__raw_readsw) strneb ip, [r1] ldmfd sp!, {r4, pc} ENDPROC(__raw_readsw) +EXPORT_SYMBOL(__raw_readsw)
arch/arm/lib/io-writesb.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro outword, rd #ifndef __ARMEB__
@@ -92,3 +93,4 @@ ENTRY(__raw_writesb) ldmfd sp!, {r4, r5, pc} ENDPROC(__raw_writesb) +EXPORT_SYMBOL(__raw_writesb)
arch/arm/lib/io-writesl.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> ENTRY(__raw_writesl) teq r2, #0 @ do we have to check for the zero len?
@@ -65,3 +66,4 @@ ENTRY(__raw_writesl) bne 6b ret lr ENDPROC(__raw_writesl) +EXPORT_SYMBOL(__raw_writesl)
arch/arm/lib/io-writesw-armv3.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Loutsw_bad_alignment: adr r0, .Loutsw_bad_align_msg
@@ -124,3 +125,4 @@ ENTRY(__raw_writesw) strne ip, [r0] ldmfd sp!, {r4, r5, r6, pc} +EXPORT_SYMBOL(__raw_writesw)
arch/arm/lib/io-writesw-armv4.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro outword, rd #ifndef __ARMEB__
@@ -98,3 +99,4 @@ ENTRY(__raw_writesw) strneh ip, [r0] ret lr ENDPROC(__raw_writesw) +EXPORT_SYMBOL(__raw_writesw)
arch/arm/lib/lib1funcs.S +9 -0
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .macro ARM_DIV_BODY dividend, divisor, result, curbit
@@ -238,6 +239,8 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__udivsi3) ENDPROC(__aeabi_uidiv) +EXPORT_SYMBOL(__udivsi3) +EXPORT_SYMBOL(__aeabi_uidiv) ENTRY(__umodsi3) UNWIND(.fnstart)
@@ -256,6 +259,7 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__umodsi3) +EXPORT_SYMBOL(__umodsi3) #ifdef CONFIG_ARM_PATCH_IDIV .align 3
@@ -303,6 +307,8 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__divsi3) ENDPROC(__aeabi_idiv) +EXPORT_SYMBOL(__divsi3) +EXPORT_SYMBOL(__aeabi_idiv) ENTRY(__modsi3) UNWIND(.fnstart)
@@ -327,6 +333,7 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__modsi3) +EXPORT_SYMBOL(__modsi3) #ifdef CONFIG_AEABI
@@ -343,6 +350,7 @@ UNWIND(.save {r0, r1, ip, lr} ) UNWIND(.fnend) ENDPROC(__aeabi_uidivmod) +EXPORT_SYMBOL(__aeabi_uidivmod) ENTRY(__aeabi_idivmod) UNWIND(.fnstart)
@@ -356,6 +364,7 @@ UNWIND(.save {r0, r1, ip, lr} ) UNWIND(.fnend) ENDPROC(__aeabi_idivmod) +EXPORT_SYMBOL(__aeabi_idivmod) #endif
arch/arm/lib/lshrdi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_llsr) ENDPROC(__lshrdi3) ENDPROC(__aeabi_llsr) +EXPORT_SYMBOL(__lshrdi3) +EXPORT_SYMBOL(__aeabi_llsr)
arch/arm/lib/memchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -24,3 +25,4 @@ ENTRY(memchr) 2: movne r0, #0 ret lr ENDPROC(memchr) +EXPORT_SYMBOL(memchr)
arch/arm/lib/memcpy.S +3 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #define LDR1W_SHIFT 0 #define STR1W_SHIFT 0
@@ -68,3 +69,5 @@ ENTRY(memcpy) ENDPROC(memcpy) ENDPROC(mmiocpy) +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(mmiocpy)
arch/arm/lib/memmove.S +2 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text
@@ -225,3 +226,4 @@ ENTRY(memmove) 18: backward_copy_shift push=24 pull=8 ENDPROC(memmove) +EXPORT_SYMBOL(memmove)
arch/arm/lib/memset.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text .align 5
@@ -135,3 +136,5 @@ UNWIND( .fnstart ) UNWIND( .fnend ) ENDPROC(memset) ENDPROC(mmioset) +EXPORT_SYMBOL(memset) +EXPORT_SYMBOL(mmioset)
arch/arm/lib/memzero.S +2 -0
@@ -10,6 +10,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text .align 5
@@ -135,3 +136,4 @@ UNWIND( .fnstart ) ret lr @ 1 UNWIND( .fnend ) ENDPROC(__memzero) +EXPORT_SYMBOL(__memzero)
arch/arm/lib/muldi3.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -46,3 +47,5 @@ ENTRY(__aeabi_lmul) ENDPROC(__muldi3) ENDPROC(__aeabi_lmul) +EXPORT_SYMBOL(__muldi3) +EXPORT_SYMBOL(__aeabi_lmul)
arch/arm/lib/putuser.S +5 -0
@@ -31,6 +31,7 @@ #include <asm/assembler.h> #include <asm/errno.h> #include <asm/domain.h> +#include <asm/export.h> ENTRY(__put_user_1) check_uaccess r0, 1, r1, ip, __put_user_bad
@@ -38,6 +39,7 @@ ENTRY(__put_user_1) mov r0, #0 ret lr ENDPROC(__put_user_1) +EXPORT_SYMBOL(__put_user_1) ENTRY(__put_user_2) check_uaccess r0, 2, r1, ip, __put_user_bad
@@ -62,6 +64,7 @@ ENTRY(__put_user_2) mov r0, #0 ret lr ENDPROC(__put_user_2) +EXPORT_SYMBOL(__put_user_2) ENTRY(__put_user_4) check_uaccess r0, 4, r1, ip, __put_user_bad
@@ -69,6 +72,7 @@ ENTRY(__put_user_4) mov r0, #0 ret lr ENDPROC(__put_user_4) +EXPORT_SYMBOL(__put_user_4) ENTRY(__put_user_8) check_uaccess r0, 8, r1, ip, __put_user_bad
@@ -82,6 +86,7 @@ ENTRY(__put_user_8) mov r0, #0 ret lr ENDPROC(__put_user_8) +EXPORT_SYMBOL(__put_user_8) __put_user_bad: mov r0, #-EFAULT
arch/arm/lib/strchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -25,3 +26,4 @@ ENTRY(strchr) subeq r0, r0, #1 ret lr ENDPROC(strchr) +EXPORT_SYMBOL(strchr)
arch/arm/lib/strrchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -24,3 +25,4 @@ ENTRY(strrchr) mov r0, r3 ret lr ENDPROC(strrchr) +EXPORT_SYMBOL(strrchr)
arch/arm/lib/uaccess_with_memcpy.c +3 -0
@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/highmem.h> #include <linux/hugetlb.h> +#include <linux/export.h> #include <asm/current.h> #include <asm/page.h>
@@ -156,6 +157,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n) }return n; } +EXPORT_SYMBOL (arm_copy_to_user);static unsigned long noinline __clear_user_memset (void __user *addr,unsigned long n)
@@ -213,6 +215,7 @@ unsigned long arm_clear_user(void __user *addr, unsigned long n) }return n; } +EXPORT_SYMBOL (arm_clear_user);#if 0
arch/arm/lib/ucmpdi2.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -35,6 +36,7 @@ ENTRY(__ucmpdi2) ret lr ENDPROC(__ucmpdi2) +EXPORT_SYMBOL(__ucmpdi2) #ifdef CONFIG_AEABI
@@ -48,6 +50,7 @@ ENTRY(__aeabi_ulcmp) ret lr ENDPROC(__aeabi_ulcmp) +EXPORT_SYMBOL(__aeabi_ulcmp) #endif
arch/arm/mach-imx/Makefile +0 -1
@@ -32,7 +32,6 @@ endif ifdef CONFIG_SND_IMX_SOC obj-y += ssi-fiq.o -obj-y += ssi-fiq-ksym.o endif # i.MX1 based machines
arch/arm/mach-imx/ssi-fiq-ksym.c deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* Exported ksyms for the SSI FIQ handler -* -* Copyright (C) 2009, Sascha Hauer <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <linux/module.h> - -#include <linux/platform_data/asoc-imx-ssi.h> - -EXPORT_SYMBOL (imx_ssi_fiq_tx_buffer); -EXPORT_SYMBOL (imx_ssi_fiq_rx_buffer); -EXPORT_SYMBOL (imx_ssi_fiq_start); -EXPORT_SYMBOL (imx_ssi_fiq_end); -EXPORT_SYMBOL (imx_ssi_fiq_base); -
arch/arm/mach-imx/ssi-fiq.S +6 -1
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> /* * r8 = bit 0-15: tx offset, bit 16-31: tx buffer size
@@ -144,4 +145,8 @@ imx_ssi_fiq_tx_buffer: .word 0x0 .L_imx_ssi_fiq_end: imx_ssi_fiq_end: - +EXPORT_SYMBOL(imx_ssi_fiq_tx_buffer) +EXPORT_SYMBOL(imx_ssi_fiq_rx_buffer) +EXPORT_SYMBOL(imx_ssi_fiq_start) +EXPORT_SYMBOL(imx_ssi_fiq_end) +EXPORT_SYMBOL(imx_ssi_fiq_base)
Signature · 1 line
2.1.4
PATCH 8/12 ppc: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/kernel/Makefile | 4 --- arch/powerpc/kernel/entry_32.S | 2 ++ arch/powerpc/kernel/entry_64.S | 3 ++ arch/powerpc/kernel/epapr_hcalls.S | 2 ++ arch/powerpc/kernel/fpu.S | 3 ++ arch/powerpc/kernel/head_32.S | 5 +++ arch/powerpc/kernel/head_40x.S | 2 ++ arch/powerpc/kernel/head_44x.S | 2 ++ arch/powerpc/kernel/head_64.S | 2 ++ arch/powerpc/kernel/head_8xx.S | 2 ++ arch/powerpc/kernel/head_fsl_booke.S | 2 ++ arch/powerpc/kernel/misc.S | 2 ++ arch/powerpc/kernel/misc_32.S | 12 +++++++ arch/powerpc/kernel/misc_64.S | 4 +++ arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/pci_32.c | 2 ++ arch/powerpc/kernel/ppc_ksyms.c | 39 ----------------------- arch/powerpc/kernel/ppc_ksyms_32.c | 61 ------------------------------------ arch/powerpc/kernel/setup_32.c | 6 ++++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/kernel/vector.S | 4 +++ arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/checksum_32.S | 4 +++ arch/powerpc/lib/checksum_64.S | 4 +++ arch/powerpc/lib/copy_32.S | 5 +++ arch/powerpc/lib/copypage_64.S | 2 ++ arch/powerpc/lib/copyuser_64.S | 2 ++ arch/powerpc/lib/hweight_64.S | 5 +++ arch/powerpc/lib/mem_64.S | 3 ++ arch/powerpc/lib/memcmp_64.S | 2 ++ arch/powerpc/lib/memcpy_64.S | 2 ++ arch/powerpc/lib/ppc_ksyms.c | 35 --------------------- arch/powerpc/lib/string.S | 10 ++++++ arch/powerpc/lib/string_64.S | 2 ++ arch/powerpc/mm/hash_low_32.S | 3 ++ arch/powerpc/sysdev/dcr-low.S | 3 ++ 37 files changed, 106 insertions(+), 140 deletions(-) delete mode 100644 arch/powerpc/kernel/ppc_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms_32.c delete mode 100644 arch/powerpc/lib/ppc_ksyms.c
arch/powerpc/include/asm/Kbuild +1 -0
@@ -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
arch/powerpc/kernel/Makefile +0 -4
@@ -92,10 +92,6 @@ obj-$(CONFIG_RELOCATABLE_PPC32) += reloc_32.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
arch/powerpc/kernel/entry_32.S +2 -0
@@ -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.
@@ -1342,6 +1343,7 @@ _GLOBAL(_mcount) MCOUNT_RESTORE_FRAME bctr #endif +EXPORT_SYMBOL(_mcount) _GLOBAL(ftrace_stub) blr
arch/powerpc/kernel/entry_64.S +3 -0
@@ -36,6 +36,7 @@ #include <asm/hw_irq.h> #include <asm/context_tracking.h> #include <asm/tm.h> +#include <asm/export.h> /* * System calls.
@@ -1143,6 +1144,7 @@ _GLOBAL(enter_prom) #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) +EXPORT_SYMBOL(_mcount) blr _GLOBAL_TOC(ftrace_caller)
@@ -1170,6 +1172,7 @@ _GLOBAL(ftrace_stub) blr #else _GLOBAL_TOC(_mcount) +EXPORT_SYMBOL(_mcount) /* Taken from output of objdump from lib64/glibc */ mflr r3 ld r11, 0(r1)
arch/powerpc/kernel/epapr_hcalls.S +2 -0
@@ -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() */
@@ -53,3 +54,4 @@ epapr_hypercall_start: nop nop blr +EXPORT_SYMBOL(epapr_hypercall_start)
arch/powerpc/kernel/fpu.S +3 -0
@@ -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) \
@@ -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
@@ -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.
arch/powerpc/kernel/head_32.S +5 -0
@@ -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) \
@@ -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
@@ -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
@@ -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:
@@ -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.
arch/powerpc/kernel/head_40x.S +2 -0
@@ -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
@@ -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
arch/powerpc/kernel/head_44x.S +2 -0
@@ -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"
@@ -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.
arch/powerpc/kernel/head_64.S +2 -0
@@ -40,6 +40,7 @@ #include <asm/kvm_book3s_asm.h> #include <asm/ptrace.h> #include <asm/hw_irq.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
@@ -881,6 +882,7 @@ start_here_common: .globl empty_zero_page empty_zero_page: .space PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .globl swapper_pg_dir swapper_pg_dir:
arch/powerpc/kernel/head_8xx.S +2 -0
@@ -30,6 +30,7 @@ #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> #include <asm/ptrace.h> +#include <asm/export.h> /* Macro to make the code more readable. */ #ifdef CONFIG_8xx_CPU6
@@ -930,6 +931,7 @@ sdata: .align PAGE_SHIFT empty_zero_page: .space PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .globl swapper_pg_dir swapper_pg_dir:
arch/powerpc/kernel/head_fsl_booke.S +2 -0
@@ -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
@@ -1297,6 +1298,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
arch/powerpc/kernel/misc.S +2 -0
@@ -18,6 +18,7 @@ #include <asm/unistd.h> #include <asm/asm-compat.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .text
@@ -118,3 +119,4 @@ _GLOBAL(longjmp) _GLOBAL(current_stack_pointer) PPC_LL r3,0(r1) blr +EXPORT_SYMBOL(current_stack_pointer)
arch/powerpc/kernel/misc_32.S +12 -0
@@ -33,6 +33,7 @@ #include <asm/kexec.h> #include <asm/bug.h> #include <asm/ptrace.h> +#include <asm/export.h> .text
@@ -337,6 +338,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE) #endif /* CONFIG_8xx/4xx */ isync blr +EXPORT_SYMBOL(flush_instruction_cache) /* * Write any modified data cache blocks out to memory
@@ -376,6 +378,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) sync /* additional sync needed on g4 */ isync blr +EXPORT_SYMBOL(flush_icache_range) /* * Write any modified data cache blocks out to memory. * Does not invalidate the corresponding cache lines (especially for
@@ -418,6 +421,7 @@ _GLOBAL(flush_dcache_range) bdnz 1b sync /* wait for dcbst's to get to ram */ blr +EXPORT_SYMBOL(flush_dcache_range) /* * Like above, but invalidate the D-cache. This is used by the 8xx
@@ -549,6 +553,7 @@ _GLOBAL(clear_pages) stw r7,8(r3); \ stw r8,12(r3); \ stwu r9,16(r3) +EXPORT_SYMBOL(clear_pages) _GLOBAL(copy_page) addi r3,r3,-4
@@ -594,6 +599,7 @@ _GLOBAL(copy_page) li r0,MAX_COPY_PREFETCH li r11,4 b 2b +EXPORT_SYMBOL(copy_page) /* * Extended precision shifts.
@@ -621,6 +627,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
@@ -632,6 +639,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
@@ -643,6 +651,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)
@@ -658,6 +667,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.
@@ -672,6 +682,7 @@ _GLOBAL(__ucmpdi2) bltlr li r3,2 blr +EXPORT_SYMBOL(__ucmpdi2) _GLOBAL(__bswapdi2) rotlwi r9,r4,8
@@ -683,6 +694,7 @@ _GLOBAL(__bswapdi2) mr r3,r9 mr r4,r10 blr +EXPORT_SYMBOL(__bswapdi2) _GLOBAL(abs) srawi r4,r3,31
arch/powerpc/kernel/misc_64.S +4 -0
@@ -27,6 +27,7 @@ #include <asm/kexec.h> #include <asm/ptrace.h> #include <asm/mmu.h> +#include <asm/export.h> .text
@@ -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. *
@@ -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.
@@ -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
arch/powerpc/kernel/pci-common.c +1 -0
@@ -49,6 +49,7 @@ static int global_phb_number; /* Global phb counter *//* 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;
arch/powerpc/kernel/pci_32.c +2 -0
@@ -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 );
arch/powerpc/kernel/ppc_ksyms.c deleted +0 -39
@@ -1,39 +0,0 @@ -#include <linux/ftrace.h> -#include <linux/mm.h> - -#include <asm/processor.h> -#include <asm/switch_to.h> -#include <asm/cacheflush.h> -#include <asm/epapr_hcalls.h> - -EXPORT_SYMBOL (flush_dcache_range); -EXPORT_SYMBOL (flush_icache_range); - -EXPORT_SYMBOL (empty_zero_page); - -long long __bswapdi2 (long long ); -EXPORT_SYMBOL (__bswapdi2); - -#ifdef CONFIG_FUNCTION_TRACER -EXPORT_SYMBOL (_mcount); -#endif - -#ifdef CONFIG_PPC_FPU -EXPORT_SYMBOL (load_fp_state); -EXPORT_SYMBOL (store_fp_state); -#endif - -#ifdef CONFIG_ALTIVEC -EXPORT_SYMBOL (load_vr_state); -EXPORT_SYMBOL (store_vr_state); -#endif - -#ifdef CONFIG_VSX -EXPORT_SYMBOL_GPL (__giveup_vsx); -#endif - -#ifdef CONFIG_EPAPR_PARAVIRT -EXPORT_SYMBOL (epapr_hypercall_start); -#endif - -EXPORT_SYMBOL (current_stack_pointer);
arch/powerpc/kernel/ppc_ksyms_32.c deleted +0 -61
61 lines not on this page · raw message
arch/powerpc/kernel/setup_32.c +6 -0
@@ -16,6 +16,7 @@#include <linux/cpu.h> #include <linux/console.h> #include <linux/memblock.h> +#include <linux/export.h> #include <asm/io.h> #include <asm/prom.h>
@@ -48,11 +49,16 @@ int boot_cpuid_phys;EXPORT_SYMBOL_GPL (boot_cpuid_phys);int smp_hw_index[NR_CPUS ]; +EXPORT_SYMBOL (smp_hw_index);unsigned long ISA_DMA_THRESHOLD ;unsigned int DMA_MODE_READ ;unsigned int DMA_MODE_WRITE ; +EXPORT_SYMBOL (ISA_DMA_THRESHOLD ); +EXPORT_SYMBOL (DMA_MODE_READ ); +EXPORT_SYMBOL (DMA_MODE_WRITE ); +/* * These are used in binfmt_elf.c to put aux entries on the stack * for each elf executable being started.
arch/powerpc/kernel/time.c +1 -0
@@ -565,6 +565,7 @@ void timer_interrupt(struct pt_regs * regs)irq_exit ();set_irq_regs (old_regs); } +EXPORT_SYMBOL (timer_interrupt);/* * Hypervisor decrementer interrupts shouldn't occur but are sometimes
arch/powerpc/kernel/vector.S +4 -0
@@ -6,6 +6,7 @@ #include <asm/thread_info.h> #include <asm/page.h> #include <asm/ptrace.h> +#include <asm/export.h> #ifdef CONFIG_PPC_TRANSACTIONAL_MEM /* void do_load_up_transact_altivec(struct thread_struct *thread)
@@ -42,6 +43,7 @@ _GLOBAL(load_vr_state) mtvscr v0 REST_32VRS(0,r4,r3) blr +EXPORT_SYMBOL(load_vr_state) /* * Store VMX state into memory, including VSCR.
@@ -53,6 +55,7 @@ _GLOBAL(store_vr_state) li r4, VRSTATE_VSCR stvx v0, r4, r3 blr +EXPORT_SYMBOL(store_vr_state) /* * Disable VMX for the task which had it previously,
@@ -179,6 +182,7 @@ _GLOBAL(__giveup_vsx) std r4,_MSR-STACK_FRAME_OVERHEAD(r5) 1: blr +EXPORT_SYMBOL_GPL(__giveup_vsx) #endif /* CONFIG_VSX */
arch/powerpc/lib/Makefile +1 -1
@@ -9,7 +9,7 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) CFLAGS_REMOVE_code-patching.o = -pg CFLAGS_REMOVE_feature-fixups.o = -pg -obj-y += string.o alloc.o crtsavres.o ppc_ksyms.o code-patching.o \ +obj-y += string.o alloc.o crtsavres.o code-patching.o \ feature-fixups.o obj-$(CONFIG_PPC32) += div64.o copy_32.o
arch/powerpc/lib/checksum_32.S +4 -0
@@ -16,6 +16,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .text
@@ -39,6 +40,7 @@ _GLOBAL(ip_fast_csum) not r3,r3 srwi r3,r3,16 blr +EXPORT_SYMBOL(ip_fast_csum) /* * computes the checksum of a memory block at buff, length len,
@@ -77,6 +79,7 @@ _GLOBAL(csum_partial) adde r0,r0,r5 5: addze r3,r0 /* add in final carry */ blr +EXPORT_SYMBOL(csum_partial) /* * Computes the checksum of a memory block at src, length len,
@@ -207,3 +210,4 @@ dst_error: .long 95b,dst_error .long 96b,dst_error .long 97b,dst_error +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/powerpc/lib/checksum_64.S +4 -0
@@ -16,6 +16,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> /* * ip_fast_csum(r3=buf, r4=len) -- Optimized for IP header
@@ -43,6 +44,7 @@ _GLOBAL(ip_fast_csum) not r3,r3 srwi r3,r3,16 blr +EXPORT_SYMBOL(ip_fast_csum) /* * Computes the checksum of a memory block at buff, length len,
@@ -203,6 +205,7 @@ _GLOBAL(csum_partial) add r3,r4,r0 srdi r3,r3,32 blr +EXPORT_SYMBOL(csum_partial) .macro srcnr
@@ -457,3 +460,4 @@ dstnr; stb r6,0(r4) li r6,-EFAULT stw r6,0(r8) blr +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/powerpc/lib/copy_32.S +5 -0
@@ -12,6 +12,7 @@ #include <asm/cache.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> #define COPY_16_BYTES \ lwz r7,4(r4); \
@@ -92,6 +93,7 @@ _GLOBAL(memset) subf r6,r0,r6 cmplwi 0,r4,0 bne 2f /* Use normal procedure if r4 is not zero */ +EXPORT_SYMBOL(memset) _GLOBAL(memset_nocache_branch) b 2f /* Skip optimised bloc until cache is enabled */
@@ -216,6 +218,8 @@ _GLOBAL(memcpy) stbu r0,1(r6) bdnz 40b 65: blr +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(memmove) _GLOBAL(generic_memcpy) srwi. r7,r5,3
@@ -507,3 +511,4 @@ _GLOBAL(__copy_tofrom_user) .long 112b,120b .long 114b,120b .text +EXPORT_SYMBOL(__copy_tofrom_user)
arch/powerpc/lib/copypage_64.S +2 -0
@@ -10,6 +10,7 @@ #include <asm/processor.h> #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .section ".toc","aw" PPC64_CACHES:
@@ -110,3 +111,4 @@ END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ) std r11,120(r3) std r12,128(r3) blr +EXPORT_SYMBOL(copy_page)
arch/powerpc/lib/copyuser_64.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> #ifdef __BIG_ENDIAN__ #define sLd sld /* Shift towards low-numbered address. */
@@ -671,3 +672,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) .llong 89b,100b .llong 90b,100b .llong 91b,100b +EXPORT_SYMBOL(__copy_tofrom_user)
arch/powerpc/lib/hweight_64.S +5 -0
@@ -19,6 +19,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> /* Note: This code relies on -mminimal-toc */
@@ -32,6 +33,7 @@ FTR_SECTION_ELSE clrldi r3,r3,64-8 blr ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight8) _GLOBAL(__arch_hweight16) BEGIN_FTR_SECTION
@@ -54,6 +56,7 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 50) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight16) _GLOBAL(__arch_hweight32) BEGIN_FTR_SECTION
@@ -79,6 +82,7 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 51) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight32) _GLOBAL(__arch_hweight64) BEGIN_FTR_SECTION
@@ -108,3 +112,4 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 52) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight64)
arch/powerpc/lib/mem_64.S +3 -0
@@ -11,6 +11,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> _GLOBAL(memset) neg r0,r3
@@ -76,6 +77,7 @@ _GLOBAL(memset) 10: bflr 31 stb r4,0(r6) blr +EXPORT_SYMBOL(memset) _GLOBAL_TOC(memmove) cmplw 0,r3,r4
@@ -117,3 +119,4 @@ _GLOBAL(backwards_memcpy) beq 2b mtctr r7 b 1b +EXPORT_SYMBOL(memmove)
arch/powerpc/lib/memcmp_64.S +2 -0
@@ -8,6 +8,7 @@ * 2 of the License, or (at your option) any later version. */ #include <asm/ppc_asm.h> +#include <asm/export.h> #define off8 r6 #define off16 r7
@@ -231,3 +232,4 @@ _GLOBAL(memcmp) ld r28,-32(r1) ld r27,-40(r1) blr +EXPORT_SYMBOL(memcmp)
arch/powerpc/lib/memcpy_64.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .align 7 _GLOBAL_TOC(memcpy)
@@ -219,3 +220,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) 4: ld r3,-STACKFRAMESIZE+STK_REG(R31)(r1) /* return dest pointer */ blr #endif +EXPORT_SYMBOL(memcpy)
arch/powerpc/lib/ppc_ksyms.c deleted +0 -35
@@ -1,35 +0,0 @@ -#include <linux/string.h> -#include <linux/uaccess.h> -#include <linux/bitops.h> -#include <net/checksum.h> - -EXPORT_SYMBOL (memcpy); -EXPORT_SYMBOL (memset); -EXPORT_SYMBOL (memmove); -EXPORT_SYMBOL (memcmp); -EXPORT_SYMBOL (memchr); - -EXPORT_SYMBOL (strcpy); -EXPORT_SYMBOL (strncpy); -EXPORT_SYMBOL (strcat); -EXPORT_SYMBOL (strlen); -EXPORT_SYMBOL (strcmp); -EXPORT_SYMBOL (strncmp); - -#ifndef CONFIG_GENERIC_CSUM -EXPORT_SYMBOL (csum_partial); -EXPORT_SYMBOL (csum_partial_copy_generic); -EXPORT_SYMBOL (ip_fast_csum); -EXPORT_SYMBOL (csum_tcpudp_magic); -#endif - -EXPORT_SYMBOL (__copy_tofrom_user); -EXPORT_SYMBOL (__clear_user); -EXPORT_SYMBOL (copy_page); - -#ifdef CONFIG_PPC64 -EXPORT_SYMBOL (__arch_hweight8); -EXPORT_SYMBOL (__arch_hweight16); -EXPORT_SYMBOL (__arch_hweight32); -EXPORT_SYMBOL (__arch_hweight64); -#endif
arch/powerpc/lib/string.S +10 -0
@@ -11,6 +11,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .section __ex_table,"a" PPC_LONG_ALIGN
@@ -24,6 +25,7 @@ _GLOBAL(strcpy) stbu r0,1(r5) bne 1b blr +EXPORT_SYMBOL(strcpy) /* This clears out any unused part of the destination buffer, just as the libc version does. -- paulus */
@@ -44,6 +46,7 @@ _GLOBAL(strncpy) 2: stbu r0,1(r6) /* clear it out if so */ bdnz 2b blr +EXPORT_SYMBOL(strncpy) _GLOBAL(strcat) addi r5,r3,-1
@@ -57,6 +60,7 @@ _GLOBAL(strcat) stbu r0,1(r5) bne 1b blr +EXPORT_SYMBOL(strcat) _GLOBAL(strcmp) addi r5,r3,-1
@@ -68,6 +72,7 @@ _GLOBAL(strcmp) beqlr 1 beq 1b blr +EXPORT_SYMBOL(strcmp) _GLOBAL(strncmp) PPC_LCMPI 0,r5,0
@@ -84,6 +89,7 @@ _GLOBAL(strncmp) blr 2: li r3,0 blr +EXPORT_SYMBOL(strncmp) _GLOBAL(strlen) addi r4,r3,-1
@@ -92,6 +98,7 @@ _GLOBAL(strlen) bne 1b subf r3,r3,r4 blr +EXPORT_SYMBOL(strlen) #ifdef CONFIG_PPC32 _GLOBAL(memcmp)
@@ -107,6 +114,7 @@ _GLOBAL(memcmp) blr 2: li r3,0 blr +EXPORT_SYMBOL(memcmp) #endif _GLOBAL(memchr)
@@ -120,6 +128,7 @@ _GLOBAL(memchr) beqlr 2: li r3,0 blr +EXPORT_SYMBOL(memchr) #ifdef CONFIG_PPC32 _GLOBAL(__clear_user)
@@ -163,4 +172,5 @@ _GLOBAL(__clear_user) PPC_LONG 1b,91b PPC_LONG 8b,92b .text +EXPORT_SYMBOL(__clear_user) #endif
arch/powerpc/lib/string_64.S +2 -0
@@ -20,6 +20,7 @@ #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .section ".toc","aw" PPC64_CACHES:
@@ -200,3 +201,4 @@ err1; dcbz r0,r3 cmpdi r4,32 blt .Lshort_clear b .Lmedium_clear +EXPORT_SYMBOL(__clear_user)
arch/powerpc/mm/hash_low_32.S +3 -0
@@ -26,6 +26,7 @@ #include <asm/ppc_asm.h> #include <asm/thread_info.h> #include <asm/asm-offsets.h> +#include <asm/export.h> #ifdef CONFIG_SMP .section .bss
@@ -33,6 +34,7 @@ .globl mmu_hash_lock mmu_hash_lock: .space 4 +EXPORT_SYMBOL(mmu_hash_lock) #endif /* CONFIG_SMP */ /*
@@ -575,6 +577,7 @@ _GLOBAL(flush_hash_pages) rlwinm r8,r8,0,31,29 /* clear HASHPTE bit */ stwcx. r8,0,r5 /* update the pte */ bne- 33b +EXPORT_SYMBOL(flush_hash_pages) /* Get the address of the primary PTE group in the hash table (r3) */ _GLOBAL(flush_hash_patch_A)
arch/powerpc/sysdev/dcr-low.S +3 -0
@@ -12,6 +12,7 @@ #include <asm/ppc_asm.h> #include <asm/processor.h> #include <asm/bug.h> +#include <asm/export.h> #define DCR_ACCESS_PROLOG(table) \ cmpli cr0,r3,1024; \
@@ -28,9 +29,11 @@ _GLOBAL(__mfdcr) DCR_ACCESS_PROLOG(__mfdcr_table) +EXPORT_SYMBOL(__mfdcr) _GLOBAL(__mtdcr) DCR_ACCESS_PROLOG(__mtdcr_table) +EXPORT_SYMBOL(__mtdcr) __mfdcr_table: mfdcr r3,0; blr
Signature · 1 line
2.1.4
PATCH 9/12 sparc: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/sparc/include/asm/Kbuild | 1 + arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/entry.S | 3 + arch/sparc/kernel/head_32.S | 3 + arch/sparc/kernel/head_64.S | 7 +- arch/sparc/kernel/helpers.S | 2 + arch/sparc/kernel/hvcalls.S | 4 + arch/sparc/kernel/sparc_ksyms.c | 12 +++ arch/sparc/kernel/sparc_ksyms_32.c | 31 ------- arch/sparc/kernel/sparc_ksyms_64.c | 52 ------------ arch/sparc/lib/Makefile | 1 - arch/sparc/lib/U1memcpy.S | 2 + arch/sparc/lib/VISsave.S | 2 + arch/sparc/lib/ashldi3.S | 2 + arch/sparc/lib/ashrdi3.S | 2 + arch/sparc/lib/atomic_64.S | 10 ++- arch/sparc/lib/bitops.S | 7 ++ arch/sparc/lib/blockops.S | 3 + arch/sparc/lib/bzero.S | 4 + arch/sparc/lib/checksum_32.S | 3 + arch/sparc/lib/checksum_64.S | 2 + arch/sparc/lib/clear_page.S | 3 + arch/sparc/lib/copy_in_user.S | 2 + arch/sparc/lib/copy_page.S | 2 + arch/sparc/lib/copy_user.S | 2 + arch/sparc/lib/csum_copy.S | 3 + arch/sparc/lib/divdi3.S | 2 + arch/sparc/lib/ffs.S | 3 + arch/sparc/lib/hweight.S | 5 ++ arch/sparc/lib/ipcsum.S | 2 + arch/sparc/lib/ksyms.c | 165 ------------------------------------- arch/sparc/lib/locks.S | 5 ++ arch/sparc/lib/lshrdi3.S | 2 + arch/sparc/lib/mcount.S | 2 + arch/sparc/lib/memcmp.S | 2 + arch/sparc/lib/memcpy.S | 4 + arch/sparc/lib/memmove.S | 2 + arch/sparc/lib/memscan_32.S | 4 + arch/sparc/lib/memscan_64.S | 4 + arch/sparc/lib/memset.S | 3 + arch/sparc/lib/muldi3.S | 2 + arch/sparc/lib/strlen.S | 2 + arch/sparc/lib/strncmp_32.S | 2 + arch/sparc/lib/strncmp_64.S | 2 + arch/sparc/lib/xor.S | 9 ++ 45 files changed, 136 insertions(+), 253 deletions(-) create mode 100644 arch/sparc/kernel/sparc_ksyms.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_32.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_64.c delete mode 100644 arch/sparc/lib/ksyms.c
arch/sparc/include/asm/Kbuild +1 -0
@@ -6,6 +6,7 @@ generic-y += cputime.h generic-y += div64.h generic-y += emergency-restart.h generic-y += exec.h +generic-y += export.h generic-y += irq_regs.h generic-y += irq_work.h generic-y += linkage.h
arch/sparc/kernel/Makefile +1 -1
@@ -85,7 +85,7 @@ obj-y += auxio_$(BITS).o obj-$(CONFIG_SUN_PM) += apc.o pmc.o obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_MODULES) += sparc_ksyms_$(BITS).o +obj-$(CONFIG_MODULES) += sparc_ksyms.o obj-$(CONFIG_SPARC_LED) += led.o obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
arch/sparc/kernel/entry.S +3 -0
@@ -29,6 +29,7 @@ #include <asm/unistd.h> #include <asm/asmmacro.h> +#include <asm/export.h> #define curptr g6
@@ -1190,6 +1191,8 @@ delay_continue: ret restore +EXPORT_SYMBOL(__udelay) +EXPORT_SYMBOL(__ndelay) /* Handle a software breakpoint */ /* We have to inform parent that child has stopped */
arch/sparc/kernel/head_32.S +3 -0
@@ -24,6 +24,7 @@ #include <asm/thread_info.h> /* TI_UWINMASK */ #include <asm/errno.h> #include <asm/pgtsrmmu.h> /* SRMMU_PGDIR_SHIFT */ +#include <asm/export.h> .data /* The following are used with the prom_vector node-ops to figure out
@@ -60,6 +61,7 @@ sun4e_notsup: */ .globl empty_zero_page empty_zero_page: .skip PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .global root_flags .global ram_flags
@@ -813,3 +815,4 @@ lvl14_save: __ret_efault: ret restore %g0, -EFAULT, %o0 +EXPORT_SYMBOL(__ret_efault)
arch/sparc/kernel/head_64.S +6 -1
@@ -32,7 +32,8 @@ #include <asm/estate.h> #include <asm/sfafsr.h> #include <asm/unistd.h> - +#include <asm/export.h> + /* This section from from _start to sparc64_boot_end should fit into * 0x0000000000404000 to 0x0000000000408000. */
@@ -143,6 +144,7 @@ prom_cpu_compatible: .skip 64 prom_root_node: .word 0 +EXPORT_SYMBOL(prom_root_node) prom_mmu_ihandle_cache: .word 0 prom_boot_mapped_pc:
@@ -158,6 +160,7 @@ is_sun4v: .word 0 sun4v_chip_type: .word SUN4V_CHIP_INVALID +EXPORT_SYMBOL(sun4v_chip_type) 1: rd %pc, %l0
@@ -928,6 +931,7 @@ swapper_4m_tsb: .globl prom_tba, tlb_type prom_tba: .xword 0 tlb_type: .word 0 /* Must NOT end up in BSS */ +EXPORT_SYMBOL(tlb_type) .section ".fixup",#alloc,#execinstr .globl __ret_efault, __retl_efault, __ret_one, __retl_one
@@ -935,6 +939,7 @@ ENTRY(__ret_efault) ret restore %g0, -EFAULT, %o0 ENDPROC(__ret_efault) +EXPORT_SYMBOL(__ret_efault) ENTRY(__retl_efault) retl
arch/sparc/kernel/helpers.S +2 -0
@@ -15,6 +15,7 @@ __flushw_user: 2: retl nop .size __flushw_user,.-__flushw_user +EXPORT_SYMBOL(__flushw_user) /* Flush %fp and %i7 to the stack for all register * windows active inside of the cpu. This allows
@@ -61,3 +62,4 @@ real_hard_smp_processor_id: .size hard_smp_processor_id,.-hard_smp_processor_id #endif .size real_hard_smp_processor_id,.-real_hard_smp_processor_id +EXPORT_SYMBOL_GPL(real_hard_smp_processor_id)
arch/sparc/kernel/hvcalls.S +4 -0
@@ -775,6 +775,7 @@ ENTRY(sun4v_niagara_getperf) retl nop ENDPROC(sun4v_niagara_getperf) +EXPORT_SYMBOL(sun4v_niagara_getperf) ENTRY(sun4v_niagara_setperf) mov HV_FAST_SET_PERFREG, %o5
@@ -782,6 +783,7 @@ ENTRY(sun4v_niagara_setperf) retl nop ENDPROC(sun4v_niagara_setperf) +EXPORT_SYMBOL(sun4v_niagara_setperf) ENTRY(sun4v_niagara2_getperf) mov %o0, %o4
@@ -791,6 +793,7 @@ ENTRY(sun4v_niagara2_getperf) retl nop ENDPROC(sun4v_niagara2_getperf) +EXPORT_SYMBOL(sun4v_niagara2_getperf) ENTRY(sun4v_niagara2_setperf) mov HV_FAST_N2_SET_PERFREG, %o5
@@ -798,6 +801,7 @@ ENTRY(sun4v_niagara2_setperf) retl nop ENDPROC(sun4v_niagara2_setperf) +EXPORT_SYMBOL(sun4v_niagara2_setperf) ENTRY(sun4v_reboot_data_set) mov HV_FAST_REBOOT_DATA_SET, %o5
arch/sparc/kernel/sparc_ksyms.c new file +12 -0
@@ -0,0 +1,12 @@ +/* +* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. +* +* Copyright (C) 1996 David S. Miller ([email protected]) +* Copyright (C) 1996 Eddie C. Dost ([email protected]) +*/ + +#include <linux/init.h> +#include <linux/export.h> + +/* This is needed only for drivers/sbus/char/openprom.c */ +EXPORT_SYMBOL (saved_command_line);
arch/sparc/kernel/sparc_ksyms_32.c deleted +0 -31
@@ -1,31 +0,0 @@ -/* -* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. -* -* Copyright (C) 1996 David S. Miller ([email protected]) -* Copyright (C) 1996 Eddie C. Dost ([email protected]) -*/ - -#include <linux/module.h> - -#include <asm/pgtable.h> -#include <asm/uaccess.h> -#include <asm/delay.h> -#include <asm/head.h> -#include <asm/dma.h> - -struct poll { -int fd; -short events; -short revents; -}; - -/* from entry.S */ -EXPORT_SYMBOL (__udelay); -EXPORT_SYMBOL (__ndelay); - -/* from head_32.S */ -EXPORT_SYMBOL (__ret_efault); -EXPORT_SYMBOL (empty_zero_page); - -/* Exporting a symbol from /init/main.c */ -EXPORT_SYMBOL (saved_command_line);
arch/sparc/kernel/sparc_ksyms_64.c deleted +0 -52
52 lines not on this page · raw message
arch/sparc/lib/Makefile +0 -1
@@ -43,5 +43,4 @@ lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o hweight.o ffs.o obj-$(CONFIG_SPARC64) += iomap.o obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o -obj-y += ksyms.o obj-$(CONFIG_SPARC64) += PeeCeeI.o
arch/sparc/lib/U1memcpy.S +2 -0
@@ -7,6 +7,7 @@ #ifdef __KERNEL__ #include <asm/visasm.h> #include <asm/asi.h> +#include <asm/export.h> #define GLOBAL_SPARE g7 #else #define GLOBAL_SPARE g5
@@ -567,3 +568,4 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ mov EX_RETVAL(%o4), %o0 .size FUNC_NAME, .-FUNC_NAME +EXPORT_SYMBOL(FUNC_NAME)
arch/sparc/lib/VISsave.S +2 -0
@@ -13,6 +13,7 @@ #include <asm/ptrace.h> #include <asm/visasm.h> #include <asm/thread_info.h> +#include <asm/export.h> /* On entry: %o5=current FPRS value, %g7 is callers address */ /* May clobber %o5, %g1, %g2, %g3, %g7, %icc, %xcc */
@@ -79,3 +80,4 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3 80: jmpl %g7 + %g0, %g0 nop ENDPROC(VISenter) +EXPORT_SYMBOL(VISenter)
arch/sparc/lib/ashldi3.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(__ashldi3)
@@ -33,3 +34,4 @@ ENTRY(__ashldi3) retl nop ENDPROC(__ashldi3) +EXPORT_SYMBOL(__ashldi3)
arch/sparc/lib/ashrdi3.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(__ashrdi3)
@@ -35,3 +36,4 @@ ENTRY(__ashrdi3) jmpl %o7 + 8, %g0 nop ENDPROC(__ashrdi3) +EXPORT_SYMBOL(__ashrdi3)
arch/sparc/lib/atomic_64.S +8 -2
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> #include <asm/backoff.h> +#include <asm/export.h> .text
@@ -28,6 +29,7 @@ ENTRY(atomic_##op) /* %o0 = increment, %o1 = atomic_ptr */ \ nop; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ ENDPROC(atomic_##op); \ +EXPORT_SYMBOL(atomic_##op); \ #define ATOMIC_OP_RETURN(op) \ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
@@ -41,7 +43,8 @@ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \ retl; \ sra %g1, 0, %o0; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ -ENDPROC(atomic_##op##_return); +ENDPROC(atomic_##op##_return); \ +EXPORT_SYMBOL(atomic_##op##_return); \ #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op)
@@ -68,6 +71,7 @@ ENTRY(atomic64_##op) /* %o0 = increment, %o1 = atomic_ptr */ \ nop; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ ENDPROC(atomic64_##op); \ +EXPORT_SYMBOL(atomic64_##op); \ #define ATOMIC64_OP_RETURN(op) \ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
@@ -81,7 +85,8 @@ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \ retl; \ op %g1, %o0, %o0; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ -ENDPROC(atomic64_##op##_return); +ENDPROC(atomic64_##op##_return); \ +EXPORT_SYMBOL(atomic64_##op##_return); #define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op)
@@ -108,3 +113,4 @@ ENTRY(atomic64_dec_if_positive) /* %o0 = atomic_ptr */ sub %g1, 1, %o0 2: BACKOFF_SPIN(%o2, %o3, 1b) ENDPROC(atomic64_dec_if_positive) +EXPORT_SYMBOL(atomic64_dec_if_positive)
arch/sparc/lib/bitops.S +7 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> #include <asm/backoff.h> +#include <asm/export.h> .text
@@ -29,6 +30,7 @@ ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_set_bit) +EXPORT_SYMBOL(test_and_set_bit) ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -50,6 +52,7 @@ ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_clear_bit) +EXPORT_SYMBOL(test_and_clear_bit) ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -71,6 +74,7 @@ ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_change_bit) +EXPORT_SYMBOL(test_and_change_bit) ENTRY(set_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -90,6 +94,7 @@ ENTRY(set_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(set_bit) +EXPORT_SYMBOL(set_bit) ENTRY(clear_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -109,6 +114,7 @@ ENTRY(clear_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(clear_bit) +EXPORT_SYMBOL(clear_bit) ENTRY(change_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -128,3 +134,4 @@ ENTRY(change_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(change_bit) +EXPORT_SYMBOL(change_bit)
arch/sparc/lib/blockops.S +3 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/page.h> +#include <asm/export.h> /* Zero out 64 bytes of memory at (buf + offset). * Assumes %g1 contains zero.
@@ -64,6 +65,7 @@ ENTRY(bzero_1page) retl nop ENDPROC(bzero_1page) +EXPORT_SYMBOL(bzero_1page) ENTRY(__copy_1page) /* NOTE: If you change the number of insns of this routine, please check
@@ -87,3 +89,4 @@ ENTRY(__copy_1page) retl nop ENDPROC(__copy_1page) +EXPORT_SYMBOL(__copy_1page)
arch/sparc/lib/bzero.S +4 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text
@@ -78,6 +79,8 @@ __bzero_done: mov %o3, %o0 ENDPROC(__bzero) ENDPROC(memset) +EXPORT_SYMBOL(__bzero) +EXPORT_SYMBOL(memset) #define EX_ST(x,y) \ 98: x,y; \
@@ -143,3 +146,4 @@ __clear_user_done: retl clr %o0 ENDPROC(__clear_user) +EXPORT_SYMBOL(__clear_user)
arch/sparc/lib/checksum_32.S +3 -0
@@ -14,6 +14,7 @@ */ #include <asm/errno.h> +#include <asm/export.h> #define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \ ldd [buf + offset + 0x00], t0; \
@@ -104,6 +105,7 @@ csum_partial_fix_alignment: * buffer of size 0x20. Follow the code path for that case. */ .globl csum_partial + EXPORT_SYMBOL(csum_partial) csum_partial: /* %o0=buf, %o1=len, %o2=sum */ andcc %o0, 0x7, %g0 ! alignment problems? bne csum_partial_fix_alignment ! yep, handle it
@@ -335,6 +337,7 @@ cc_dword_align: */ .align 8 .globl __csum_partial_copy_sparc_generic + EXPORT_SYMBOL(__csum_partial_copy_sparc_generic) __csum_partial_copy_sparc_generic: /* %o0=src, %o1=dest, %g1=len, %g7=sum */ xor %o0, %o1, %o4 ! get changing bits
arch/sparc/lib/checksum_64.S +2 -0
@@ -13,6 +13,7 @@ * BSD4.4 portable checksum routine */ +#include <asm/export.h> .text csum_partial_fix_alignment:
@@ -37,6 +38,7 @@ csum_partial_fix_alignment: .align 32 .globl csum_partial + EXPORT_SYMBOL(csum_partial) csum_partial: /* %o0=buff, %o1=len, %o2=sum */ prefetch [%o0 + 0x000], #n_reads clr %o4
arch/sparc/lib/clear_page.S +3 -0
@@ -10,6 +10,7 @@ #include <asm/pgtable.h> #include <asm/spitfire.h> #include <asm/head.h> +#include <asm/export.h> /* What we used to do was lock a TLB entry into a specific * TLB slot, clear the page with interrupts disabled, then
@@ -26,6 +27,7 @@ .text .globl _clear_page + EXPORT_SYMBOL(_clear_page) _clear_page: /* %o0=dest */ ba,pt %xcc, clear_page_common clr %o4
@@ -35,6 +37,7 @@ _clear_page: /* %o0=dest */ */ .align 32 .globl clear_user_page + EXPORT_SYMBOL(clear_user_page) clear_user_page: /* %o0=dest, %o1=vaddr */ lduw [%g6 + TI_PRE_COUNT], %o2 sethi %hi(PAGE_OFFSET), %g2
arch/sparc/lib/copy_in_user.S +2 -0
@@ -5,6 +5,7 @@ #include <linux/linkage.h> #include <asm/asi.h> +#include <asm/export.h> #define XCC xcc
@@ -90,3 +91,4 @@ ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */ retl clr %o0 ENDPROC(___copy_in_user) +EXPORT_SYMBOL(___copy_in_user)
arch/sparc/lib/copy_page.S +2 -0
@@ -10,6 +10,7 @@ #include <asm/pgtable.h> #include <asm/spitfire.h> #include <asm/head.h> +#include <asm/export.h> /* What we used to do was lock a TLB entry into a specific * TLB slot, clear the page with interrupts disabled, then
@@ -44,6 +45,7 @@ .align 32 .globl copy_user_page .type copy_user_page,#function + EXPORT_SYMBOL(copy_user_page) copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ lduw [%g6 + TI_PRE_COUNT], %o4 sethi %hi(PAGE_OFFSET), %g2
arch/sparc/lib/copy_user.S +2 -0
@@ -15,6 +15,7 @@ #include <asm/asmmacro.h> #include <asm/page.h> #include <asm/thread_info.h> +#include <asm/export.h> /* Work around cpp -rob */ #define ALLOC #alloc
@@ -119,6 +120,7 @@ __copy_user_begin: .globl __copy_user + EXPORT_SYMBOL(__copy_user) dword_align: andcc %o1, 1, %g0 be 4f
arch/sparc/lib/csum_copy.S +3 -0
@@ -3,6 +3,8 @@ * Copyright (C) 2005 David S. Miller <[email protected]> */ +#include <asm/export.h> + #ifdef __KERNEL__ #define GLOBAL_SPARE %g7 #else
@@ -63,6 +65,7 @@ add %o5, %o4, %o4 .globl FUNC_NAME + EXPORT_SYMBOL(FUNC_NAME) FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ LOAD(prefetch, %o0 + 0x000, #n_reads) xor %o0, %o1, %g1
arch/sparc/lib/divdi3.S +2 -0
@@ -17,6 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <asm/export.h> .text .align 4 .globl __divdi3
@@ -279,3 +280,4 @@ __divdi3: .LL81: ret restore +EXPORT_SYMBOL(__divdi3)
arch/sparc/lib/ffs.S +3 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .register %g2,#scratch
@@ -65,6 +66,8 @@ ENTRY(__ffs) add %o2, %g1, %o0 ENDPROC(ffs) ENDPROC(__ffs) +EXPORT_SYMBOL(__ffs) +EXPORT_SYMBOL(ffs) .section .popc_6insn_patch, "ax" .word ffs
arch/sparc/lib/hweight.S +5 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .text .align 32
@@ -7,6 +8,7 @@ ENTRY(__arch_hweight8) nop nop ENDPROC(__arch_hweight8) +EXPORT_SYMBOL(__arch_hweight8) .section .popc_3insn_patch, "ax" .word __arch_hweight8 sllx %o0, 64-8, %g1
@@ -19,6 +21,7 @@ ENTRY(__arch_hweight16) nop nop ENDPROC(__arch_hweight16) +EXPORT_SYMBOL(__arch_hweight16) .section .popc_3insn_patch, "ax" .word __arch_hweight16 sllx %o0, 64-16, %g1
@@ -31,6 +34,7 @@ ENTRY(__arch_hweight32) nop nop ENDPROC(__arch_hweight32) +EXPORT_SYMBOL(__arch_hweight32) .section .popc_3insn_patch, "ax" .word __arch_hweight32 sllx %o0, 64-32, %g1
@@ -43,6 +47,7 @@ ENTRY(__arch_hweight64) nop nop ENDPROC(__arch_hweight64) +EXPORT_SYMBOL(__arch_hweight64) .section .popc_3insn_patch, "ax" .word __arch_hweight64 retl
arch/sparc/lib/ipcsum.S +2 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(ip_fast_csum) /* %o0 = iph, %o1 = ihl */
@@ -31,3 +32,4 @@ ENTRY(ip_fast_csum) /* %o0 = iph, %o1 = ihl */ retl and %o2, %o1, %o0 ENDPROC(ip_fast_csum) +EXPORT_SYMBOL(ip_fast_csum)
arch/sparc/lib/ksyms.c deleted +0 -165
165 lines not on this page · raw message
arch/sparc/lib/locks.S +5 -0
@@ -10,6 +10,7 @@ #include <asm/psr.h> #include <asm/smp.h> #include <asm/spinlock.h> +#include <asm/export.h> .text .align 4
@@ -48,6 +49,7 @@ ___rw_write_enter_spin_on_wlock: ld [%g1], %g2 .globl ___rw_read_enter +EXPORT_SYMBOL(___rw_read_enter) ___rw_read_enter: orcc %g2, 0x0, %g0 bne,a ___rw_read_enter_spin_on_wlock
@@ -59,6 +61,7 @@ ___rw_read_enter: mov %g4, %o7 .globl ___rw_read_exit +EXPORT_SYMBOL(___rw_read_exit) ___rw_read_exit: orcc %g2, 0x0, %g0 bne,a ___rw_read_exit_spin_on_wlock
@@ -70,6 +73,7 @@ ___rw_read_exit: mov %g4, %o7 .globl ___rw_read_try +EXPORT_SYMBOL(___rw_read_try) ___rw_read_try: orcc %g2, 0x0, %g0 bne ___rw_read_try_spin_on_wlock
@@ -81,6 +85,7 @@ ___rw_read_try: mov %g4, %o7 .globl ___rw_write_enter +EXPORT_SYMBOL(___rw_write_enter) ___rw_write_enter: orcc %g2, 0x0, %g0 bne ___rw_write_enter_spin_on_wlock
arch/sparc/lib/lshrdi3.S +2 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> ENTRY(__lshrdi3) cmp %o2, 0
@@ -25,3 +26,4 @@ ENTRY(__lshrdi3) retl nop ENDPROC(__lshrdi3) +EXPORT_SYMBOL(__lshrdi3)
arch/sparc/lib/mcount.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> /* * This is the main variant and is called by C code. GCC's -pg option
@@ -16,6 +17,7 @@ .align 32 .globl _mcount .type _mcount,#function + EXPORT_SYMBOL(_mcount) .globl mcount .type mcount,#function _mcount:
arch/sparc/lib/memcmp.S +2 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/export.h> .text ENTRY(memcmp)
@@ -25,3 +26,4 @@ ENTRY(memcmp) 2: retl mov 0, %o0 ENDPROC(memcmp) +EXPORT_SYMBOL(memcmp)
arch/sparc/lib/memcpy.S +4 -0
@@ -7,6 +7,7 @@ * Copyright (C) 1996 Jakub Jelinek ([email protected]) */ +#include <asm/export.h> #define FUNC(x) \ .globl x; \ .type x,@function; \
@@ -143,8 +144,10 @@ x: #ifdef __KERNEL__ FUNC(amemmove) FUNC(__memmove) +EXPORT_SYMBOL(__memmove) #endif FUNC(memmove) +EXPORT_SYMBOL(memmove) cmp %o0, %o1 mov %o0, %g7 bleu 9f
@@ -202,6 +205,7 @@ FUNC(memmove) add %o0, 2, %o0 FUNC(memcpy) /* %o0=dst %o1=src %o2=len */ +EXPORT_SYMBOL(memcpy) sub %o0, %o1, %o4 mov %o0, %g7
arch/sparc/lib/memmove.S +2 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(memmove) /* o0=dst o1=src o2=len */
@@ -57,3 +58,4 @@ ENTRY(memmove) /* o0=dst o1=src o2=len */ stb %g7, [%o0 - 0x1] ba,a,pt %xcc, 99b ENDPROC(memmove) +EXPORT_SYMBOL(memmove)
arch/sparc/lib/memscan_32.S +4 -0
@@ -4,6 +4,8 @@ * Copyright (C) 1996 David S. Miller ([email protected]) */ +#include <asm/export.h> + /* In essence, this is just a fancy strlen. */ #define LO_MAGIC 0x01010101
@@ -13,6 +15,8 @@ .align 4 .globl __memscan_zero, __memscan_generic .globl memscan +EXPORT_SYMBOL(__memscan_zero) +EXPORT_SYMBOL(__memscan_generic) __memscan_zero: /* %o0 = addr, %o1 = size */ cmp %o1, 0
arch/sparc/lib/memscan_64.S +4 -0
@@ -5,6 +5,8 @@ * Copyright (C) 1998 David S. Miller ([email protected]) */ + #include <asm/export.h> + #define HI_MAGIC 0x8080808080808080 #define LO_MAGIC 0x0101010101010101 #define ASI_PL 0x88
@@ -13,6 +15,8 @@ .align 32 .globl __memscan_zero, __memscan_generic .globl memscan + EXPORT_SYMBOL(__memscan_zero) + EXPORT_SYMBOL(__memscan_generic) __memscan_zero: /* %o0 = bufp, %o1 = size */
arch/sparc/lib/memset.S +3 -0
@@ -9,6 +9,7 @@ */ #include <asm/ptrace.h> +#include <asm/export.h> /* Work around cpp -rob */ #define ALLOC #alloc
@@ -63,6 +64,8 @@ __bzero_begin: .globl __bzero .globl memset + EXPORT_SYMBOL(__bzero) + EXPORT_SYMBOL(memset) .globl __memset_start, __memset_end __memset_start: memset:
arch/sparc/lib/muldi3.S +2 -0
@@ -17,6 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <asm/export.h> .text .align 4 .globl __muldi3
@@ -74,3 +75,4 @@ __muldi3: add %l2, %l0, %i0 ret restore %g0, %l3, %o1 +EXPORT_SYMBOL(__muldi3)
arch/sparc/lib/strlen.S +2 -0
@@ -7,6 +7,7 @@ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/export.h> #define LO_MAGIC 0x01010101 #define HI_MAGIC 0x80808080
@@ -78,3 +79,4 @@ ENTRY(strlen) retl mov 2, %o0 ENDPROC(strlen) +EXPORT_SYMBOL(strlen)
arch/sparc/lib/strncmp_32.S +2 -0
@@ -4,6 +4,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(strncmp)
@@ -116,3 +117,4 @@ ENTRY(strncmp) retl sub %o3, %o0, %o0 ENDPROC(strncmp) +EXPORT_SYMBOL(strncmp)
arch/sparc/lib/strncmp_64.S +2 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> +#include <asm/export.h> .text ENTRY(strncmp)
@@ -28,3 +29,4 @@ ENTRY(strncmp) retl clr %o0 ENDPROC(strncmp) +EXPORT_SYMBOL(strncmp)
arch/sparc/lib/xor.S +9 -0
@@ -13,6 +13,7 @@ #include <asm/asi.h> #include <asm/dcu.h> #include <asm/spitfire.h> +#include <asm/export.h> /* * Requirements:
@@ -90,6 +91,7 @@ ENTRY(xor_vis_2) retl wr %g0, 0, %fprs ENDPROC(xor_vis_2) +EXPORT_SYMBOL(xor_vis_2) ENTRY(xor_vis_3) rd %fprs, %o5
@@ -156,6 +158,7 @@ ENTRY(xor_vis_3) retl wr %g0, 0, %fprs ENDPROC(xor_vis_3) +EXPORT_SYMBOL(xor_vis_3) ENTRY(xor_vis_4) rd %fprs, %o5
@@ -241,6 +244,7 @@ ENTRY(xor_vis_4) retl wr %g0, 0, %fprs ENDPROC(xor_vis_4) +EXPORT_SYMBOL(xor_vis_4) ENTRY(xor_vis_5) save %sp, -192, %sp
@@ -347,6 +351,7 @@ ENTRY(xor_vis_5) ret restore ENDPROC(xor_vis_5) +EXPORT_SYMBOL(xor_vis_5) /* Niagara versions. */ ENTRY(xor_niagara_2) /* %o0=bytes, %o1=dest, %o2=src */
@@ -393,6 +398,7 @@ ENTRY(xor_niagara_2) /* %o0=bytes, %o1=dest, %o2=src */ ret restore ENDPROC(xor_niagara_2) +EXPORT_SYMBOL(xor_niagara_2) ENTRY(xor_niagara_3) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2 */ save %sp, -192, %sp
@@ -454,6 +460,7 @@ ENTRY(xor_niagara_3) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2 */ ret restore ENDPROC(xor_niagara_3) +EXPORT_SYMBOL(xor_niagara_3) ENTRY(xor_niagara_4) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3 */ save %sp, -192, %sp
@@ -536,6 +543,7 @@ ENTRY(xor_niagara_4) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3 */ ret restore ENDPROC(xor_niagara_4) +EXPORT_SYMBOL(xor_niagara_4) ENTRY(xor_niagara_5) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3, %o5=src4 */ save %sp, -192, %sp
@@ -634,3 +642,4 @@ ENTRY(xor_niagara_5) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3, %o5=s ret restore ENDPROC(xor_niagara_5) +EXPORT_SYMBOL(xor_niagara_5)
Signature · 1 line
2.1.4
Re: [PATCH 09/12] sparc: move exports to definitions
From: Al Viro <[email protected]>
Date: Fri, 29 Jan 2016 19:18:31 +0000
Quoted 3 lines
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>
PATCH 10/12 ia64: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/ia64/include/asm/Kbuild | 1 + arch/ia64/kernel/entry.S | 3 ++ arch/ia64/kernel/esi_stub.S | 2 + arch/ia64/kernel/head.S | 3 ++ arch/ia64/kernel/ia64_ksyms.c | 94 +-------------------------------------- arch/ia64/kernel/ivt.S | 2 + arch/ia64/kernel/pal.S | 7 +++ arch/ia64/kernel/setup.c | 4 ++ arch/ia64/lib/clear_page.S | 2 + arch/ia64/lib/clear_user.S | 2 + arch/ia64/lib/copy_page.S | 2 + arch/ia64/lib/copy_page_mck.S | 2 + arch/ia64/lib/copy_user.S | 2 + arch/ia64/lib/flush.S | 2 + arch/ia64/lib/idiv32.S | 2 + arch/ia64/lib/idiv64.S | 2 + arch/ia64/lib/ip_fast_csum.S | 3 ++ arch/ia64/lib/memcpy.S | 2 + arch/ia64/lib/memcpy_mck.S | 3 ++ arch/ia64/lib/memset.S | 2 + arch/ia64/lib/strlen.S | 2 + arch/ia64/lib/strlen_user.S | 2 + arch/ia64/lib/strncpy_from_user.S | 2 + arch/ia64/lib/strnlen_user.S | 2 + arch/ia64/lib/xor.S | 5 +++ 25 files changed, 63 insertions(+), 92 deletions(-)
arch/ia64/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ generic-y += clkdev.h generic-y += exec.h +generic-y += export.h generic-y += irq_work.h generic-y += kvm_para.h generic-y += mcs_spinlock.h
arch/ia64/kernel/entry.S +3 -0
@@ -48,6 +48,7 @@ #include <asm/thread_info.h> #include <asm/unistd.h> #include <asm/ftrace.h> +#include <asm/export.h> #include "minstate.h"
@@ -1345,12 +1346,14 @@ GLOBAL_ENTRY(unw_init_running) mov rp=loc0 br.ret.sptk.many rp END(unw_init_running) +EXPORT_SYMBOL(unw_init_running) #ifdef CONFIG_FUNCTION_TRACER #ifdef CONFIG_DYNAMIC_FTRACE GLOBAL_ENTRY(_mcount) br ftrace_stub END(_mcount) +EXPORT_SYMBOL(_mcount) .here: br.ret.sptk.many b0
arch/ia64/kernel/esi_stub.S +2 -0
@@ -35,6 +35,7 @@ #include <asm/processor.h> #include <asm/asmmacro.h> +#include <asm/export.h> /* * Inputs:
@@ -94,3 +95,4 @@ GLOBAL_ENTRY(esi_call_phys) mov gp=loc2 br.ret.sptk.many rp END(esi_call_phys) +EXPORT_SYMBOL_GPL(esi_call_phys)
arch/ia64/kernel/head.S +3 -0
@@ -32,6 +32,7 @@ #include <asm/mca_asm.h> #include <linux/init.h> #include <linux/linkage.h> +#include <asm/export.h> #ifdef CONFIG_HOTPLUG_CPU #define SAL_PSR_BITS_TO_SET \
@@ -168,6 +169,7 @@ RestRR: \ __PAGE_ALIGNED_DATA .global empty_zero_page +EXPORT_SYMBOL_GPL(empty_zero_page) empty_zero_page: .skip PAGE_SIZE
@@ -991,6 +993,7 @@ GLOBAL_ENTRY(ia64_delay_loop) mov ar.lc=r2 br.ret.sptk.many rp END(ia64_delay_loop) +EXPORT_SYMBOL(ia64_delay_loop) /* * Return a CPU-local timestamp in nano-seconds. This timestamp is
arch/ia64/kernel/ia64_ksyms.c +2 -92
103 lines not on this page · raw message
arch/ia64/kernel/ivt.S +2 -0
@@ -57,6 +57,7 @@ #include <asm/thread_info.h> #include <asm/unistd.h> #include <asm/errno.h> +#include <asm/export.h> #if 0 # define PSR_DEFAULT_BITS psr.ac
@@ -85,6 +86,7 @@ .align 32768 // align on 32KB boundary .global ia64_ivt + EXPORT_SYMBOL(ia64_ivt) ia64_ivt: ///////////////////////////////////////////////////////////////////////////////////////// // 0x0000 Entry 0 (size 64 bundles) VHPT Translation (8,20,47)
arch/ia64/kernel/pal.S +7 -0
@@ -14,6 +14,7 @@ #include <asm/asmmacro.h> #include <asm/processor.h> +#include <asm/export.h> .data pal_entry_point:
@@ -87,6 +88,7 @@ GLOBAL_ENTRY(ia64_pal_call_static) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_static) +EXPORT_SYMBOL(ia64_pal_call_static) /* * Make a PAL call using the stacked registers calling convention.
@@ -122,6 +124,7 @@ GLOBAL_ENTRY(ia64_pal_call_stacked) srlz.d // serialize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_stacked) +EXPORT_SYMBOL(ia64_pal_call_stacked) /* * Make a physical mode PAL call using the static registers calling convention.
@@ -193,6 +196,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_phys_static) +EXPORT_SYMBOL(ia64_pal_call_phys_static) /* * Make a PAL call using the stacked registers in physical mode.
@@ -250,6 +254,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_phys_stacked) +EXPORT_SYMBOL(ia64_pal_call_phys_stacked) /* * Save scratch fp scratch regs which aren't saved in pt_regs already
@@ -275,6 +280,7 @@ GLOBAL_ENTRY(ia64_save_scratch_fpregs) stf.spill [r2] = f15,32 br.ret.sptk.many rp END(ia64_save_scratch_fpregs) +EXPORT_SYMBOL(ia64_save_scratch_fpregs) /* * Load scratch fp scratch regs (fp10-fp15)
@@ -296,3 +302,4 @@ GLOBAL_ENTRY(ia64_load_scratch_fpregs) ldf.fill f15 = [r2],32 br.ret.sptk.many rp END(ia64_load_scratch_fpregs) +EXPORT_SYMBOL(ia64_load_scratch_fpregs)
arch/ia64/kernel/setup.c +4 -0
@@ -71,7 +71,11 @@ EXPORT_SYMBOL(__per_cpu_offset);#endif DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info); +EXPORT_SYMBOL (ia64_cpu_info); DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); +#ifdef CONFIG_SMP +EXPORT_SYMBOL (local_per_cpu_offset); +#endif unsigned long ia64_cycles_per_usec;struct ia64_boot_param *ia64_boot_param;struct screen_info screen_info;
arch/ia64/lib/clear_page.S +2 -0
@@ -11,6 +11,7 @@ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #ifdef CONFIG_ITANIUM # define L3_LINE_SIZE 64 // Itanium L3 line size
@@ -74,3 +75,4 @@ GLOBAL_ENTRY(clear_page) mov ar.lc = saved_lc // restore lc br.ret.sptk.many rp END(clear_page) +EXPORT_SYMBOL(clear_page)
arch/ia64/lib/clear_user.S +2 -0
@@ -12,6 +12,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // arguments
@@ -207,3 +208,4 @@ GLOBAL_ENTRY(__do_clear_user) mov ar.lc=saved_lc br.ret.sptk.many rp END(__do_clear_user) +EXPORT_SYMBOL(__do_clear_user)
arch/ia64/lib/copy_page.S +2 -0
@@ -16,6 +16,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define PIPE_DEPTH 3 #define EPI p[PIPE_DEPTH-1]
@@ -96,3 +97,4 @@ GLOBAL_ENTRY(copy_page) mov ar.lc=saved_lc br.ret.sptk.many rp END(copy_page) +EXPORT_SYMBOL(copy_page)
arch/ia64/lib/copy_page_mck.S +2 -0
@@ -61,6 +61,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define PREFETCH_DIST 8 // McKinley sustains 16 outstanding L2 misses (8 ld, 8 st)
@@ -183,3 +184,4 @@ GLOBAL_ENTRY(copy_page) mov pr = saved_pr, -1 br.ret.sptk.many rp END(copy_page) +EXPORT_SYMBOL(copy_page)
arch/ia64/lib/copy_user.S +2 -0
@@ -30,6 +30,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // Tuneable parameters
@@ -608,3 +609,4 @@ GLOBAL_ENTRY(__copy_user) mov ar.pfs=saved_pfs br.ret.sptk.many rp END(__copy_user) +EXPORT_SYMBOL(__copy_user)
arch/ia64/lib/flush.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> /*
@@ -60,6 +61,7 @@ GLOBAL_ENTRY(flush_icache_range) mov ar.lc=r3 // restore ar.lc br.ret.sptk.many rp END(flush_icache_range) +EXPORT_SYMBOL_GPL(flush_icache_range) /* * clflush_cache_range(start,size)
arch/ia64/lib/idiv32.S +2 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> #ifdef MODULO # define OP mod
@@ -81,3 +82,4 @@ GLOBAL_ENTRY(NAME) getf.sig r8 = f6 // transfer result to result register br.ret.sptk.many rp END(NAME) +EXPORT_SYMBOL(NAME)
arch/ia64/lib/idiv64.S +2 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> #ifdef MODULO # define OP mod
@@ -78,3 +79,4 @@ GLOBAL_ENTRY(NAME) getf.sig r8 = f11 // transfer result to result register br.ret.sptk.many rp END(NAME) +EXPORT_SYMBOL(NAME)
arch/ia64/lib/ip_fast_csum.S +3 -0
@@ -13,6 +13,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> /* * Since we know that most likely this function is called with buf aligned
@@ -92,6 +93,7 @@ GLOBAL_ENTRY(ip_fast_csum) mov b0=r34 br.ret.sptk.many b0 END(ip_fast_csum) +EXPORT_SYMBOL(ip_fast_csum) GLOBAL_ENTRY(csum_ipv6_magic) ld4 r20=[in0],4
@@ -142,3 +144,4 @@ GLOBAL_ENTRY(csum_ipv6_magic) andcm r8=r9,r8 br.ret.sptk.many b0 END(csum_ipv6_magic) +EXPORT_SYMBOL(csum_ipv6_magic)
arch/ia64/lib/memcpy.S +2 -0
@@ -14,6 +14,7 @@ * David Mosberger-Tang <[email protected]> */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(memcpy)
@@ -299,3 +300,4 @@ GLOBAL_ENTRY(memcpy) COPY(56, 0) END(memcpy) +EXPORT_SYMBOL(memcpy)
arch/ia64/lib/memcpy_mck.S +3 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define EK(y...) EX(y)
@@ -78,6 +79,7 @@ GLOBAL_ENTRY(memcpy) br.cond.sptk .common_code ;; END(memcpy) +EXPORT_SYMBOL(memcpy) GLOBAL_ENTRY(__copy_user) .prologue // check dest alignment
@@ -664,3 +666,4 @@ EK(.ex_handler, (p17) st8 [dst1]=r39,8); \ /* end of McKinley specific optimization */ END(__copy_user) +EXPORT_SYMBOL(__copy_user)
arch/ia64/lib/memset.S +2 -0
@@ -18,6 +18,7 @@ to get peak speed when value = 0. */ #include <asm/asmmacro.h> +#include <asm/export.h> #undef ret #define dest in0
@@ -360,3 +361,4 @@ GLOBAL_ENTRY(memset) br.ret.sptk.many rp } END(memset) +EXPORT_SYMBOL(memset)
arch/ia64/lib/strlen.S +2 -0
@@ -17,6 +17,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // //
@@ -190,3 +191,4 @@ GLOBAL_ENTRY(strlen) mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what br.ret.sptk.many rp // end of successful recovery code END(strlen) +EXPORT_SYMBOL(strlen)
arch/ia64/lib/strlen_user.S +2 -0
@@ -16,6 +16,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // int strlen_user(char *)
@@ -196,3 +197,4 @@ GLOBAL_ENTRY(__strlen_user) mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what br.ret.sptk.many rp END(__strlen_user) +EXPORT_SYMBOL(__strlen_user)
arch/ia64/lib/strncpy_from_user.S +2 -0
@@ -17,6 +17,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(__strncpy_from_user) alloc r2=ar.pfs,3,0,0,0
@@ -42,3 +43,4 @@ GLOBAL_ENTRY(__strncpy_from_user) [.Lexit:] br.ret.sptk.many rp END(__strncpy_from_user) +EXPORT_SYMBOL(__strncpy_from_user)
arch/ia64/lib/strnlen_user.S +2 -0
@@ -13,6 +13,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(__strnlen_user) .prologue
@@ -43,3 +44,4 @@ GLOBAL_ENTRY(__strnlen_user) mov ar.lc=r16 // restore ar.lc br.ret.sptk.many rp END(__strnlen_user) +EXPORT_SYMBOL(__strnlen_user)
arch/ia64/lib/xor.S +5 -0
@@ -14,6 +14,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(xor_ia64_2) .prologue
@@ -51,6 +52,7 @@ GLOBAL_ENTRY(xor_ia64_2) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_2) +EXPORT_SYMBOL(xor_ia64_2) GLOBAL_ENTRY(xor_ia64_3) .prologue
@@ -91,6 +93,7 @@ GLOBAL_ENTRY(xor_ia64_3) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_3) +EXPORT_SYMBOL(xor_ia64_3) GLOBAL_ENTRY(xor_ia64_4) .prologue
@@ -134,6 +137,7 @@ GLOBAL_ENTRY(xor_ia64_4) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_4) +EXPORT_SYMBOL(xor_ia64_4) GLOBAL_ENTRY(xor_ia64_5) .prologue
@@ -182,3 +186,4 @@ GLOBAL_ENTRY(xor_ia64_5) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_5) +EXPORT_SYMBOL(xor_ia64_5)
Signature · 1 line
2.1.4
PATCH 11/12 unify 32bit and 64bit string.h
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/sparc/include/asm/string.h | 34 +++++++++++++++++++++++ arch/sparc/include/asm/string_32.h | 56 -------------------------------------- arch/sparc/include/asm/string_64.h | 44 ------------------------------ arch/sparc/lib/memcpy.S | 5 ---- 4 files changed, 34 insertions(+), 105 deletions(-)
arch/sparc/include/asm/string.h +34 -0
@@ -5,4 +5,38 @@#else #include <asm/string_32.h> #endif + +/* First the mem*() things. */ +#define __HAVE_ARCH_MEMMOVE +void *memmove (void *,const void *,__kernel_size_t ); + +#define __HAVE_ARCH_MEMCPY +#define memcpy (t, f, n) __builtin_memcpy(t, f, n) + +#define __HAVE_ARCH_MEMSET +#define memset (s, c, count) __builtin_memset(s, c, count) + +#define __HAVE_ARCH_MEMSCAN + +#define memscan (__arg0, __char, __arg2) \ +({ \ + void *__memscan_zero(void *, size_t); \ + void *__memscan_generic(void *, int, size_t); \ + void *__retval, *__addr = (__arg0); \ + size_t __size = (__arg2); \ + \ + if(__builtin_constant_p(__char) && !(__char)) \ + __retval = __memscan_zero(__addr, __size); \ + else \ + __retval = __memscan_generic(__addr, (__char), __size); \ + \ + __retval; \ +}) + +#define __HAVE_ARCH_MEMCMP +int memcmp (const void *,const void *,__kernel_size_t ); + +#define __HAVE_ARCH_STRNCMP +int strncmp (const char *,const char *,__kernel_size_t ); +#endif
arch/sparc/include/asm/string_32.h +0 -56
60 lines not on this page · raw message
arch/sparc/include/asm/string_64.h +0 -44
54 lines not on this page · raw message
arch/sparc/lib/memcpy.S +0 -5
@@ -141,11 +141,6 @@ x: retl nop ! Only bcopy returns here and it retuns void... -#ifdef __KERNEL__ -FUNC(amemmove) -FUNC(__memmove) -EXPORT_SYMBOL(__memmove) -#endif FUNC(memmove) EXPORT_SYMBOL(memmove) cmp %o0, %o1
Signature · 1 line
2.1.4
Re: [PATCH 11/12] [sparc] unify 32bit and 64bit string.h
From: Al Viro <[email protected]>
Date: Fri, 29 Jan 2016 19:18:33 +0000
Quoted 3 lines
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>
PATCH 12/12 sparc32: debride memcpy.S a bit
In reply to Al ViroFrom: Al Viro <[email protected]>
unreachable code, unused macros...
--- arch/sparc/lib/memcpy.S | 79 ------------------------------------------------- 1 file changed, 79 deletions(-)
arch/sparc/lib/memcpy.S +0 -79
@@ -59,88 +59,9 @@ x: stb %t0, [%dst - (offset) - 0x02]; \ stb %t1, [%dst - (offset) - 0x01]; -/* Both these macros have to start with exactly the same insn */ -#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \ - ldd [%src - (offset) - 0x20], %t0; \ - ldd [%src - (offset) - 0x18], %t2; \ - ldd [%src - (offset) - 0x10], %t4; \ - ldd [%src - (offset) - 0x08], %t6; \ - st %t0, [%dst - (offset) - 0x20]; \ - st %t1, [%dst - (offset) - 0x1c]; \ - st %t2, [%dst - (offset) - 0x18]; \ - st %t3, [%dst - (offset) - 0x14]; \ - st %t4, [%dst - (offset) - 0x10]; \ - st %t5, [%dst - (offset) - 0x0c]; \ - st %t6, [%dst - (offset) - 0x08]; \ - st %t7, [%dst - (offset) - 0x04]; - -#define RMOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \ - ldd [%src - (offset) - 0x20], %t0; \ - ldd [%src - (offset) - 0x18], %t2; \ - ldd [%src - (offset) - 0x10], %t4; \ - ldd [%src - (offset) - 0x08], %t6; \ - std %t0, [%dst - (offset) - 0x20]; \ - std %t2, [%dst - (offset) - 0x18]; \ - std %t4, [%dst - (offset) - 0x10]; \ - std %t6, [%dst - (offset) - 0x08]; - -#define RMOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - st %t0, [%dst + (offset) + 0x00]; \ - st %t1, [%dst + (offset) + 0x04]; \ - st %t2, [%dst + (offset) + 0x08]; \ - st %t3, [%dst + (offset) + 0x0c]; - -#define RMOVE_SHORTCHUNK(src, dst, offset, t0, t1) \ - ldub [%src + (offset) + 0x00], %t0; \ - ldub [%src + (offset) + 0x01], %t1; \ - stb %t0, [%dst + (offset) + 0x00]; \ - stb %t1, [%dst + (offset) + 0x01]; - -#define SMOVE_CHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, prev, shil, shir, offset2) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - srl %t0, shir, %t5; \ - srl %t1, shir, %t6; \ - sll %t0, shil, %t0; \ - or %t5, %prev, %t5; \ - sll %t1, shil, %prev; \ - or %t6, %t0, %t0; \ - srl %t2, shir, %t1; \ - srl %t3, shir, %t6; \ - sll %t2, shil, %t2; \ - or %t1, %prev, %t1; \ - std %t4, [%dst + (offset) + (offset2) - 0x04]; \ - std %t0, [%dst + (offset) + (offset2) + 0x04]; \ - sll %t3, shil, %prev; \ - or %t6, %t2, %t4; - -#define SMOVE_ALIGNCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, prev, shil, shir, offset2) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - srl %t0, shir, %t4; \ - srl %t1, shir, %t5; \ - sll %t0, shil, %t6; \ - or %t4, %prev, %t0; \ - sll %t1, shil, %prev; \ - or %t5, %t6, %t1; \ - srl %t2, shir, %t4; \ - srl %t3, shir, %t5; \ - sll %t2, shil, %t6; \ - or %t4, %prev, %t2; \ - sll %t3, shil, %prev; \ - or %t5, %t6, %t3; \ - std %t0, [%dst + (offset) + (offset2) + 0x00]; \ - std %t2, [%dst + (offset) + (offset2) + 0x08]; - .text .align 4 -0: - retl - nop ! Only bcopy returns here and it retuns void... - FUNC(memmove) EXPORT_SYMBOL(memmove) cmp %o0, %o1
Signature · 1 line
2.1.4
Re: [PATCH 12/12] sparc32: debride memcpy.S a bit
From: Al Viro <[email protected]>
Date: Fri, 29 Jan 2016 19:18:34 +0000
Quoted 5 lines
From: Al Viro <[email protected]>
unreachable code, unused macros...
Signed-off-by Al Viro <[email protected]>
RFC PATCH v2 1/1 allowing exports in *.S
In reply to Al ViroQuoted 10 lines · Al Viro
The policy wrt exports right now is "put it next to the definition
of object being exported, unless it's in assembler". The reasons for having an export near the definition are obvious - it's easier to keep things in sync that way, the fact that function can be called by modules is obvious without grepping through the entire tree, etc.The major exception is for things defined in assembler - exports
of those are kept inarch/*/*/*ksyms*.c. The reason is thatEXPORT_SYMBOLand friends can't be used from assembler; all the reasons to keep them with definitions still apply, but we simply can't do that.
[snip]
Quoted 9 lines
The first patch allows to export safely from lib-*, the second one adds
asm-generic/export.h, usable as-is for almost all architectures. The only exceptions are 64bit x86, which wants unusually strong alignment for structkernel_symboland m68k, which wants only 16bit alignements for pointers (and for structkernel_symbolas well). Such an architecture can addasm/export.hthat defines a couple of macros (KSYM_ALIGNandKCRC_ALIGN) and includes <asm-generic/export.h>. Normally you only need to add generic-y +=export.hto asm/Kbuild; of course, if you don't put any exports into asm files, you don't need to do anything at all.
Turns out that I'd missed another oddity on some architectures. ia64 and parisc64 compile the kernel with pointers to functions actually pointing to function descriptors and, unlike ppc64, need to have that spelled out in asm literals (fptr@(foo) on ia64 and P%foo on parisc; foo itself would refer to the function entry point, while on ppc64 foo would refer to descriptor and .foo - to the entry point).
First of all, it means that exporting foo requires knowing whether it's a function or not; C compiler has that information, but for assembler we have to supply it manually. Solution: EXPORT_DATA_SYMBOL{,_GPL} for exporting non-functions (they are seriously outnumbered by function exports, so I kept the EXPORT_SYMBOL{,_GPL} for those). On normal architectures either can be used, on ia64 and parisc we need to make sure to use the right one.
Another thing is that we need to know how to get from function name to the descriptor for such architectures. That's handled by defining KSYM_FUNC(name) in asm/export.h.
Other changes since the previous posting:
* unbreak linking of arch/ia64/hp/sim/boot/bootloader; it ended
up picking everything in arch/ia64/lib that contained some exports, and some of those require stuff from the kernel proper. Easy to fix, fortunately.
* fix kbuild-related braino that ended up with the lib-ksyms.o
rebuilt for no reason.
* fixes for assorted brainos picked by buildbot folded in.
* ACKs applied (with the exception of the second patch in series -asm-generic/export.h differences are considerable and I don't think that ACK to the original variant automatically applies to the new one).
Quoted 4 lines
Of course, we don't have to move all exports at once (or move them at all); it's not a flagday conversion. The whole series so far can be picked at
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.gitwork.asm-exports; I'll post individual patches in followups.
If everyone (including kbuild folks) is OK with the arch-independent parts of this series, I'd like to put the first two commits into never-rebased branch so that individual architecture trees could pull that and apply the corresponding arch-dependent stuff on top of that; going that way would minimize the amount of conflicts that would need to be dealt with during this cycle, but it obviously depends on those first two commits being acceptable to everyone. Please, review and comment.
Shortlog:
Al Viro (13):
[kbuild] handle exports in lib-y objects reliably EXPORT_SYMBOL() for asm
x86: move exports to actual definitions
alpha: move exports to actual definitions
m68k: move exports to definitions
s390: move exports to definitions
arm: move exports to definitions
ppc: move exports to definitions
ppc: get rid of unreachable abs() implementation
sparc: move exports to definitions [sparc] unify 32bit and 64bit string.h
sparc32: debride memcpy.S a bit
ia64: move exports to definitions
Diffstat:
arch/alpha/include/asm/Kbuild | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/alpha_ksyms.c | 102 ------------------- arch/alpha/kernel/machvec_impl.h | 6 +- arch/alpha/kernel/setup.c | 1 + arch/alpha/lib/callback_srm.S | 5 + arch/alpha/lib/checksum.c | 3 + arch/alpha/lib/clear_page.S | 3 +- arch/alpha/lib/clear_user.S | 2 + arch/alpha/lib/copy_page.S | 3 +- arch/alpha/lib/copy_user.S | 3 + arch/alpha/lib/csum_ipv6_magic.S | 2 + arch/alpha/lib/csum_partial_copy.c | 2 + arch/alpha/lib/dec_and_lock.c | 2 + arch/alpha/lib/divide.S | 3 + arch/alpha/lib/ev6-clear_page.S | 3 +- arch/alpha/lib/ev6-clear_user.S | 3 +- arch/alpha/lib/ev6-copy_page.S | 3 +- arch/alpha/lib/ev6-copy_user.S | 3 +- arch/alpha/lib/ev6-csum_ipv6_magic.S | 2 + arch/alpha/lib/ev6-divide.S | 3 + arch/alpha/lib/ev6-memchr.S | 3 +- arch/alpha/lib/ev6-memcpy.S | 3 +- arch/alpha/lib/ev6-memset.S | 7 +- arch/alpha/lib/ev67-strcat.S | 3 +- arch/alpha/lib/ev67-strchr.S | 3 +- arch/alpha/lib/ev67-strlen.S | 3 +- arch/alpha/lib/ev67-strncat.S | 3 +- arch/alpha/lib/ev67-strrchr.S | 3 +- arch/alpha/lib/fpreg.c | 7 ++ arch/alpha/lib/memchr.S | 3 +- arch/alpha/lib/memcpy.c | 5 +- arch/alpha/lib/memmove.S | 3 +- arch/alpha/lib/memset.S | 7 +- arch/alpha/lib/strcat.S | 2 + arch/alpha/lib/strchr.S | 3 +- arch/alpha/lib/strcpy.S | 3 +- arch/alpha/lib/strlen.S | 3 +- arch/alpha/lib/strncat.S | 3 +- arch/alpha/lib/strncpy.S | 3 +- arch/alpha/lib/strrchr.S | 3 +- arch/arm/include/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ---------------------------------- arch/arm/kernel/entry-ftrace.S | 3 + arch/arm/kernel/head.S | 3 + arch/arm/kernel/smccc-call.S | 3 + arch/arm/lib/ashldi3.S | 3 + arch/arm/lib/ashrdi3.S | 3 + arch/arm/lib/bitops.h | 5 + arch/arm/lib/bswapsdi2.S | 3 + arch/arm/lib/clear_user.S | 4 + arch/arm/lib/copy_from_user.S | 2 + arch/arm/lib/copy_page.S | 2 + arch/arm/lib/copy_to_user.S | 4 + arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 + arch/arm/lib/csumpartialcopy.S | 1 + arch/arm/lib/csumpartialcopygeneric.S | 2 + arch/arm/lib/csumpartialcopyuser.S | 1 + arch/arm/lib/delay.c | 2 + arch/arm/lib/div64.S | 2 + arch/arm/lib/findbit.S | 9 ++ arch/arm/lib/getuser.S | 9 ++ arch/arm/lib/io-readsb.S | 2 + arch/arm/lib/io-readsl.S | 2 + arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 + arch/arm/lib/io-writesb.S | 2 + arch/arm/lib/io-writesl.S | 2 + arch/arm/lib/io-writesw-armv3.S | 2 + arch/arm/lib/io-writesw-armv4.S | 2 + arch/arm/lib/lib1funcs.S | 9 ++ arch/arm/lib/lshrdi3.S | 3 + arch/arm/lib/memchr.S | 2 + arch/arm/lib/memcpy.S | 3 + arch/arm/lib/memmove.S | 2 + arch/arm/lib/memset.S | 3 + arch/arm/lib/memzero.S | 2 + arch/arm/lib/muldi3.S | 3 + arch/arm/lib/putuser.S | 5 + arch/arm/lib/strchr.S | 2 + arch/arm/lib/strrchr.S | 2 + arch/arm/lib/uaccess_with_memcpy.c | 3 + arch/arm/lib/ucmpdi2.S | 3 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ---- arch/arm/mach-imx/ssi-fiq.S | 7 +- arch/ia64/hp/sim/boot/Makefile | 2 +- arch/ia64/include/asm/export.h | 3 + arch/ia64/kernel/entry.S | 3 + arch/ia64/kernel/esi_stub.S | 2 + arch/ia64/kernel/head.S | 2 + arch/ia64/kernel/ia64_ksyms.c | 94 +---------------- arch/ia64/kernel/ivt.S | 2 + arch/ia64/kernel/pal.S | 7 ++ arch/ia64/kernel/setup.c | 4 + arch/ia64/lib/Makefile | 8 +- arch/ia64/lib/clear_page.S | 2 + arch/ia64/lib/clear_user.S | 2 + arch/ia64/lib/copy_page.S | 2 + arch/ia64/lib/copy_page_mck.S | 2 + arch/ia64/lib/copy_user.S | 2 + arch/ia64/lib/flush.S | 2 + arch/ia64/lib/idiv32.S | 2 + arch/ia64/lib/idiv64.S | 2 + arch/ia64/lib/ip_fast_csum.S | 3 + arch/ia64/lib/memcpy.S | 2 + arch/ia64/lib/memcpy_mck.S | 3 + arch/ia64/lib/memset.S | 2 + arch/ia64/lib/strlen.S | 2 + arch/ia64/lib/strlen_user.S | 2 + arch/ia64/lib/strncpy_from_user.S | 2 + arch/ia64/lib/strnlen_user.S | 2 + arch/ia64/lib/xor.S | 5 + arch/m68k/include/asm/export.h | 3 + arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/m68k_ksyms.c | 32 ------ arch/m68k/lib/ashldi3.c | 4 + arch/m68k/lib/ashrdi3.c | 4 + arch/m68k/lib/divsi3.S | 3 + arch/m68k/lib/lshrdi3.c | 4 + arch/m68k/lib/modsi3.S | 3 + arch/m68k/lib/muldi3.c | 4 + arch/m68k/lib/mulsi3.S | 4 +- arch/m68k/lib/udivsi3.S | 4 +- arch/m68k/lib/umodsi3.S | 4 +- arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/kernel/Makefile | 4 - arch/powerpc/kernel/entry_32.S | 2 + arch/powerpc/kernel/entry_64.S | 3 + arch/powerpc/kernel/epapr_hcalls.S | 2 + arch/powerpc/kernel/fpu.S | 3 + arch/powerpc/kernel/head_32.S | 5 + arch/powerpc/kernel/head_40x.S | 2 + arch/powerpc/kernel/head_44x.S | 2 + arch/powerpc/kernel/head_64.S | 2 + arch/powerpc/kernel/head_8xx.S | 2 + arch/powerpc/kernel/head_fsl_booke.S | 2 + arch/powerpc/kernel/misc.S | 2 + arch/powerpc/kernel/misc_32.S | 18 ++-- arch/powerpc/kernel/misc_64.S | 4 + arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/pci_32.c | 2 + arch/powerpc/kernel/ppc_ksyms.c | 39 -------- arch/powerpc/kernel/ppc_ksyms_32.c | 61 ------------ arch/powerpc/kernel/setup_32.c | 6 ++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/kernel/vector.S | 4 + arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/checksum_32.S | 4 + arch/powerpc/lib/checksum_64.S | 4 + arch/powerpc/lib/copy_32.S | 5 + arch/powerpc/lib/copypage_64.S | 2 + arch/powerpc/lib/copyuser_64.S | 2 + arch/powerpc/lib/hweight_64.S | 5 + arch/powerpc/lib/mem_64.S | 3 + arch/powerpc/lib/memcmp_64.S | 2 + arch/powerpc/lib/memcpy_64.S | 2 + arch/powerpc/lib/ppc_ksyms.c | 35 ------- arch/powerpc/lib/string.S | 10 ++ arch/powerpc/lib/string_64.S | 2 + arch/powerpc/mm/hash_low_32.S | 3 + arch/powerpc/sysdev/dcr-low.S | 3 + arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++ arch/s390/kernel/mcount.S | 3 + arch/s390/kernel/s390_ksyms.c | 15 --- arch/s390/lib/mem.S | 3 + arch/sparc/include/asm/Kbuild | 1 + arch/sparc/include/asm/string.h | 34 +++++++ arch/sparc/include/asm/string_32.h | 56 ----------- arch/sparc/include/asm/string_64.h | 44 -------- arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/entry.S | 3 + arch/sparc/kernel/head_32.S | 3 + arch/sparc/kernel/head_64.S | 7 +- arch/sparc/kernel/helpers.S | 2 + arch/sparc/kernel/hvcalls.S | 4 + arch/sparc/kernel/sparc_ksyms.c | 12 +++ arch/sparc/kernel/sparc_ksyms_32.c | 31 ------ arch/sparc/kernel/sparc_ksyms_64.c | 52 ---------- arch/sparc/lib/Makefile | 1 - arch/sparc/lib/U1memcpy.S | 2 + arch/sparc/lib/VISsave.S | 2 + arch/sparc/lib/ashldi3.S | 2 + arch/sparc/lib/ashrdi3.S | 2 + arch/sparc/lib/atomic_64.S | 10 +- arch/sparc/lib/bitops.S | 7 ++ arch/sparc/lib/blockops.S | 3 + arch/sparc/lib/bzero.S | 4 + arch/sparc/lib/checksum_32.S | 3 + arch/sparc/lib/checksum_64.S | 2 + arch/sparc/lib/clear_page.S | 3 + arch/sparc/lib/copy_in_user.S | 2 + arch/sparc/lib/copy_page.S | 2 + arch/sparc/lib/copy_user.S | 2 + arch/sparc/lib/csum_copy.S | 3 + arch/sparc/lib/divdi3.S | 2 + arch/sparc/lib/ffs.S | 3 + arch/sparc/lib/hweight.S | 5 + arch/sparc/lib/ipcsum.S | 2 + arch/sparc/lib/ksyms.c | 165 ------------------------------ arch/sparc/lib/locks.S | 5 + arch/sparc/lib/lshrdi3.S | 2 + arch/sparc/lib/mcount.S | 2 + arch/sparc/lib/memcmp.S | 2 + arch/sparc/lib/memcpy.S | 86 +--------------- arch/sparc/lib/memmove.S | 2 + arch/sparc/lib/memscan_32.S | 4 + arch/sparc/lib/memscan_64.S | 4 + arch/sparc/lib/memset.S | 3 + arch/sparc/lib/muldi3.S | 2 + arch/sparc/lib/strlen.S | 2 + arch/sparc/lib/strncmp_32.S | 2 + arch/sparc/lib/strncmp_64.S | 2 + arch/sparc/lib/xor.S | 9 ++ arch/x86/entry/entry_32.S | 2 + arch/x86/entry/entry_64.S | 2 + arch/x86/entry/thunk_32.S | 3 + arch/x86/entry/thunk_64.S | 3 + arch/x86/include/asm/export.h | 4 + arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/head_32.S | 2 + arch/x86/kernel/head_64.S | 3 + arch/x86/kernel/i386_ksyms_32.c | 44 -------- arch/x86/kernel/mcount_64.S | 2 + arch/x86/kernel/x8664_ksyms_64.c | 79 --------------- arch/x86/lib/checksum_32.S | 3 + arch/x86/lib/clear_page_64.S | 2 + arch/x86/lib/cmpxchg8b_emu.S | 2 + arch/x86/lib/copy_page_64.S | 2 + arch/x86/lib/copy_user_64.S | 8 ++ arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/getuser.S | 5 + arch/x86/lib/memcpy_64.S | 3 + arch/x86/lib/memmove_64.S | 3 + arch/x86/lib/memset_64.S | 3 + arch/x86/lib/putuser.S | 5 + arch/x86/lib/strstr_32.c | 3 +- arch/x86/um/Makefile | 2 +- arch/x86/um/checksum_32.S | 2 + arch/x86/um/ksyms.c | 13 --- include/asm-generic/export.h | 66 ++++++++++++ scripts/Makefile.build | 20 ++++ 246 files changed, 769 insertions(+), 1215 deletions(-) delete mode 100644 arch/alpha/kernel/alpha_ksyms.c delete mode 100644 arch/arm/kernel/armksyms.c delete mode 100644 arch/arm/mach-imx/ssi-fiq-ksym.c create mode 100644 arch/ia64/include/asm/export.h create mode 100644 arch/m68k/include/asm/export.h delete mode 100644 arch/m68k/kernel/m68k_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms_32.c delete mode 100644 arch/powerpc/lib/ppc_ksyms.c delete mode 100644 arch/s390/kernel/s390_ksyms.c create mode 100644 arch/sparc/kernel/sparc_ksyms.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_32.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_64.c delete mode 100644 arch/sparc/lib/ksyms.c create mode 100644 arch/x86/include/asm/export.h delete mode 100644 arch/x86/kernel/i386_ksyms_32.c delete mode 100644 arch/x86/kernel/x8664_ksyms_64.c delete mode 100644 arch/x86/um/ksyms.c create mode 100644 include/asm-generic/export.h
PATCH v2 1/13 handle exports in lib-y objects reliably
From: Al Viro <[email protected]>
Collect the symbols exported by anything that goes into lib.a and add an empty object (lib-exports.o) with explicit undefs for each of those to obj-y.
That allows to relax the rules regarding the use of exports in lib-* objects - right now an object with export can be in lib-* only if we are guaranteed that there always will be users in built-in parts of the tree, otherwise it needs to be in obj-*. As the result, we have an unholy mix of lib- and obj- in lib/Makefile and (especially) in arch/*/lib/Makefile. Moreover, a change in generic part of the kernel can lead to mysteriously missing exports on some configs. With this change we don't have to worry about that anymore.
One side effect is that built-in.o now pulls everything with exports from the corresponding lib.a (if such exists). That's exactly what we want for linking vmlinux and fortunately it's almost the only thing built-in.o is used in. arch/ia64/hp/sim/boot/bootloader is the only exception and it's easy to get rid of now - just turn everything in arch/ia64/lib into lib-* and don't bother with arch/ia64/lib/built-in.o anymore.
--- arch/ia64/hp/sim/boot/Makefile | 2 +- arch/ia64/lib/Makefile | 8 +++----- scripts/Makefile.build | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-)
arch/ia64/hp/sim/boot/Makefile +1 -1
@@ -33,5 +33,5 @@ $(obj)/vmlinux.bin: vmlinux FORCE LDFLAGS_bootloader = -static -T $(obj)/bootloader: $(src)/bootloader.lds $(obj)/bootloader.o $(obj)/boot_head.o $(obj)/fw-emu.o \ - lib/lib.a arch/ia64/lib/built-in.o arch/ia64/lib/lib.a FORCE + lib/lib.a arch/ia64/lib/lib.a FORCE $(call if_changed,ld)
arch/ia64/lib/Makefile +3 -5
@@ -2,17 +2,15 @@ # Makefile for ia64-specific library routines.. # -obj-y := io.o - -lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ +lib-y := io.o __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ __divdi3.o __udivdi3.o __moddi3.o __umoddi3.o \ checksum.o clear_page.o csum_partial_copy.o \ clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \ flush.o ip_fast_csum.o do_csum.o \ memset.o strlen.o xor.o -obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o -obj-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o +lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o +lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o lib-$(CONFIG_PERFMON) += carta_random.o AFLAGS___divdi3.o =
scripts/Makefile.build +20 -0
@@ -81,6 +81,7 @@ endif ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),) lib-target := $(obj)/lib.a +obj-y += $(obj)/lib-ksyms.o endif ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
@@ -363,6 +364,25 @@ $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) targets += $(lib-target) + +dummy-object = $(obj)/__lib_exports.o +ksyms-lds = $(obj)/lib-ksyms.lds +ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX +ref_prefix = EXTERN(_ +else +ref_prefix = EXTERN( +endif + +quiet_cmd_export_list = EXPORTS $@ +cmd_export_list = $(OBJDUMP) -h $< | \ + sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\ + rm -f $(dummy-object);\ + $(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\ + $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\ + rm $(dummy-object) $(ksyms-lds) + +$(obj)/lib-ksyms.o: $(lib-target) FORCE + $(call if_changed,export_list) endif #
Signature · 1 line
2.1.4
Re: [PATCH v2 01/13] [kbuild] handle exports in lib-y objects reliably
Dne 3.2.2016 v 22:20 Al Viro napsal(a):
Quoted 24 lines
From: Al Viro <[email protected]>
Collect the symbols exported by anything that goes into lib.a and add an empty object (lib-exports.o) with explicit undefs for each of those to obj-y.
That allows to relax the rules regarding the use of exports in lib-* objects - right now an object with export can be in lib-* only if we are guaranteed that there always will be users in built-in parts of the tree, otherwise it needs to be in obj-*. As the result, we have an unholy mix of lib- and obj- in lib/Makefile and (especially) in
arch/*/lib/Makefile. Moreover, a change in generic part of the kernel can lead to mysteriously missing exports on some configs. With this change we don't have to worry about that anymore.One side effect is that built-in.o now pulls everything with exports from the corresponding lib.a (if such exists). That's exactly what we want for linking vmlinux and fortunately it's almost the only thing built-in.o is used in.
arch/ia64/hp/sim/boot/bootloaderis the only exception and it's easy to get rid of now - just turn everything inarch/ia64/libinto lib-* and don't bother witharch/ia64/lib/built-in.oanymore.
Quoted 6 lines
Signed-off-by Al Viro <[email protected]>--- arch/ia64/hp/sim/boot/Makefile | 2 +- arch/ia64/lib/Makefile | 8 +++----- scripts/Makefile.build | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-)
Sorry for the delay.
Quoted 11 lines
scripts/Makefile.build +1
-0@@ -81,6 +81,7 @@ endif ifneq ($(strip $(lib-y) $(lib-m) $(lib-)),) lib-target := $(obj)/lib.a +obj-y += $(obj)/lib-ksyms.o endif ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
scripts/Makefile.build $(lib-target): $(lib-y) FORCE · line 369
Quoted 6 lines
scripts/Makefile.build +3
-0@@ -363,6 +364,25 @@ $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) targets += $(lib-target) + +dummy-object = $(obj)/__lib_exports.o +ksyms-lds = $(obj)/lib-ksyms.lds
Just a really minor nitpick (no need to resend just because of it): We typically use dotfiles for temporary stuff, e.g.
dummy-object = $(obj)/.lib_exports.o
ksyms-lds = $(dot-target).lds
Michal
Re: [PATCH v2 01/13] [kbuild] handle exports in lib-y objects reliably
Quoted 11 lines · Michal Marek
Acked-by Michal Marek <[email protected]>Sorry for the delay.
scripts/Makefile.build $(lib-target): $(lib-y) FORCE · line 369
Quoted 2 lines
scripts/Makefile.build +2
-0+dummy-object = $(obj)/__lib_exports.o +ksyms-lds = $(obj)/lib-ksyms.ldsJust a really minor nitpick (no need to resend just because of it): We typically use dotfiles for temporary stuff, e.g.
dummy-object = $(obj)/.lib_exports.o
ksyms-lds = $(dot-target).lds
Folded and pushed...
PATCH v2 2/13 EXPORT_SYMBOL() for asm
In reply to Al ViroFrom: Al Viro <[email protected]>
Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add export.h to asm/Kbuild and start using <asm/export.h> from assembler. The rest needs to have their <asm/export.h> define everal macros and then explicitly include <asm-generic/export.h>
One area where the things might diverge from default is the alignment; normally it's 8 bytes on 64bit targets and 4 on 32bit ones, both for unsigned long and for struct kernel_symbol. Unfortunately, amd64 and m68k are unusual - m68k aligns to 2 bytes (for both) and amd64 aligns struct kernel_symbol to 16 bytes. For those we'll need asm/export.h to override the constants used by generic version - KSYM_ALIGN and KCRC_ALIGN for kernel_symbol and unsigned long resp. And no, __alignof__ would not do the trick - on amd64 __alignof__ of struct kernel_symbol is 8, not 16.
More serious source of unpleasantness is treatment of function descriptors on architectures that have those. Things like ppc64, parisc, ia64, etc. need more than the address of the first insn to call an arbitrary function. As the result, their representation of pointers to functions is not the typical "address of the entry point" - it's an address of a small static structure containing all the required information (including the entry point, of course). Sadly, the asm-side conventions differ in what the function name refers to - entry point or the function descriptor. On ppc64 we do the latter;
bar: .quad foo
is what void (*bar)(void) = foo; turns into and the rare places where we need to explicitly work with the label of entry point are dealt with as DOTSYM(foo). For our purposes it's ideal - generic macros are usable. However, parisc would have foo and P%foo used for label of entry point and address of the function descriptor and
bar: .long P%foo
woudl be used instead. ia64 goes similar to parisc in that respect,
except that there it's @fptr(foo) rather than P%foo. Such architectures need to define KSYM_FUNC that would turn a function name into whatever is needed to refer to function descriptor.
What's more, on such architectures we need to know whether we are exporting a function or an object - in assembler we have to tell that explicitly, to decide whether we want EXPORT_SYMBOL(foo) produce e.g.
__ksymtab_foo: .quad foo
or
__ksymtab_foo: .quad @fptr(foo)
For that reason we introduce EXPORT_DATA_SYMBOL{,_GPL}(), to be used for exports of data objects. On normal architectures it's the same thing as EXPORT_SYMBOL{,_GPL}(), but on parisc-like ones they differ and the right one needs to be used. Most of the exports are functions, so we keep EXPORT_SYMBOL for those...
--- include/asm-generic/export.h | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 include/asm-generic/export.h
include/asm-generic/export.h new file +66 -0
@@ -0,0 +1,66 @@ +#ifndef __ASM_GENERIC_EXPORT_H +#define __ASM_GENERIC_EXPORT_H + +#ifndef KSYM_FUNC +#define KSYM_FUNC(x) x +#endif +#ifdef CONFIG_64BIT +#define __put .quad +#ifndef KSYM_ALIGN +#define KSYM_ALIGN 8 +#endif +#ifndef KCRC_ALIGN +#define KCRC_ALIGN 8 +#endif +#else +#define __put .long +#ifndef KSYM_ALIGN +#define KSYM_ALIGN 4 +#endif +#ifndef KCRC_ALIGN +#define KCRC_ALIGN 4 +#endif +#endif + +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX +#define KSYM(name) _##name +#else +#define KSYM(name) name +#endif + +/* + * note on .section use: @progbits vs %progbits nastiness doesn't matter, + * since we immediately emit into those sections anyway. + */ +.macro __EXPORT_SYMBOL name,val,sec +#ifdef CONFIG_MODULES + .globl __ksymtab_\name + .section ___ksymtab\sec+\name,"a" + .balign KSYM_ALIGN +KSYM(__ksymtab_\name): + __put \val, KSYM(__kstrtab_\name) + .previous + .section __ksymtab_strings,"a" +KSYM(__kstrtab_\name): +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX + .asciz "_\name" +#else + .asciz "\name" +#endif + .previous +#ifdef CONFIG_MODVERSIONS + .section ___kcrctab\sec+\name,"a" + .balign KCRC_ALIGN +KSYM(__kcrctab_\name): + __put KSYM(__crc_\name) + .weak KSYM(__crc_\name) + .previous +#endif +#endif +.endm +#undef __put +#define EXPORT_SYMBOL(name) __EXPORT_SYMBOL name,KSYM_FUNC(KSYM(name)) +#define EXPORT_SYMBOL_GPL(name) __EXPORT_SYMBOL name,KSYM_FUNC(KSYM(name)),_gpl +#define EXPORT_DATA_SYMBOL(name) __EXPORT_SYMBOL name,KSYM(name) +#define EXPORT_DATA_SYMBOL_GPL(name) __EXPORT_SYMBOL name,KSYM(name),_gpl +#endif
Signature · 1 line
2.1.4
Re: [PATCH v2 02/13] EXPORT_SYMBOL() for asm
include/asm-generic/export.h line 37
Quoted 3 lines · Al Viro
+.macro
__EXPORT_SYMBOLname,val,secinclude/asm-generic/export.h new file +2
-0+#ifdef CONFIG_MODULES + .globl __ksymtab_\name
Should be .globl KSYM(__ksymtab_\name), to match the actual label in
Quoted 1 line
+KSYM(__ksymtab_\name):
Fix folded and pushed...
Re: [PATCH v2 02/13] EXPORT_SYMBOL() for asm
In reply to Al ViroQuoted 7 lines · Al Viro
From: Al Viro <[email protected]>
Add asm-usable variants of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL. This commit just adds the default implementation; most of the architectures can simply add
export.hto asm/Kbuild and start using <asm/export.h> from assembler. The rest needs to have their <asm/export.h> define everal macros and then explicitly include <asm-generic/export.h>
[...]
FYI, here's the needed changes to make it work with my autoksyms series. This is the asm/export.h version of http://lkml.org/lkml/2016/2/10/5.
include/asm-generic/export.h +20 -4
@@ -59,8 +59,24 @@ KSYM(__kcrctab_\name):#endif .endm#undef __put -#define EXPORT_SYMBOL (name) __EXPORT_SYMBOL name,KSYM_FUNC(KSYM(name)) -#define EXPORT_SYMBOL_GPL (name) __EXPORT_SYMBOL name,KSYM_FUNC(KSYM(name)),_gpl -#define EXPORT_DATA_SYMBOL (name) __EXPORT_SYMBOL name,KSYM(name) -#define EXPORT_DATA_SYMBOL_GPL (name) __EXPORT_SYMBOL name,KSYM(name),_gpl + +#ifdef CONFIG_TRIM_UNUSED_KSYMS +#include <linux/kconfig.h> +#include <generated/autoksyms.h> +#define ___EXPORT_SYMBOL (name, val, sec) \ + __cond_export_sym(name, val, sec, config_enabled(__KSYM_##name)) +#define __cond_export_sym (name, val, sec, conf) \ + ___cond_export_sym(name, val, sec, conf) +#define ___cond_export_sym (name, val, sec, enabled) \ + __cond_export_sym_##enabled(name, val, sec) +#define __cond_export_sym_1 (name, val, sec) __EXPORT_SYMBOL name, val, sec +#define __cond_export_sym_0 (name, val, sec)/* nothing */ +#else +#define ___EXPORT_SYMBOL (name, val, sec) __EXPORT_SYMBOL name, val, sec +#endif + +#define EXPORT_SYMBOL (name) ___EXPORT_SYMBOL(name,KSYM_FUNC(KSYM(name)),()) +#define EXPORT_SYMBOL_GPL (name) ___EXPORT_SYMBOL(name,KSYM_FUNC(KSYM(name)),_gpl) +#define EXPORT_DATA_SYMBOL (name) ___EXPORT_SYMBOL(name,KSYM(name),()) +#define EXPORT_DATA_SYMBOL_GPL (name) ___EXPORT_SYMBOL(name,KSYM(name),_gpl)#endif
PATCH v2 3/13 x86: move exports to actual definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/x86/entry/entry_32.S | 2 + arch/x86/entry/entry_64.S | 2 + arch/x86/entry/thunk_32.S | 3 ++ arch/x86/entry/thunk_64.S | 3 ++ arch/x86/include/asm/export.h | 4 ++ arch/x86/kernel/Makefile | 4 +- arch/x86/kernel/head_32.S | 2 + arch/x86/kernel/head_64.S | 3 ++ arch/x86/kernel/i386_ksyms_32.c | 44 ---------------------- arch/x86/kernel/mcount_64.S | 2 + arch/x86/kernel/x8664_ksyms_64.c | 79 ---------------------------------------- arch/x86/lib/checksum_32.S | 3 ++ arch/x86/lib/clear_page_64.S | 2 + arch/x86/lib/cmpxchg8b_emu.S | 2 + arch/x86/lib/copy_page_64.S | 2 + arch/x86/lib/copy_user_64.S | 8 ++++ arch/x86/lib/csum-partial_64.c | 1 + arch/x86/lib/getuser.S | 5 +++ arch/x86/lib/memcpy_64.S | 3 ++ arch/x86/lib/memmove_64.S | 3 ++ arch/x86/lib/memset_64.S | 3 ++ arch/x86/lib/putuser.S | 5 +++ arch/x86/lib/strstr_32.c | 3 +- arch/x86/um/Makefile | 2 +- arch/x86/um/checksum_32.S | 2 + arch/x86/um/ksyms.c | 13 ------- 26 files changed, 64 insertions(+), 141 deletions(-) create mode 100644 arch/x86/include/asm/export.h delete mode 100644 arch/x86/kernel/i386_ksyms_32.c delete mode 100644 arch/x86/kernel/x8664_ksyms_64.c delete mode 100644 arch/x86/um/ksyms.c
arch/x86/entry/entry_32.S +2 -0
@@ -44,6 +44,7 @@ #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> .section .entry.text, "ax"
@@ -865,6 +866,7 @@ trace: jmp ftrace_stub END(mcount) #endif /* CONFIG_DYNAMIC_FTRACE */ +EXPORT_SYMBOL(mcount) #endif /* CONFIG_FUNCTION_TRACER */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
arch/x86/entry/entry_64.S +2 -0
@@ -35,6 +35,7 @@ #include <asm/asm.h> #include <asm/smap.h> #include <asm/pgtable_types.h> +#include <asm/export.h> #include <linux/err.h> /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
@@ -854,6 +855,7 @@ gs_change: popfq ret END(native_load_gs_index) +EXPORT_SYMBOL(native_load_gs_index) _ASM_EXTABLE(gs_change, bad_gs) .section .fixup, "ax"
arch/x86/entry/thunk_32.S +3 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> #include <asm/asm.h> + #include <asm/export.h> /* put return address in eax (arg1) */ .macro THUNK name, func, put_ret_addr_in_eax=0
@@ -36,5 +37,7 @@ #ifdef CONFIG_PREEMPT THUNK ___preempt_schedule, preempt_schedule THUNK ___preempt_schedule_notrace, preempt_schedule_notrace + EXPORT_SYMBOL(___preempt_schedule) + EXPORT_SYMBOL(___preempt_schedule_notrace) #endif
arch/x86/entry/thunk_64.S +3 -0
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include "calling.h" #include <asm/asm.h> +#include <asm/export.h> /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ .macro THUNK name, func, put_ret_addr_in_rdi=0
@@ -47,6 +48,8 @@ #ifdef CONFIG_PREEMPT THUNK ___preempt_schedule, preempt_schedule THUNK ___preempt_schedule_notrace, preempt_schedule_notrace + EXPORT_SYMBOL(___preempt_schedule) + EXPORT_SYMBOL(___preempt_schedule_notrace) #endif #if defined(CONFIG_TRACE_IRQFLAGS) \
arch/x86/include/asm/export.h new file +4 -0
@@ -0,0 +1,4 @@ +#ifdef CONFIG_64BIT +#define KSYM_ALIGN 16 +#endif +#include <asm-generic/export.h>
arch/x86/kernel/Makefile +1 -3
@@ -30,9 +30,7 @@ obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o obj-y += setup.o x86_init.o i8259.o irqinit.o jump_label.o obj-$(CONFIG_IRQ_WORK) += irq_work.o obj-y += probe_roms.o -obj-$(CONFIG_X86_32) += i386_ksyms_32.o -obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o -obj-$(CONFIG_X86_64) += mcount_64.o +obj-$(CONFIG_X86_64) += sys_x86_64.o mcount_64.o obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o obj-$(CONFIG_SYSFS) += ksysfs.o obj-y += bootflag.o e820.o
arch/x86/kernel/head_32.S +2 -0
@@ -23,6 +23,7 @@ #include <asm/percpu.h> #include <asm/nops.h> #include <asm/bootparam.h> +#include <asm/export.h> /* Physical address */ #define pa(X) ((X) - __PAGE_OFFSET)
@@ -678,6 +679,7 @@ ENTRY(empty_zero_page) .fill 4096,1,0 ENTRY(swapper_pg_dir) .fill 1024,4,0 +EXPORT_SYMBOL(empty_zero_page) /* * This starts the data section.
arch/x86/kernel/head_64.S +3 -0
@@ -20,6 +20,7 @@ #include <asm/processor-flags.h> #include <asm/percpu.h> #include <asm/nops.h> +#include <asm/export.h> #ifdef CONFIG_PARAVIRT #include <asm/asm-offsets.h>
@@ -523,10 +524,12 @@ early_gdt_descr_base: ENTRY(phys_base) /* This must match the first entry in level2_kernel_pgt */ .quad 0x0000000000000000 +EXPORT_SYMBOL(phys_base) #include "../../x86/xen/xen-head.S" __PAGE_ALIGNED_BSS NEXT_PAGE(empty_zero_page) .skip PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page)
arch/x86/kernel/i386_ksyms_32.c deleted +0 -44
44 lines not on this page · raw message
arch/x86/kernel/mcount_64.S +2 -0
@@ -7,6 +7,7 @@ #include <linux/linkage.h> #include <asm/ptrace.h> #include <asm/ftrace.h> +#include <asm/export.h> .code64
@@ -291,6 +292,7 @@ trace: jmp fgraph_trace END(function_hook) #endif /* CONFIG_DYNAMIC_FTRACE */ +EXPORT_SYMBOL(function_hook) #endif /* CONFIG_FUNCTION_TRACER */ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
arch/x86/kernel/x8664_ksyms_64.c deleted +0 -79
79 lines not on this page · raw message
arch/x86/lib/checksum_32.S +3 -0
@@ -28,6 +28,7 @@ #include <linux/linkage.h> #include <asm/errno.h> #include <asm/asm.h> +#include <asm/export.h> /* * computes a partial checksum, e.g. for TCP/UDP fragments
@@ -251,6 +252,7 @@ ENTRY(csum_partial) ENDPROC(csum_partial) #endif +EXPORT_SYMBOL(csum_partial) /* unsigned int csum_partial_copy_generic (const char *src, char *dst,
@@ -490,3 +492,4 @@ ENDPROC(csum_partial_copy_generic) #undef ROUND1 #endif +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/x86/lib/clear_page_64.S +2 -0
@@ -1,6 +1,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * Most CPUs support enhanced REP MOVSB/STOSB instructions. It is
@@ -23,6 +24,7 @@ ENTRY(clear_page) rep stosq ret ENDPROC(clear_page) +EXPORT_SYMBOL(clear_page) ENTRY(clear_page_orig)
arch/x86/lib/cmpxchg8b_emu.S +2 -0
@@ -7,6 +7,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text
@@ -48,3 +49,4 @@ ENTRY(cmpxchg8b_emu) ret ENDPROC(cmpxchg8b_emu) +EXPORT_SYMBOL(cmpxchg8b_emu)
arch/x86/lib/copy_page_64.S +2 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * Some CPUs run faster using the string copy instructions (sane microcode).
@@ -17,6 +18,7 @@ ENTRY(copy_page) rep movsq ret ENDPROC(copy_page) +EXPORT_SYMBOL(copy_page) ENTRY(copy_page_regs) subq $2*8, %rsp
arch/x86/lib/copy_user_64.S +8 -0
@@ -14,6 +14,7 @@ #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> /* Standard copy_to_user with segment limit checking */ ENTRY(_copy_to_user)
@@ -29,6 +30,7 @@ ENTRY(_copy_to_user) "jmp copy_user_enhanced_fast_string", \ X86_FEATURE_ERMS ENDPROC(_copy_to_user) +EXPORT_SYMBOL(_copy_to_user) /* Standard copy_from_user with segment limit checking */ ENTRY(_copy_from_user)
@@ -44,6 +46,8 @@ ENTRY(_copy_from_user) "jmp copy_user_enhanced_fast_string", \ X86_FEATURE_ERMS ENDPROC(_copy_from_user) +EXPORT_SYMBOL(_copy_from_user) + .section .fixup,"ax" /* must zero dest */
@@ -155,6 +159,7 @@ ENTRY(copy_user_generic_unrolled) _ASM_EXTABLE(21b,50b) _ASM_EXTABLE(22b,50b) ENDPROC(copy_user_generic_unrolled) +EXPORT_SYMBOL(copy_user_generic_unrolled) /* Some CPUs run faster using the string copy instructions. * This is also a lot simpler. Use them when possible.
@@ -200,6 +205,7 @@ ENTRY(copy_user_generic_string) _ASM_EXTABLE(1b,11b) _ASM_EXTABLE(3b,12b) ENDPROC(copy_user_generic_string) +EXPORT_SYMBOL(copy_user_generic_string) /* * Some CPUs are adding enhanced REP MOVSB/STOSB instructions.
@@ -229,6 +235,7 @@ ENTRY(copy_user_enhanced_fast_string) _ASM_EXTABLE(1b,12b) ENDPROC(copy_user_enhanced_fast_string) +EXPORT_SYMBOL(copy_user_enhanced_fast_string) /* * copy_user_nocache - Uncached memory copy with exception handling
@@ -319,3 +326,4 @@ ENTRY(__copy_user_nocache) _ASM_EXTABLE(21b,50b) _ASM_EXTABLE(22b,50b) ENDPROC(__copy_user_nocache) +EXPORT_SYMBOL(__copy_user_nocache)
arch/x86/lib/csum-partial_64.c +1 -0
@@ -135,6 +135,7 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)return (__force __wsum )add32_with_carry (do_csum (buff, len), (__force u32 )sum); } +EXPORT_SYMBOL (csum_partial);/* * this routine is used for miscellaneous IP-like checksums, mainly
arch/x86/lib/getuser.S +5 -0
@@ -32,6 +32,7 @@ #include <asm/thread_info.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> .text ENTRY(__get_user_1)
@@ -44,6 +45,7 @@ ENTRY(__get_user_1) ASM_CLAC ret ENDPROC(__get_user_1) +EXPORT_SYMBOL(__get_user_1) ENTRY(__get_user_2) add $1,%_ASM_AX
@@ -57,6 +59,7 @@ ENTRY(__get_user_2) ASM_CLAC ret ENDPROC(__get_user_2) +EXPORT_SYMBOL(__get_user_2) ENTRY(__get_user_4) add $3,%_ASM_AX
@@ -70,6 +73,7 @@ ENTRY(__get_user_4) ASM_CLAC ret ENDPROC(__get_user_4) +EXPORT_SYMBOL(__get_user_4) ENTRY(__get_user_8) #ifdef CONFIG_X86_64
@@ -97,6 +101,7 @@ ENTRY(__get_user_8) ret #endif ENDPROC(__get_user_8) +EXPORT_SYMBOL(__get_user_8) bad_get_user:
arch/x86/lib/memcpy_64.S +3 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> /* * We build a jump to memcpy_orig by default which gets NOPped out on
@@ -39,6 +40,8 @@ ENTRY(memcpy) ret ENDPROC(memcpy) ENDPROC(__memcpy) +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(__memcpy) /* * memcpy_erms() - enhanced fast string memcpy. This is faster and
arch/x86/lib/memmove_64.S +3 -0
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> #undef memmove
@@ -207,3 +208,5 @@ ENTRY(__memmove) retq ENDPROC(__memmove) ENDPROC(memmove) +EXPORT_SYMBOL(__memmove) +EXPORT_SYMBOL(memmove)
arch/x86/lib/memset_64.S +3 -0
@@ -3,6 +3,7 @@ #include <linux/linkage.h> #include <asm/cpufeature.h> #include <asm/alternative-asm.h> +#include <asm/export.h> .weak memset
@@ -43,6 +44,8 @@ ENTRY(__memset) ret ENDPROC(memset) ENDPROC(__memset) +EXPORT_SYMBOL(memset) +EXPORT_SYMBOL(__memset) /* * ISO C memset - set a memory block to a byte value. This function uses
arch/x86/lib/putuser.S +5 -0
@@ -15,6 +15,7 @@ #include <asm/errno.h> #include <asm/asm.h> #include <asm/smap.h> +#include <asm/export.h> /*
@@ -43,6 +44,7 @@ ENTRY(__put_user_1) xor %eax,%eax EXIT ENDPROC(__put_user_1) +EXPORT_SYMBOL(__put_user_1) ENTRY(__put_user_2) ENTER
@@ -55,6 +57,7 @@ ENTRY(__put_user_2) xor %eax,%eax EXIT ENDPROC(__put_user_2) +EXPORT_SYMBOL(__put_user_2) ENTRY(__put_user_4) ENTER
@@ -67,6 +70,7 @@ ENTRY(__put_user_4) xor %eax,%eax EXIT ENDPROC(__put_user_4) +EXPORT_SYMBOL(__put_user_4) ENTRY(__put_user_8) ENTER
@@ -82,6 +86,7 @@ ENTRY(__put_user_8) xor %eax,%eax EXIT ENDPROC(__put_user_8) +EXPORT_SYMBOL(__put_user_8) bad_put_user: movl $-EFAULT,%eax
arch/x86/lib/strstr_32.c +2 -1
@@ -1,4 +1,5 @@#include <linux/string.h> +#include <linux/export.h> char *strstr (const char *cs,const char *ct) {
@@ -28,4 +29,4 @@ __asm__ __volatile__( : "dx", "di");return __res; } - +EXPORT_SYMBOL (strstr);
arch/x86/um/Makefile +1 -1
@@ -8,7 +8,7 @@ else BITS := 64 endif -obj-y = bug.o bugs_$(BITS).o delay.o fault.o ksyms.o ldt.o \ +obj-y = bug.o bugs_$(BITS).o delay.o fault.o ldt.o \ ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ stub_$(BITS).o stub_segv.o \ sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
arch/x86/um/checksum_32.S +2 -0
@@ -27,6 +27,7 @@ #include <asm/errno.h> #include <asm/asm.h> +#include <asm/export.h> /* * computes a partial checksum, e.g. for TCP/UDP fragments
@@ -214,3 +215,4 @@ csum_partial: ret #endif + EXPORT_SYMBOL(csum_partial)
arch/x86/um/ksyms.c deleted +0 -13
@@ -1,13 +0,0 @@ -#include <linux/module.h> -#include <asm/string.h> -#include <asm/checksum.h> - -#ifndef CONFIG_X86_32 -/*XXX: we need them because they would be exported by x86_64 */ -#if (__GNUC__ ==4 && __GNUC_MINOR__ >=3 ) || __GNUC__ >4 -EXPORT_SYMBOL (memcpy); -#else -EXPORT_SYMBOL (__memcpy); -#endif -#endif -EXPORT_SYMBOL (csum_partial);
Signature · 1 line
2.1.4
PATCH v2 4/13 alpha: move exports to actual definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/alpha/include/asm/Kbuild | 1 + arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/alpha_ksyms.c | 102 ----------------------------------- arch/alpha/kernel/machvec_impl.h | 6 ++- arch/alpha/kernel/setup.c | 1 + arch/alpha/lib/callback_srm.S | 5 ++ arch/alpha/lib/checksum.c | 3 ++ arch/alpha/lib/clear_page.S | 3 +- arch/alpha/lib/clear_user.S | 2 + arch/alpha/lib/copy_page.S | 3 +- arch/alpha/lib/copy_user.S | 3 ++ arch/alpha/lib/csum_ipv6_magic.S | 2 + arch/alpha/lib/csum_partial_copy.c | 2 + arch/alpha/lib/dec_and_lock.c | 2 + arch/alpha/lib/divide.S | 3 ++ arch/alpha/lib/ev6-clear_page.S | 3 +- arch/alpha/lib/ev6-clear_user.S | 3 +- arch/alpha/lib/ev6-copy_page.S | 3 +- arch/alpha/lib/ev6-copy_user.S | 3 +- arch/alpha/lib/ev6-csum_ipv6_magic.S | 2 + arch/alpha/lib/ev6-divide.S | 3 ++ arch/alpha/lib/ev6-memchr.S | 3 +- arch/alpha/lib/ev6-memcpy.S | 3 +- arch/alpha/lib/ev6-memset.S | 7 ++- arch/alpha/lib/ev67-strcat.S | 3 +- arch/alpha/lib/ev67-strchr.S | 3 +- arch/alpha/lib/ev67-strlen.S | 3 +- arch/alpha/lib/ev67-strncat.S | 3 +- arch/alpha/lib/ev67-strrchr.S | 3 +- arch/alpha/lib/fpreg.c | 7 +++ arch/alpha/lib/memchr.S | 3 +- arch/alpha/lib/memcpy.c | 5 +- arch/alpha/lib/memmove.S | 3 +- arch/alpha/lib/memset.S | 7 ++- arch/alpha/lib/strcat.S | 2 + arch/alpha/lib/strchr.S | 3 +- arch/alpha/lib/strcpy.S | 3 +- arch/alpha/lib/strlen.S | 3 +- arch/alpha/lib/strncat.S | 3 +- arch/alpha/lib/strncpy.S | 3 +- arch/alpha/lib/strrchr.S | 3 +- 41 files changed, 99 insertions(+), 131 deletions(-) delete mode 100644 arch/alpha/kernel/alpha_ksyms.c
arch/alpha/include/asm/Kbuild +1 -0
@@ -3,6 +3,7 @@ generic-y += clkdev.h generic-y += cputime.h generic-y += exec.h +generic-y += export.h generic-y += irq_work.h generic-y += mcs_spinlock.h generic-y += mm-arch-hooks.h
arch/alpha/kernel/Makefile +1 -1
@@ -8,7 +8,7 @@ ccflags-y := -Wno-sign-compare obj-y := entry.o traps.o process.o osf_sys.o irq.o \ irq_alpha.o signal.o setup.o ptrace.o time.o \ - alpha_ksyms.o systbls.o err_common.o io.o + systbls.o err_common.o io.o obj-$(CONFIG_VGA_HOSE) += console.o obj-$(CONFIG_SMP) += smp.o
arch/alpha/kernel/alpha_ksyms.c deleted +0 -102
102 lines not on this page · raw message
arch/alpha/kernel/machvec_impl.h +4 -2
@@ -144,9 +144,11 @@else beforehand. Fine. We'll do it ourselves. */ #if 0 #define ALIAS_MV (system) \ - struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv"))); + struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv"))); \ + EXPORT_SYMBOL(alpha_mv);#else #define ALIAS_MV (system) \ - asm(".global alpha_mv\nalpha_mv = " #system "_mv"); + asm(".global alpha_mv\nalpha_mv = " #system "_mv"); \ + EXPORT_SYMBOL(alpha_mv);#endif #endif /* GENERIC */
arch/alpha/kernel/setup.c +1 -0
@@ -115,6 +115,7 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE;#ifdef CONFIG_ALPHA_GENERIC struct alpha_machine_vector alpha_mv; +EXPORT_SYMBOL (alpha_mv);#endif #ifndef alpha_using_srm
arch/alpha/lib/callback_srm.S +5 -0
@@ -3,6 +3,7 @@ */ #include <asm/console.h> +#include <asm/export.h> .text #define HWRPB_CRB_OFFSET 0xc0
@@ -92,6 +93,10 @@ CALLBACK(reset_env, CCB_RESET_ENV, 4) CALLBACK(save_env, CCB_SAVE_ENV, 1) CALLBACK(pswitch, CCB_PSWITCH, 3) CALLBACK(bios_emul, CCB_BIOS_EMUL, 5) + +EXPORT_SYMBOL(callback_getenv) +EXPORT_SYMBOL(callback_setenv) +EXPORT_SYMBOL(callback_save_env) .data __alpha_using_srm: # For use by bootpheader
arch/alpha/lib/checksum.c +3 -0
@@ -50,6 +50,7 @@ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, (__force u64 )saddr + (__force u64 )daddr + (__force u64)sum + ((len + proto) << 8)); } +EXPORT_SYMBOL (csum_tcpudp_magic); __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
@@ -148,6 +149,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) {return (__force __sum16 )~do_csum (iph,ihl*4 ); } +EXPORT_SYMBOL (ip_fast_csum);/* * computes the checksum of a memory block at buff, length len,
@@ -182,3 +184,4 @@ __sum16 ip_compute_csum(const void *buff, int len) {return (__force __sum16 )~from64to16 (do_csum (buff,len)); } +EXPORT_SYMBOL (ip_compute_csum);
arch/alpha/lib/clear_page.S +2 -1
@@ -3,7 +3,7 @@ * * Zero an entire page. */ - +#include <asm/export.h> .text .align 4 .global clear_page
@@ -37,3 +37,4 @@ clear_page: nop .end clear_page + EXPORT_SYMBOL(clear_page)
arch/alpha/lib/clear_user.S +2 -0
@@ -24,6 +24,7 @@ * Clobbers: * $1,$2,$3,$4,$5,$6 */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EX(x,y...) \
@@ -111,3 +112,4 @@ $exception: ret $31, ($28), 1 # .. e1 : .end __do_clear_user + EXPORT_SYMBOL(__do_clear_user)
arch/alpha/lib/copy_page.S +2 -1
@@ -3,7 +3,7 @@ * * Copy an entire page. */ - +#include <asm/export.h> .text .align 4 .global copy_page
@@ -47,3 +47,4 @@ copy_page: nop .end copy_page + EXPORT_SYMBOL(copy_page)
arch/alpha/lib/copy_user.S +3 -0
@@ -26,6 +26,8 @@ * $1,$2,$3,$4,$5,$6,$7 */ +#include <asm/export.h> + /* Allow an exception for an insn; exit if we get one. */ #define EXI(x,y...) \ 99: x,##y; \
@@ -143,3 +145,4 @@ $101: ret $31,($28),1 .end __copy_user +EXPORT_SYMBOL(__copy_user)
arch/alpha/lib/csum_ipv6_magic.S +2 -0
@@ -12,6 +12,7 @@ * added by Ivan Kokshaysky <[email protected]> */ +#include <asm/export.h> .globl csum_ipv6_magic .align 4 .ent csum_ipv6_magic
@@ -113,3 +114,4 @@ csum_ipv6_magic: ret # .. e1 : .end csum_ipv6_magic + EXPORT_SYMBOL(csum_ipv6_magic)
arch/alpha/lib/csum_partial_copy.c +2 -0
@@ -374,6 +374,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len, }return (__force __wsum )checksum; } +EXPORT_SYMBOL (csum_partial_copy_from_user);__wsum csum_partial_copy_nocheck (const void *src,void *dst,int len,__wsum sum)
@@ -386,3 +387,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)set_fs (oldfs);return checksum; } +EXPORT_SYMBOL (csum_partial_copy_nocheck);
arch/alpha/lib/dec_and_lock.c +2 -0
@@ -7,6 +7,7 @@#include <linux/spinlock.h> #include <linux/atomic.h> +#include <linux/export.h> asm (".text \n\ .global _atomic_dec_and_lock \n\
@@ -39,3 +40,4 @@ static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)spin_unlock (lock);return 0 ; } +EXPORT_SYMBOL (_atomic_dec_and_lock);
arch/alpha/lib/divide.S +3 -0
@@ -45,6 +45,7 @@ * $28 - compare status */ +#include <asm/export.h> #define halt .long 0 /*
@@ -151,6 +152,7 @@ ufunction: addq $30,STACK,$30 ret $31,($23),1 .end ufunction +EXPORT_SYMBOL(ufunction) /* * Uhh.. Ugly signed division. I'd rather not have it at all, but
@@ -193,3 +195,4 @@ sfunction: addq $30,STACK,$30 ret $31,($23),1 .end sfunction +EXPORT_SYMBOL(sfunction)
arch/alpha/lib/ev6-clear_page.S +2 -1
@@ -3,7 +3,7 @@ * * Zero an entire page. */ - +#include <asm/export.h> .text .align 4 .global clear_page
@@ -52,3 +52,4 @@ clear_page: nop .end clear_page + EXPORT_SYMBOL(clear_page)
arch/alpha/lib/ev6-clear_user.S +2 -1
@@ -43,6 +43,7 @@ * want to leave a hole (and we also want to avoid repeating lots of work) */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EX(x,y...) \ 99: x,##y; \
@@ -222,4 +223,4 @@ $exception: # Destination for exception recovery(?) nop # .. E .. .. : ret $31, ($28), 1 # L0 .. .. .. : L U L U .end __do_clear_user - + EXPORT_SYMBOL(__do_clear_user)
arch/alpha/lib/ev6-copy_page.S +2 -1
@@ -56,7 +56,7 @@ destination pages are in the dcache, but it is my guess that this is less important than the dcache miss case. */ - +#include <asm/export.h> .text .align 4 .global copy_page
@@ -201,3 +201,4 @@ copy_page: nop .end copy_page + EXPORT_SYMBOL(copy_page)
arch/alpha/lib/ev6-copy_user.S +2 -1
@@ -37,6 +37,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ +#include <asm/export.h> /* Allow an exception for an insn; exit if we get one. */ #define EXI(x,y...) \ 99: x,##y; \
@@ -256,4 +257,4 @@ $101: ret $31,($28),1 # L0 .end __copy_user - + EXPORT_SYMBOL(__copy_user)
arch/alpha/lib/ev6-csum_ipv6_magic.S +2 -0
@@ -52,6 +52,7 @@ * may cause additional delay in rare cases (load-load replay traps). */ +#include <asm/export.h> .globl csum_ipv6_magic .align 4 .ent csum_ipv6_magic
@@ -148,3 +149,4 @@ csum_ipv6_magic: ret # L0 : L U L U .end csum_ipv6_magic + EXPORT_SYMBOL(csum_ipv6_magic)
arch/alpha/lib/ev6-divide.S +3 -0
@@ -55,6 +55,7 @@ * Try not to change the actual algorithm if possible for consistency. */ +#include <asm/export.h> #define halt .long 0 /*
@@ -205,6 +206,7 @@ ufunction: addq $30,STACK,$30 # E : ret $31,($23),1 # L0 : L U U L .end ufunction +EXPORT_SYMBOL(ufunction) /* * Uhh.. Ugly signed division. I'd rather not have it at all, but
@@ -257,3 +259,4 @@ sfunction: addq $30,STACK,$30 # E : ret $31,($23),1 # L0 : L U U L .end sfunction +EXPORT_SYMBOL(sfunction)
arch/alpha/lib/ev6-memchr.S +2 -1
@@ -27,7 +27,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> .set noreorder .set noat
@@ -189,3 +189,4 @@ $not_found: ret # L0 : .end memchr + EXPORT_SYMBOL(memchr)
arch/alpha/lib/ev6-memcpy.S +2 -1
@@ -19,7 +19,7 @@ * Temp usage notes: * $1,$2, - scratch */ - +#include <asm/export.h> .set noreorder .set noat
@@ -242,6 +242,7 @@ $nomoredata: nop # E : .end memcpy + EXPORT_SYMBOL(memcpy) /* For backwards module compatibility. */ __memcpy = memcpy
arch/alpha/lib/ev6-memset.S +6 -1
@@ -26,7 +26,7 @@ * as fixes will need to be made in multiple places. The performance gain * is worth it. */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -229,6 +229,7 @@ end_b: nop ret $31,($26),1 # L0 : .end ___memset + EXPORT_SYMBOL(___memset) /* * This is the original body of code, prior to replication and
@@ -406,6 +407,7 @@ end: nop ret $31,($26),1 # L0 : .end __constant_c_memset + EXPORT_SYMBOL(__constant_c_memset) /* * This is a replicant of the __constant_c_memset code, rescheduled
@@ -594,6 +596,9 @@ end_w: ret $31,($26),1 # L0 : .end __memsetw + EXPORT_SYMBOL(__memsetw) memset = ___memset __memset = ___memset + EXPORT_SYMBOL(memset) + EXPORT_SYMBOL(__memset)
arch/alpha/lib/ev67-strcat.S +2 -1
@@ -19,7 +19,7 @@ * string once. */ - +#include <asm/export.h> .text .align 4
@@ -52,3 +52,4 @@ $found: cttz $2, $3 # U0 : br __stxcpy # L0 : .end strcat + EXPORT_SYMBOL(strcat)
arch/alpha/lib/ev67-strchr.S +2 -1
@@ -15,7 +15,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -86,3 +86,4 @@ $found: negq t0, t1 # E : clear all but least set bit ret # L0 : .end strchr + EXPORT_SYMBOL(strchr)
arch/alpha/lib/ev67-strlen.S +2 -1
@@ -17,7 +17,7 @@ * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1 * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ - +#include <asm/export.h> .set noreorder .set noat
@@ -47,3 +47,4 @@ $found: ret $31, ($26) # L0 : .end strlen + EXPORT_SYMBOL(strlen)
arch/alpha/lib/ev67-strncat.S +2 -1
@@ -20,7 +20,7 @@ * Try not to change the actual algorithm if possible for consistency. */ - +#include <asm/export.h> .text .align 4
@@ -92,3 +92,4 @@ $zerocount: ret # L0 : .end strncat + EXPORT_SYMBOL(strncat)
arch/alpha/lib/ev67-strrchr.S +2 -1
@@ -18,7 +18,7 @@ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1 */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -107,3 +107,4 @@ $eos: nop .end strrchr + EXPORT_SYMBOL(strrchr)
arch/alpha/lib/fpreg.c +7 -0
@@ -4,6 +4,9 @@* (C) Copyright 1998 Linus Torvalds */ +#include <linux/compiler.h> +#include <linux/export.h> +#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define STT (reg,val) asm volatile ("ftoit $f"#reg",%0" : "=r"(val));#else
@@ -52,6 +55,7 @@ alpha_read_fp_reg (unsigned long reg) }return val; } +EXPORT_SYMBOL (alpha_read_fp_reg);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define LDT (reg,val) asm volatile ("itoft %0,$f"#reg : : "r"(val));
@@ -97,6 +101,7 @@ alpha_write_fp_reg (unsigned long reg, unsigned long val)case 31 :LDT (31 , val);break ; } } +EXPORT_SYMBOL (alpha_write_fp_reg);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define STS (reg,val) asm volatile ("ftois $f"#reg",%0" : "=r"(val));
@@ -146,6 +151,7 @@ alpha_read_fp_reg_s (unsigned long reg) }return val; } +EXPORT_SYMBOL (alpha_read_fp_reg_s);#if defined(CONFIG_ALPHA_EV6 ) || defined(CONFIG_ALPHA_EV67 )#define LDS (reg,val) asm volatile ("itofs %0,$f"#reg : : "r"(val));
@@ -191,3 +197,4 @@ alpha_write_fp_reg_s (unsigned long reg, unsigned long val)case 31 :LDS (31 , val);break ; } } +EXPORT_SYMBOL (alpha_write_fp_reg_s);
arch/alpha/lib/memchr.S +2 -1
@@ -31,7 +31,7 @@ For correctness consider that: - only minimum number of quadwords may be accessed - the third argument is an unsigned long */ - +#include <asm/export.h> .set noreorder .set noat
@@ -162,3 +162,4 @@ $not_found: ret # .. e1 : .end memchr + EXPORT_SYMBOL(memchr)
arch/alpha/lib/memcpy.c +2 -3
@@ -16,6 +16,7 @@*/ #include <linux/types.h> +#include <linux/export.h> /* * This should be done in one go with ldq_u*2/mask/stq_u. Do it
@@ -158,6 +159,4 @@ void * memcpy(void * dest, const void *src, size_t n)__memcpy_unaligned_up ((unsigned long ) dest, (unsigned long ) src, n);return dest; } - -/* For backward modules compatibility, define __memcpy. */ -asm("__memcpy = memcpy; .globl __memcpy" ); +EXPORT_SYMBOL (memcpy);
arch/alpha/lib/memmove.S +2 -1
@@ -6,7 +6,7 @@ * This is hand-massaged output from the original memcpy.c. We defer to * memcpy whenever possible; the backwards copy loops are not unrolled. */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -179,3 +179,4 @@ $egress: nop .end memmove + EXPORT_SYMBOL(memmove)
arch/alpha/lib/memset.S +6 -1
@@ -13,7 +13,7 @@ * The scheduling comments are according to the EV5 documentation (and done by * hand, so they might well be incorrect, please do tell me about it..) */ - +#include <asm/export.h> .set noat .set noreorder .text
@@ -106,6 +106,8 @@ within_one_quad: end: ret $31,($26),1 /* E1 */ .end ___memset +EXPORT_SYMBOL(___memset) +EXPORT_SYMBOL(__constant_c_memset) .align 5 .ent __memsetw
@@ -122,6 +124,9 @@ __memsetw: br __constant_c_memset /* .. E1 */ .end __memsetw +EXPORT_SYMBOL(__memsetw) memset = ___memset __memset = ___memset + EXPORT_SYMBOL(memset) + EXPORT_SYMBOL(__memset)
arch/alpha/lib/strcat.S +2 -0
@@ -4,6 +4,7 @@ * * Append a null-terminated string from SRC to DST. */ +#include <asm/export.h> .text
@@ -50,3 +51,4 @@ $found: negq $2, $3 # clear all but least set bit br __stxcpy .end strcat +EXPORT_SYMBOL(strcat);
arch/alpha/lib/strchr.S +2 -1
@@ -5,7 +5,7 @@ * Return the address of a given character within a null-terminated * string, or null if it is not found. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -68,3 +68,4 @@ $retnull: ret # .. e1 : .end strchr + EXPORT_SYMBOL(strchr)
arch/alpha/lib/strcpy.S +2 -1
@@ -5,7 +5,7 @@ * Copy a null-terminated string from SRC to DST. Return a pointer * to the null-terminator in the source. */ - +#include <asm/export.h> .text .align 3
@@ -21,3 +21,4 @@ strcpy: br __stxcpy # do the copy .end strcpy + EXPORT_SYMBOL(strcpy)
arch/alpha/lib/strlen.S +2 -1
@@ -11,7 +11,7 @@ * do this instead of the 9 instructions that * binary search needs). */ - +#include <asm/export.h> .set noreorder .set noat
@@ -55,3 +55,4 @@ done: subq $0, $16, $0 ret $31, ($26) .end strlen + EXPORT_SYMBOL(strlen)
arch/alpha/lib/strncat.S +2 -1
@@ -9,7 +9,7 @@ * past count, whereas libc may write to count+1. This follows the generic * implementation in lib/string.c and is, IMHO, more sensible. */ - +#include <asm/export.h> .text .align 3
@@ -82,3 +82,4 @@ $zerocount: ret .end strncat + EXPORT_SYMBOL(strncat)
arch/alpha/lib/strncpy.S +2 -1
@@ -10,7 +10,7 @@ * version has cropped that bit o' nastiness as well as assuming that * __stxncpy is in range of a branch. */ - +#include <asm/export.h> .set noat .set noreorder
@@ -79,3 +79,4 @@ $zerolen: ret .end strncpy + EXPORT_SYMBOL(strncpy)
arch/alpha/lib/strrchr.S +2 -1
@@ -5,7 +5,7 @@ * Return the address of the last occurrence of a given character * within a null-terminated string, or null if it is not found. */ - +#include <asm/export.h> #include <asm/regdef.h> .set noreorder
@@ -85,3 +85,4 @@ $retnull: ret # .. e1 : .end strrchr + EXPORT_SYMBOL(strrchr)
Signature · 1 line
2.1.4
PATCH v2 5/13 m68k: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/m68k/include/asm/export.h | 3 +++ arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/m68k_ksyms.c | 32 -------------------------------- arch/m68k/lib/ashldi3.c | 4 ++++ arch/m68k/lib/ashrdi3.c | 4 ++++ arch/m68k/lib/divsi3.S | 3 +++ arch/m68k/lib/lshrdi3.c | 4 ++++ arch/m68k/lib/modsi3.S | 3 +++ arch/m68k/lib/muldi3.c | 4 ++++ arch/m68k/lib/mulsi3.S | 4 ++-- arch/m68k/lib/udivsi3.S | 4 ++-- arch/m68k/lib/umodsi3.S | 4 ++-- 12 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 arch/m68k/include/asm/export.h delete mode 100644 arch/m68k/kernel/m68k_ksyms.c
arch/m68k/include/asm/export.h new file +3 -0
@@ -0,0 +1,3 @@ +#define KSYM_ALIGN 2 +#define KCRC_ALIGN 2 +#include <asm-generic/export.h>
arch/m68k/kernel/Makefile +1 -1
@@ -13,7 +13,7 @@ extra-$(CONFIG_SUN3X) := head.o extra-$(CONFIG_SUN3) := sun3-head.o extra-y += vmlinux.lds -obj-y := entry.o irq.o m68k_ksyms.o module.o process.o ptrace.o +obj-y := entry.o irq.o module.o process.o ptrace.o obj-y += setup.o signal.o sys_m68k.o syscalltable.o time.o traps.o obj-$(CONFIG_MMU_MOTOROLA) += ints.o vectors.o
arch/m68k/kernel/m68k_ksyms.c deleted +0 -32
@@ -1,32 +0,0 @@ -#include <linux/module.h> - -asmlinkage long long __ashldi3 (long long ,int ); -asmlinkage long long __ashrdi3 (long long ,int ); -asmlinkage long long __lshrdi3 (long long ,int ); -asmlinkage long long __muldi3 (long long ,long long ); - -/* The following are special because they're not called -explicitly (the C compiler generates them). Fortunately, -their interface isn't gonna change any time soon now, so -it's OK to leave it out of version control. */ -EXPORT_SYMBOL (__ashldi3); -EXPORT_SYMBOL (__ashrdi3); -EXPORT_SYMBOL (__lshrdi3); -EXPORT_SYMBOL (__muldi3); - -#if defined(CONFIG_CPU_HAS_NO_MULDIV64 ) -/* -* Simpler 68k and ColdFire parts also need a few other gcc functions. -*/ -extern long long __divsi3 (long long ,long long ); -extern long long __modsi3 (long long ,long long ); -extern long long __mulsi3 (long long ,long long ); -extern long long __udivsi3 (long long ,long long ); -extern long long __umodsi3 (long long ,long long ); - -EXPORT_SYMBOL (__divsi3); -EXPORT_SYMBOL (__modsi3); -EXPORT_SYMBOL (__mulsi3); -EXPORT_SYMBOL (__udivsi3); -EXPORT_SYMBOL (__umodsi3); -#endif
arch/m68k/lib/ashldi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -55,3 +58,4 @@ __ashldi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__ashldi3);
arch/m68k/lib/ashrdi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -56,3 +59,4 @@ __ashrdi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__ashrdi3);
arch/m68k/lib/divsi3.S +3 -0
@@ -33,6 +33,8 @@ General Public License for more details. */ D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ +#include <asm/export.h> + /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -118,3 +120,4 @@ L2: movel d1, sp@- L3: movel sp@+, d2 rts + EXPORT_SYMBOL(__divsi3)
arch/m68k/lib/lshrdi3.c +4 -0
@@ -13,6 +13,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#define BITS_PER_UNIT 8typedef int SItype __attribute__ ((mode (SI )));
@@ -55,3 +58,4 @@ __lshrdi3 (DItype u, word_type b)return w.ll; } +EXPORT_SYMBOL (__lshrdi3);
arch/m68k/lib/modsi3.S +3 -0
@@ -33,6 +33,8 @@ General Public License for more details. */ D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ +#include <asm/export.h> + /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -106,3 +108,4 @@ SYM (__modsi3): movel d1, d0 rts + EXPORT_SYMBOL(__modsi3)
arch/m68k/lib/muldi3.c +4 -0
@@ -14,6 +14,9 @@ but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ +#include <linux/compiler.h> +#include <linux/export.h> +#ifdef CONFIG_CPU_HAS_NO_MULDIV64 #define SI_TYPE_SIZE 32
@@ -90,3 +93,4 @@ __muldi3 (DItype u, DItype v)return w.ll; } +EXPORT_SYMBOL (__muldi3);
arch/m68k/lib/mulsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -102,4 +102,4 @@ SYM (__mulsi3): addl d1, d0 rts - + EXPORT_SYMBOL(__mulsi3)
arch/m68k/lib/udivsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -154,4 +154,4 @@ L2: subql IMM (1),d4 unlk a6 | and return rts #endif /* __mcf5200__ || __mcoldfire__ */ - + EXPORT_SYMBOL(__udivsi3)
arch/m68k/lib/umodsi3.S +2 -2
@@ -32,7 +32,7 @@ General Public License for more details. */ Some of this code comes from MINIX, via the folks at ericsson. D. V. Henkel-Wallace ([email protected]) Fete Bastille, 1992 */ - +#include <asm/export.h> /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__
@@ -105,4 +105,4 @@ SYM (__umodsi3): subl d0, d1 /* d1 = a - (a/b)*b */ movel d1, d0 rts - + EXPORT_SYMBOL(__umodsi3)
Signature · 1 line
2.1.4
PATCH v2 6/13 s390: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/s390/include/asm/Kbuild | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/entry.S | 6 ++++++ arch/s390/kernel/mcount.S | 3 +++ arch/s390/kernel/s390_ksyms.c | 15 --------------- arch/s390/lib/mem.S | 3 +++ 6 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 arch/s390/kernel/s390_ksyms.c
arch/s390/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ generic-y += clkdev.h +generic-y += export.h generic-y += irq_work.h generic-y += mcs_spinlock.h generic-y += mm-arch-hooks.h
arch/s390/kernel/Makefile +1 -1
@@ -50,7 +50,7 @@ obj-y += entry.o reipl.o relocate_kernel.o extra-y += head.o head64.o vmlinux.lds -obj-$(CONFIG_MODULES) += s390_ksyms.o module.o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SCHED_TOPOLOGY) += topology.o obj-$(CONFIG_HIBERNATION) += suspend.o swsusp.o
arch/s390/kernel/entry.S +6 -0
@@ -23,6 +23,7 @@ #include <asm/vx-insn.h> #include <asm/setup.h> #include <asm/nmi.h> +#include <asm/export.h> __PT_R0 = __PT_GPRS __PT_R1 = __PT_GPRS + 8
@@ -249,6 +250,8 @@ sie_exit: EX_TABLE(.Lrewind_pad,.Lsie_fault) EX_TABLE(sie_exit,.Lsie_fault) +EXPORT_SYMBOL(sie64a) +EXPORT_SYMBOL(sie_exit) #endif /*
@@ -815,6 +818,9 @@ ENTRY(save_fpu_regs) oi __LC_CPU_FLAGS+7,_CIF_FPU br %r14 .Lsave_fpu_regs_end: +#if IS_ENABLED(CONFIG_KVM) +EXPORT_SYMBOL(save_fpu_regs) +#endif /* * Load floating-point controls and floating-point or vector registers.
arch/s390/kernel/mcount.S +3 -0
@@ -9,6 +9,7 @@ #include <asm/asm-offsets.h> #include <asm/ftrace.h> #include <asm/ptrace.h> +#include <asm/export.h> .section .kprobes.text, "ax"
@@ -23,6 +24,8 @@ ENTRY(ftrace_stub) ENTRY(_mcount) br %r14 +EXPORT_SYMBOL(_mcount) + ENTRY(ftrace_caller) .globl ftrace_regs_caller .set ftrace_regs_caller,ftrace_caller
arch/s390/kernel/s390_ksyms.c deleted +0 -15
@@ -1,15 +0,0 @@ -#include <linux/module.h> -#include <linux/kvm_host.h> -#include <asm/fpu/api.h> -#include <asm/ftrace.h> - -#ifdef CONFIG_FUNCTION_TRACER -EXPORT_SYMBOL (_mcount); -#endif -#if IS_ENABLED (CONFIG_KVM ) -EXPORT_SYMBOL (sie64a); -EXPORT_SYMBOL (sie_exit); -EXPORT_SYMBOL (save_fpu_regs); -#endif -EXPORT_SYMBOL (memcpy); -EXPORT_SYMBOL (memset);
arch/s390/lib/mem.S +3 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> /* * memset implementation
@@ -60,6 +61,7 @@ ENTRY(memset) xc 0(1,%r1),0(%r1) .Lmemset_mvc: mvc 1(1,%r1),0(%r1) +EXPORT_SYMBOL(memset) /* * memcpy implementation
@@ -86,3 +88,4 @@ ENTRY(memcpy) j .Lmemcpy_rest .Lmemcpy_mvc: mvc 0(1,%r1),0(%r3) +EXPORT_SYMBOL(memcpy)
Signature · 1 line
2.1.4
PATCH v2 7/13 arm: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/arm/include/asm/Kbuild | 1 + arch/arm/kernel/Makefile | 2 +- arch/arm/kernel/armksyms.c | 183 ---------------------------------- arch/arm/kernel/entry-ftrace.S | 3 + arch/arm/kernel/head.S | 3 + arch/arm/kernel/smccc-call.S | 3 + arch/arm/lib/ashldi3.S | 3 + arch/arm/lib/ashrdi3.S | 3 + arch/arm/lib/bitops.h | 5 + arch/arm/lib/bswapsdi2.S | 3 + arch/arm/lib/clear_user.S | 4 + arch/arm/lib/copy_from_user.S | 2 + arch/arm/lib/copy_page.S | 2 + arch/arm/lib/copy_to_user.S | 4 + arch/arm/lib/csumipv6.S | 3 +- arch/arm/lib/csumpartial.S | 2 + arch/arm/lib/csumpartialcopy.S | 1 + arch/arm/lib/csumpartialcopygeneric.S | 2 + arch/arm/lib/csumpartialcopyuser.S | 1 + arch/arm/lib/delay.c | 2 + arch/arm/lib/div64.S | 2 + arch/arm/lib/findbit.S | 9 ++ arch/arm/lib/getuser.S | 9 ++ arch/arm/lib/io-readsb.S | 2 + arch/arm/lib/io-readsl.S | 2 + arch/arm/lib/io-readsw-armv3.S | 3 +- arch/arm/lib/io-readsw-armv4.S | 2 + arch/arm/lib/io-writesb.S | 2 + arch/arm/lib/io-writesl.S | 2 + arch/arm/lib/io-writesw-armv3.S | 2 + arch/arm/lib/io-writesw-armv4.S | 2 + arch/arm/lib/lib1funcs.S | 9 ++ arch/arm/lib/lshrdi3.S | 3 + arch/arm/lib/memchr.S | 2 + arch/arm/lib/memcpy.S | 3 + arch/arm/lib/memmove.S | 2 + arch/arm/lib/memset.S | 3 + arch/arm/lib/memzero.S | 2 + arch/arm/lib/muldi3.S | 3 + arch/arm/lib/putuser.S | 5 + arch/arm/lib/strchr.S | 2 + arch/arm/lib/strrchr.S | 2 + arch/arm/lib/uaccess_with_memcpy.c | 3 + arch/arm/lib/ucmpdi2.S | 3 + arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/ssi-fiq-ksym.c | 20 ---- arch/arm/mach-imx/ssi-fiq.S | 7 +- 47 files changed, 131 insertions(+), 208 deletions(-) delete mode 100644 arch/arm/kernel/armksyms.c delete mode 100644 arch/arm/mach-imx/ssi-fiq-ksym.c
arch/arm/include/asm/Kbuild +1 -0
@@ -7,6 +7,7 @@ generic-y += early_ioremap.h generic-y += emergency-restart.h generic-y += errno.h generic-y += exec.h +generic-y += export.h generic-y += ioctl.h generic-y += ipcbuf.h generic-y += irq_regs.h
arch/arm/kernel/Makefile +1 -1
@@ -33,7 +33,7 @@ endif obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ISA_DMA_API) += dma.o obj-$(CONFIG_FIQ) += fiq.o fiqasm.o -obj-$(CONFIG_MODULES) += armksyms.o module.o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_ARM_MODULE_PLTS) += module-plts.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o
arch/arm/kernel/armksyms.c deleted +0 -183
183 lines not on this page · raw message
arch/arm/kernel/entry-ftrace.S +3 -0
@@ -7,6 +7,7 @@ #include <asm/assembler.h> #include <asm/ftrace.h> #include <asm/unwind.h> +#include <asm/export.h> #include "entry-header.S"
@@ -153,6 +154,7 @@ ENTRY(mcount) __mcount _old #endif ENDPROC(mcount) +EXPORT_SYMBOL(mcount) #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(ftrace_caller_old)
@@ -205,6 +207,7 @@ UNWIND(.fnstart) #endif UNWIND(.fnend) ENDPROC(__gnu_mcount_nc) +EXPORT_SYMBOL(__gnu_mcount_nc) #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(ftrace_caller)
arch/arm/kernel/head.S +3 -0
@@ -22,6 +22,7 @@ #include <asm/memory.h> #include <asm/thread_info.h> #include <asm/pgtable.h> +#include <asm/export.h> #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_SEMIHOSTING) #include CONFIG_DEBUG_LL_INCLUDE
@@ -727,6 +728,8 @@ __pv_phys_pfn_offset: __pv_offset: .quad 0 .size __pv_offset, . -__pv_offset +EXPORT_SYMBOL(__pv_phys_pfn_offset) +EXPORT_SYMBOL(__pv_offset) #endif #include "head-common.S"
arch/arm/kernel/smccc-call.S +3 -0
@@ -16,6 +16,7 @@ #include <asm/opcodes-sec.h> #include <asm/opcodes-virt.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Wrap c macros in asm macros to delay expansion until after the
@@ -51,6 +52,7 @@ UNWIND( .fnend) ENTRY(arm_smccc_smc) SMCCC SMCCC_SMC ENDPROC(arm_smccc_smc) +EXPORT_SYMBOL(arm_smccc_smc) /* * void smccc_hvc(unsigned long a0, unsigned long a1, unsigned long a2,
@@ -60,3 +62,4 @@ ENDPROC(arm_smccc_smc) ENTRY(arm_smccc_hvc) SMCCC SMCCC_HVC ENDPROC(arm_smccc_hvc) +EXPORT_SYMBOL(arm_smccc_hvc)
arch/arm/lib/ashldi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_llsl) ENDPROC(__ashldi3) ENDPROC(__aeabi_llsl) +EXPORT_SYMBOL(__ashldi3) +EXPORT_SYMBOL(__aeabi_llsl)
arch/arm/lib/ashrdi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_lasr) ENDPROC(__ashrdi3) ENDPROC(__aeabi_lasr) +EXPORT_SYMBOL(__ashrdi3) +EXPORT_SYMBOL(__aeabi_lasr)
arch/arm/lib/bitops.h +5 -0
@@ -1,5 +1,6 @@#include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #if __LINUX_ARM_ARCH__ >=6 .macro bitop, name, instr
@@ -25,6 +26,7 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm .macro testop, name, instr, store
@@ -55,6 +57,7 @@ UNWIND( .fnstart ) 2: bx lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm #else .macro bitop, name, instr
@@ -74,6 +77,7 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm/**
@@ -102,5 +106,6 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm#endif
arch/arm/lib/bswapsdi2.S +3 -0
@@ -1,5 +1,6 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #if __LINUX_ARM_ARCH__ >= 6 ENTRY(__bswapsi2)
@@ -35,3 +36,5 @@ ENTRY(__bswapdi2) ret lr ENDPROC(__bswapdi2) #endif +EXPORT_SYMBOL(__bswapsi2) +EXPORT_SYMBOL(__bswapdi2)
arch/arm/lib/clear_user.S +4 -0
@@ -10,6 +10,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text
@@ -50,6 +51,9 @@ USER( strnebt r2, [r0]) UNWIND(.fnend) ENDPROC(arm_clear_user) ENDPROC(__clear_user_std) +#ifndef CONFIG_UACCESS_WITH_MEMCPY +EXPORT_SYMBOL(arm_clear_user) +#endif .pushsection .text.fixup,"ax" .align 0
arch/arm/lib/copy_from_user.S +2 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Prototype:
@@ -94,6 +95,7 @@ ENTRY(arm_copy_from_user) #include "copy_template.S" ENDPROC(arm_copy_from_user) +EXPORT_SYMBOL(arm_copy_from_user) .pushsection .fixup,"ax" .align 0
arch/arm/lib/copy_page.S +2 -0
@@ -13,6 +13,7 @@ #include <asm/assembler.h> #include <asm/asm-offsets.h> #include <asm/cache.h> +#include <asm/export.h> #define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))
@@ -45,3 +46,4 @@ ENTRY(copy_page) PLD( beq 2b ) ldmfd sp!, {r4, pc} @ 3 ENDPROC(copy_page) +EXPORT_SYMBOL(copy_page)
arch/arm/lib/copy_to_user.S +4 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> /* * Prototype:
@@ -99,6 +100,9 @@ WEAK(arm_copy_to_user) ENDPROC(arm_copy_to_user) ENDPROC(__copy_to_user_std) +#ifndef CONFIG_UACCESS_WITH_MEMCPY +EXPORT_SYMBOL(arm_copy_to_user) +#endif .pushsection .text.fixup,"ax" .align 0
arch/arm/lib/csumipv6.S +2 -1
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text
@@ -30,4 +31,4 @@ ENTRY(__csum_ipv6_magic) adcs r0, r0, #0 ldmfd sp!, {pc} ENDPROC(__csum_ipv6_magic) - +EXPORT_SYMBOL(__csum_ipv6_magic)
arch/arm/lib/csumpartial.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text
@@ -140,3 +141,4 @@ ENTRY(csum_partial) bne 4b b .Lless4 ENDPROC(csum_partial) +EXPORT_SYMBOL(csum_partial)
arch/arm/lib/csumpartialcopy.S +1 -0
@@ -49,5 +49,6 @@ #define FN_ENTRY ENTRY(csum_partial_copy_nocheck) #define FN_EXIT ENDPROC(csum_partial_copy_nocheck) +#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_nocheck) #include "csumpartialcopygeneric.S"
arch/arm/lib/csumpartialcopygeneric.S +2 -0
@@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ #include <asm/assembler.h> +#include <asm/export.h> /* * unsigned int
@@ -331,3 +332,4 @@ FN_ENTRY mov r5, r4, get_byte_1 b .Lexit FN_EXIT +FN_EXPORT
arch/arm/lib/csumpartialcopyuser.S +1 -0
@@ -73,6 +73,7 @@ #define FN_ENTRY ENTRY(csum_partial_copy_from_user) #define FN_EXIT ENDPROC(csum_partial_copy_from_user) +#define FN_EXPORT EXPORT_SYMBOL(csum_partial_copy_from_user) #include "csumpartialcopygeneric.S"
arch/arm/lib/delay.c +2 -0
@@ -24,6 +24,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/export.h> #include <linux/timex.h> /*
@@ -34,6 +35,7 @@ struct arm_delay_ops arm_delay_ops = { .const_udelay = __loop_const_udelay, .udelay = __loop_udelay, }; +EXPORT_SYMBOL (arm_delay_ops);static const struct delay_timer *delay_timer;static bool delay_calibrated;
arch/arm/lib/div64.S +2 -0
@@ -15,6 +15,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -210,3 +211,4 @@ Ldiv0_64: UNWIND(.fnend) ENDPROC(__do_div64) +EXPORT_SYMBOL(__do_div64)
arch/arm/lib/findbit.S +9 -0
@@ -15,6 +15,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text /*
@@ -37,6 +38,7 @@ ENTRY(_find_first_zero_bit_le) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_zero_bit_le) +EXPORT_SYMBOL(_find_first_zero_bit_le) /* * Purpose : Find next 'zero' bit
@@ -57,6 +59,7 @@ ENTRY(_find_next_zero_bit_le) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_zero_bit_le) +EXPORT_SYMBOL(_find_next_zero_bit_le) /* * Purpose : Find a 'one' bit
@@ -78,6 +81,7 @@ ENTRY(_find_first_bit_le) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_bit_le) +EXPORT_SYMBOL(_find_first_bit_le) /* * Purpose : Find next 'one' bit
@@ -97,6 +101,7 @@ ENTRY(_find_next_bit_le) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_bit_le) +EXPORT_SYMBOL(_find_next_bit_le) #ifdef __ARMEB__
@@ -116,6 +121,7 @@ ENTRY(_find_first_zero_bit_be) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_zero_bit_be) +EXPORT_SYMBOL(_find_first_zero_bit_be) ENTRY(_find_next_zero_bit_be) teq r1, #0
@@ -133,6 +139,7 @@ ENTRY(_find_next_zero_bit_be) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_zero_bit_be) +EXPORT_SYMBOL(_find_next_zero_bit_be) ENTRY(_find_first_bit_be) teq r1, #0
@@ -150,6 +157,7 @@ ENTRY(_find_first_bit_be) 3: mov r0, r1 @ no free bits ret lr ENDPROC(_find_first_bit_be) +EXPORT_SYMBOL(_find_first_bit_be) ENTRY(_find_next_bit_be) teq r1, #0
@@ -166,6 +174,7 @@ ENTRY(_find_next_bit_be) add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit ENDPROC(_find_next_bit_be) +EXPORT_SYMBOL(_find_next_bit_be) #endif
arch/arm/lib/getuser.S +9 -0
@@ -31,6 +31,7 @@ #include <asm/assembler.h> #include <asm/errno.h> #include <asm/domain.h> +#include <asm/export.h> ENTRY(__get_user_1) check_uaccess r0, 1, r1, r2, __get_user_bad
@@ -38,6 +39,7 @@ ENTRY(__get_user_1) mov r0, #0 ret lr ENDPROC(__get_user_1) +EXPORT_SYMBOL(__get_user_1) ENTRY(__get_user_2) check_uaccess r0, 2, r1, r2, __get_user_bad
@@ -58,6 +60,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_2) +EXPORT_SYMBOL(__get_user_2) ENTRY(__get_user_4) check_uaccess r0, 4, r1, r2, __get_user_bad
@@ -65,6 +68,7 @@ ENTRY(__get_user_4) mov r0, #0 ret lr ENDPROC(__get_user_4) +EXPORT_SYMBOL(__get_user_4) ENTRY(__get_user_8) check_uaccess r0, 8, r1, r2, __get_user_bad
@@ -78,6 +82,7 @@ ENTRY(__get_user_8) mov r0, #0 ret lr ENDPROC(__get_user_8) +EXPORT_SYMBOL(__get_user_8) #ifdef __ARMEB__ ENTRY(__get_user_32t_8)
@@ -91,6 +96,7 @@ ENTRY(__get_user_32t_8) mov r0, #0 ret lr ENDPROC(__get_user_32t_8) +EXPORT_SYMBOL(__get_user_32t_8) ENTRY(__get_user_64t_1) check_uaccess r0, 1, r1, r2, __get_user_bad8
@@ -98,6 +104,7 @@ ENTRY(__get_user_64t_1) mov r0, #0 ret lr ENDPROC(__get_user_64t_1) +EXPORT_SYMBOL(__get_user_64t_1) ENTRY(__get_user_64t_2) check_uaccess r0, 2, r1, r2, __get_user_bad8
@@ -114,6 +121,7 @@ rb .req r0 mov r0, #0 ret lr ENDPROC(__get_user_64t_2) +EXPORT_SYMBOL(__get_user_64t_2) ENTRY(__get_user_64t_4) check_uaccess r0, 4, r1, r2, __get_user_bad8
@@ -121,6 +129,7 @@ ENTRY(__get_user_64t_4) mov r0, #0 ret lr ENDPROC(__get_user_64t_4) +EXPORT_SYMBOL(__get_user_64t_4) #endif __get_user_bad8:
arch/arm/lib/io-readsb.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Linsb_align: rsb ip, ip, #4 cmp ip, r2
@@ -121,3 +122,4 @@ ENTRY(__raw_readsb) ldmfd sp!, {r4 - r6, pc} ENDPROC(__raw_readsb) +EXPORT_SYMBOL(__raw_readsb)
arch/arm/lib/io-readsl.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> ENTRY(__raw_readsl) teq r2, #0 @ do we have to check for the zero len?
@@ -77,3 +78,4 @@ ENTRY(__raw_readsl) strb r3, [r1, #0] ret lr ENDPROC(__raw_readsl) +EXPORT_SYMBOL(__raw_readsl)
arch/arm/lib/io-readsw-armv3.S +2 -1
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Linsw_bad_alignment: adr r0, .Linsw_bad_align_msg
@@ -103,4 +104,4 @@ ENTRY(__raw_readsw) ldmfd sp!, {r4, r5, r6, pc} - +EXPORT_SYMBOL(__raw_readsw)
arch/arm/lib/io-readsw-armv4.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro pack, rd, hw1, hw2 #ifndef __ARMEB__
@@ -129,3 +130,4 @@ ENTRY(__raw_readsw) strneb ip, [r1] ldmfd sp!, {r4, pc} ENDPROC(__raw_readsw) +EXPORT_SYMBOL(__raw_readsw)
arch/arm/lib/io-writesb.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro outword, rd #ifndef __ARMEB__
@@ -92,3 +93,4 @@ ENTRY(__raw_writesb) ldmfd sp!, {r4, r5, pc} ENDPROC(__raw_writesb) +EXPORT_SYMBOL(__raw_writesb)
arch/arm/lib/io-writesl.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> ENTRY(__raw_writesl) teq r2, #0 @ do we have to check for the zero len?
@@ -65,3 +66,4 @@ ENTRY(__raw_writesl) bne 6b ret lr ENDPROC(__raw_writesl) +EXPORT_SYMBOL(__raw_writesl)
arch/arm/lib/io-writesw-armv3.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .Loutsw_bad_alignment: adr r0, .Loutsw_bad_align_msg
@@ -124,3 +125,4 @@ ENTRY(__raw_writesw) strne ip, [r0] ldmfd sp!, {r4, r5, r6, pc} +EXPORT_SYMBOL(__raw_writesw)
arch/arm/lib/io-writesw-armv4.S +2 -0
@@ -9,6 +9,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .macro outword, rd #ifndef __ARMEB__
@@ -98,3 +99,4 @@ ENTRY(__raw_writesw) strneh ip, [r0] ret lr ENDPROC(__raw_writesw) +EXPORT_SYMBOL(__raw_writesw)
arch/arm/lib/lib1funcs.S +9 -0
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .macro ARM_DIV_BODY dividend, divisor, result, curbit
@@ -238,6 +239,8 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__udivsi3) ENDPROC(__aeabi_uidiv) +EXPORT_SYMBOL(__udivsi3) +EXPORT_SYMBOL(__aeabi_uidiv) ENTRY(__umodsi3) UNWIND(.fnstart)
@@ -256,6 +259,7 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__umodsi3) +EXPORT_SYMBOL(__umodsi3) #ifdef CONFIG_ARM_PATCH_IDIV .align 3
@@ -303,6 +307,8 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__divsi3) ENDPROC(__aeabi_idiv) +EXPORT_SYMBOL(__divsi3) +EXPORT_SYMBOL(__aeabi_idiv) ENTRY(__modsi3) UNWIND(.fnstart)
@@ -327,6 +333,7 @@ UNWIND(.fnstart) UNWIND(.fnend) ENDPROC(__modsi3) +EXPORT_SYMBOL(__modsi3) #ifdef CONFIG_AEABI
@@ -343,6 +350,7 @@ UNWIND(.save {r0, r1, ip, lr} ) UNWIND(.fnend) ENDPROC(__aeabi_uidivmod) +EXPORT_SYMBOL(__aeabi_uidivmod) ENTRY(__aeabi_idivmod) UNWIND(.fnstart)
@@ -356,6 +364,7 @@ UNWIND(.save {r0, r1, ip, lr} ) UNWIND(.fnend) ENDPROC(__aeabi_idivmod) +EXPORT_SYMBOL(__aeabi_idivmod) #endif
arch/arm/lib/lshrdi3.S +3 -0
@@ -28,6 +28,7 @@ Boston, MA 02110-1301, USA. */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define al r1
@@ -52,3 +53,5 @@ ENTRY(__aeabi_llsr) ENDPROC(__lshrdi3) ENDPROC(__aeabi_llsr) +EXPORT_SYMBOL(__lshrdi3) +EXPORT_SYMBOL(__aeabi_llsr)
arch/arm/lib/memchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -24,3 +25,4 @@ ENTRY(memchr) 2: movne r0, #0 ret lr ENDPROC(memchr) +EXPORT_SYMBOL(memchr)
arch/arm/lib/memcpy.S +3 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #define LDR1W_SHIFT 0 #define STR1W_SHIFT 0
@@ -68,3 +69,5 @@ ENTRY(memcpy) ENDPROC(memcpy) ENDPROC(mmiocpy) +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(mmiocpy)
arch/arm/lib/memmove.S +2 -0
@@ -13,6 +13,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text
@@ -225,3 +226,4 @@ ENTRY(memmove) 18: backward_copy_shift push=24 pull=8 ENDPROC(memmove) +EXPORT_SYMBOL(memmove)
arch/arm/lib/memset.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text .align 5
@@ -135,3 +136,5 @@ UNWIND( .fnstart ) UNWIND( .fnend ) ENDPROC(memset) ENDPROC(mmioset) +EXPORT_SYMBOL(memset) +EXPORT_SYMBOL(mmioset)
arch/arm/lib/memzero.S +2 -0
@@ -10,6 +10,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> .text .align 5
@@ -135,3 +136,4 @@ UNWIND( .fnstart ) ret lr @ 1 UNWIND( .fnend ) ENDPROC(__memzero) +EXPORT_SYMBOL(__memzero)
arch/arm/lib/muldi3.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -46,3 +47,5 @@ ENTRY(__aeabi_lmul) ENDPROC(__muldi3) ENDPROC(__aeabi_lmul) +EXPORT_SYMBOL(__muldi3) +EXPORT_SYMBOL(__aeabi_lmul)
arch/arm/lib/putuser.S +5 -0
@@ -31,6 +31,7 @@ #include <asm/assembler.h> #include <asm/errno.h> #include <asm/domain.h> +#include <asm/export.h> ENTRY(__put_user_1) check_uaccess r0, 1, r1, ip, __put_user_bad
@@ -38,6 +39,7 @@ ENTRY(__put_user_1) mov r0, #0 ret lr ENDPROC(__put_user_1) +EXPORT_SYMBOL(__put_user_1) ENTRY(__put_user_2) check_uaccess r0, 2, r1, ip, __put_user_bad
@@ -62,6 +64,7 @@ ENTRY(__put_user_2) mov r0, #0 ret lr ENDPROC(__put_user_2) +EXPORT_SYMBOL(__put_user_2) ENTRY(__put_user_4) check_uaccess r0, 4, r1, ip, __put_user_bad
@@ -69,6 +72,7 @@ ENTRY(__put_user_4) mov r0, #0 ret lr ENDPROC(__put_user_4) +EXPORT_SYMBOL(__put_user_4) ENTRY(__put_user_8) check_uaccess r0, 8, r1, ip, __put_user_bad
@@ -82,6 +86,7 @@ ENTRY(__put_user_8) mov r0, #0 ret lr ENDPROC(__put_user_8) +EXPORT_SYMBOL(__put_user_8) __put_user_bad: mov r0, #-EFAULT
arch/arm/lib/strchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -25,3 +26,4 @@ ENTRY(strchr) subeq r0, r0, #1 ret lr ENDPROC(strchr) +EXPORT_SYMBOL(strchr)
arch/arm/lib/strrchr.S +2 -0
@@ -11,6 +11,7 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> .text .align 5
@@ -24,3 +25,4 @@ ENTRY(strrchr) mov r0, r3 ret lr ENDPROC(strrchr) +EXPORT_SYMBOL(strrchr)
arch/arm/lib/uaccess_with_memcpy.c +3 -0
@@ -19,6 +19,7 @@#include <linux/gfp.h> #include <linux/highmem.h> #include <linux/hugetlb.h> +#include <linux/export.h> #include <asm/current.h> #include <asm/page.h>
@@ -156,6 +157,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n) }return n; } +EXPORT_SYMBOL (arm_copy_to_user);static unsigned long noinline __clear_user_memset (void __user *addr,unsigned long n)
@@ -213,6 +215,7 @@ unsigned long arm_clear_user(void __user *addr, unsigned long n) }return n; } +EXPORT_SYMBOL (arm_clear_user);#if 0
arch/arm/lib/ucmpdi2.S +3 -0
@@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #ifdef __ARMEB__ #define xh r0
@@ -35,6 +36,7 @@ ENTRY(__ucmpdi2) ret lr ENDPROC(__ucmpdi2) +EXPORT_SYMBOL(__ucmpdi2) #ifdef CONFIG_AEABI
@@ -48,6 +50,7 @@ ENTRY(__aeabi_ulcmp) ret lr ENDPROC(__aeabi_ulcmp) +EXPORT_SYMBOL(__aeabi_ulcmp) #endif
arch/arm/mach-imx/Makefile +0 -1
@@ -32,7 +32,6 @@ endif ifdef CONFIG_SND_IMX_SOC obj-y += ssi-fiq.o -obj-y += ssi-fiq-ksym.o endif # i.MX1 based machines
arch/arm/mach-imx/ssi-fiq-ksym.c deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* Exported ksyms for the SSI FIQ handler -* -* Copyright (C) 2009, Sascha Hauer <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <linux/module.h> - -#include <linux/platform_data/asoc-imx-ssi.h> - -EXPORT_SYMBOL (imx_ssi_fiq_tx_buffer); -EXPORT_SYMBOL (imx_ssi_fiq_rx_buffer); -EXPORT_SYMBOL (imx_ssi_fiq_start); -EXPORT_SYMBOL (imx_ssi_fiq_end); -EXPORT_SYMBOL (imx_ssi_fiq_base); -
arch/arm/mach-imx/ssi-fiq.S +6 -1
@@ -8,6 +8,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> /* * r8 = bit 0-15: tx offset, bit 16-31: tx buffer size
@@ -144,4 +145,8 @@ imx_ssi_fiq_tx_buffer: .word 0x0 .L_imx_ssi_fiq_end: imx_ssi_fiq_end: - +EXPORT_SYMBOL(imx_ssi_fiq_tx_buffer) +EXPORT_SYMBOL(imx_ssi_fiq_rx_buffer) +EXPORT_SYMBOL(imx_ssi_fiq_start) +EXPORT_SYMBOL(imx_ssi_fiq_end) +EXPORT_SYMBOL(imx_ssi_fiq_base)
Signature · 1 line
2.1.4
Re: [PATCH v2 07/13] arm: move exports to definitions
Quoted 3 lines · Al Viro
From: Al Viro <[email protected]>
Signed-off-by Al Viro <[email protected]>
The following construct is incompatible with my autoksyms series:
Quoted 12 lines
arch/arm/lib/bitops.h +1
-0@@ -1,5 +1,6 @@#include <asm/assembler.h> #include <asm/unwind.h> +#include <asm/export.h> #if __LINUX_ARM_ARCH__ >=6 .macro bitop, name, instr
arch/arm/lib/bitops.h UNWIND( .fnstart ) · line 30
Quoted 5 lines
arch/arm/lib/bitops.h +1
-0@@ -25,6 +26,7 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) +EXPORT_SYMBOL(\name ) .endm
Here \name is an assembler macro argument and it is not subject to preprocessor substitutions. And the assembler doesn't see preprocessor macros either.
So I'd suggest folding the following patch to let the preprocessor see the actual symbol name. It doesn't make the source code as compact but it works with my series.
arch/arm/lib/bitops.h +0 -5
@@ -1,6 +1,5 @@#include <asm/assembler.h> #include <asm/unwind.h> -#include <asm/export.h> #if __LINUX_ARM_ARCH__ >=6 .macro bitop, name, instr
@@ -26,7 +25,6 @@ UNWIND( .fnstart ) bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm .macro testop, name, instr, store
@@ -57,7 +55,6 @@ UNWIND( .fnstart ) 2: bx lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm #else .macro bitop, name, instr
@@ -77,7 +74,6 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm /**
@@ -106,6 +102,5 @@ UNWIND( .fnstart ) ret lr UNWIND( .fnend ) ENDPROC(\name ) -EXPORT_SYMBOL(\name ) .endm#endif
arch/arm/lib/changebit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text bitop _change_bit, eor + +EXPORT_SYMBOL(_change_bit)
arch/arm/lib/clearbit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text bitop _clear_bit, bic + +EXPORT_SYMBOL(_clear_bit)
arch/arm/lib/setbit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text bitop _set_bit, orr + +EXPORT_SYMBOL(_set_bit)
arch/arm/lib/testchangebit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text testop _test_and_change_bit, eor, str + +EXPORT_SYMBOL(_test_and_change_bit)
arch/arm/lib/testclearbit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text testop _test_and_clear_bit, bicne, strne + +EXPORT_SYMBOL(_test_and_clear_bit)
arch/arm/lib/testsetbit.S +3 -0
@@ -9,7 +9,10 @@ */ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/export.h> #include "bitops.h" .text testop _test_and_set_bit, orreq, streq + +EXPORT_SYMBOL(_test_and_set_bit)
PATCH v2 8/13 ppc: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
... and don't export a static inline; it works, but it's completely pointless.
--- arch/powerpc/include/asm/Kbuild | 1 + arch/powerpc/kernel/Makefile | 4 --- arch/powerpc/kernel/entry_32.S | 2 ++ arch/powerpc/kernel/entry_64.S | 3 ++ arch/powerpc/kernel/epapr_hcalls.S | 2 ++ arch/powerpc/kernel/fpu.S | 3 ++ arch/powerpc/kernel/head_32.S | 5 +++ arch/powerpc/kernel/head_40x.S | 2 ++ arch/powerpc/kernel/head_44x.S | 2 ++ arch/powerpc/kernel/head_64.S | 2 ++ arch/powerpc/kernel/head_8xx.S | 2 ++ arch/powerpc/kernel/head_fsl_booke.S | 2 ++ arch/powerpc/kernel/misc.S | 2 ++ arch/powerpc/kernel/misc_32.S | 12 +++++++ arch/powerpc/kernel/misc_64.S | 4 +++ arch/powerpc/kernel/pci-common.c | 1 + arch/powerpc/kernel/pci_32.c | 2 ++ arch/powerpc/kernel/ppc_ksyms.c | 39 ----------------------- arch/powerpc/kernel/ppc_ksyms_32.c | 61 ------------------------------------ arch/powerpc/kernel/setup_32.c | 6 ++++ arch/powerpc/kernel/time.c | 1 + arch/powerpc/kernel/vector.S | 4 +++ arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/checksum_32.S | 4 +++ arch/powerpc/lib/checksum_64.S | 4 +++ arch/powerpc/lib/copy_32.S | 5 +++ arch/powerpc/lib/copypage_64.S | 2 ++ arch/powerpc/lib/copyuser_64.S | 2 ++ arch/powerpc/lib/hweight_64.S | 5 +++ arch/powerpc/lib/mem_64.S | 3 ++ arch/powerpc/lib/memcmp_64.S | 2 ++ arch/powerpc/lib/memcpy_64.S | 2 ++ arch/powerpc/lib/ppc_ksyms.c | 35 --------------------- arch/powerpc/lib/string.S | 10 ++++++ arch/powerpc/lib/string_64.S | 2 ++ arch/powerpc/mm/hash_low_32.S | 3 ++ arch/powerpc/sysdev/dcr-low.S | 3 ++ 37 files changed, 106 insertions(+), 140 deletions(-) delete mode 100644 arch/powerpc/kernel/ppc_ksyms.c delete mode 100644 arch/powerpc/kernel/ppc_ksyms_32.c delete mode 100644 arch/powerpc/lib/ppc_ksyms.c
arch/powerpc/include/asm/Kbuild +1 -0
@@ -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
arch/powerpc/kernel/Makefile +0 -4
@@ -92,10 +92,6 @@ obj-$(CONFIG_RELOCATABLE_PPC32) += reloc_32.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
arch/powerpc/kernel/entry_32.S +2 -0
@@ -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.
@@ -1342,6 +1343,7 @@ _GLOBAL(_mcount) MCOUNT_RESTORE_FRAME bctr #endif +EXPORT_SYMBOL(_mcount) _GLOBAL(ftrace_stub) blr
arch/powerpc/kernel/entry_64.S +3 -0
@@ -36,6 +36,7 @@ #include <asm/hw_irq.h> #include <asm/context_tracking.h> #include <asm/tm.h> +#include <asm/export.h> /* * System calls.
@@ -1143,6 +1144,7 @@ _GLOBAL(enter_prom) #ifdef CONFIG_DYNAMIC_FTRACE _GLOBAL(mcount) _GLOBAL(_mcount) +EXPORT_SYMBOL(_mcount) blr _GLOBAL_TOC(ftrace_caller)
@@ -1170,6 +1172,7 @@ _GLOBAL(ftrace_stub) blr #else _GLOBAL_TOC(_mcount) +EXPORT_SYMBOL(_mcount) /* Taken from output of objdump from lib64/glibc */ mflr r3 ld r11, 0(r1)
arch/powerpc/kernel/epapr_hcalls.S +2 -0
@@ -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() */
@@ -53,3 +54,4 @@ epapr_hypercall_start: nop nop blr +EXPORT_SYMBOL(epapr_hypercall_start)
arch/powerpc/kernel/fpu.S +3 -0
@@ -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) \
@@ -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
@@ -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.
arch/powerpc/kernel/head_32.S +5 -0
@@ -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) \
@@ -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
@@ -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
@@ -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:
@@ -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.
arch/powerpc/kernel/head_40x.S +2 -0
@@ -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
@@ -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
arch/powerpc/kernel/head_44x.S +2 -0
@@ -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"
@@ -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.
arch/powerpc/kernel/head_64.S +2 -0
@@ -40,6 +40,7 @@ #include <asm/kvm_book3s_asm.h> #include <asm/ptrace.h> #include <asm/hw_irq.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
@@ -881,6 +882,7 @@ start_here_common: .globl empty_zero_page empty_zero_page: .space PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .globl swapper_pg_dir swapper_pg_dir:
arch/powerpc/kernel/head_8xx.S +2 -0
@@ -30,6 +30,7 @@ #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> #include <asm/ptrace.h> +#include <asm/export.h> /* Macro to make the code more readable. */ #ifdef CONFIG_8xx_CPU6
@@ -930,6 +931,7 @@ sdata: .align PAGE_SHIFT empty_zero_page: .space PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .globl swapper_pg_dir swapper_pg_dir:
arch/powerpc/kernel/head_fsl_booke.S +2 -0
@@ -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
@@ -1297,6 +1298,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
arch/powerpc/kernel/misc.S +2 -0
@@ -18,6 +18,7 @@ #include <asm/unistd.h> #include <asm/asm-compat.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .text
@@ -118,3 +119,4 @@ _GLOBAL(longjmp) _GLOBAL(current_stack_pointer) PPC_LL r3,0(r1) blr +EXPORT_SYMBOL(current_stack_pointer)
arch/powerpc/kernel/misc_32.S +12 -0
@@ -33,6 +33,7 @@ #include <asm/kexec.h> #include <asm/bug.h> #include <asm/ptrace.h> +#include <asm/export.h> .text
@@ -337,6 +338,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE) #endif /* CONFIG_8xx/4xx */ isync blr +EXPORT_SYMBOL(flush_instruction_cache) /* * Write any modified data cache blocks out to memory
@@ -376,6 +378,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) sync /* additional sync needed on g4 */ isync blr +EXPORT_SYMBOL(flush_icache_range) /* * Write any modified data cache blocks out to memory. * Does not invalidate the corresponding cache lines (especially for
@@ -418,6 +421,7 @@ _GLOBAL(flush_dcache_range) bdnz 1b sync /* wait for dcbst's to get to ram */ blr +EXPORT_SYMBOL(flush_dcache_range) /* * Like above, but invalidate the D-cache. This is used by the 8xx
@@ -549,6 +553,7 @@ _GLOBAL(clear_pages) stw r7,8(r3); \ stw r8,12(r3); \ stwu r9,16(r3) +EXPORT_SYMBOL(clear_pages) _GLOBAL(copy_page) addi r3,r3,-4
@@ -594,6 +599,7 @@ _GLOBAL(copy_page) li r0,MAX_COPY_PREFETCH li r11,4 b 2b +EXPORT_SYMBOL(copy_page) /* * Extended precision shifts.
@@ -621,6 +627,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
@@ -632,6 +639,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
@@ -643,6 +651,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)
@@ -658,6 +667,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.
@@ -672,6 +682,7 @@ _GLOBAL(__ucmpdi2) bltlr li r3,2 blr +EXPORT_SYMBOL(__ucmpdi2) _GLOBAL(__bswapdi2) rotlwi r9,r4,8
@@ -683,6 +694,7 @@ _GLOBAL(__bswapdi2) mr r3,r9 mr r4,r10 blr +EXPORT_SYMBOL(__bswapdi2) _GLOBAL(abs) srawi r4,r3,31
arch/powerpc/kernel/misc_64.S +4 -0
@@ -27,6 +27,7 @@ #include <asm/kexec.h> #include <asm/ptrace.h> #include <asm/mmu.h> +#include <asm/export.h> .text
@@ -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. *
@@ -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.
@@ -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
arch/powerpc/kernel/pci-common.c +1 -0
@@ -49,6 +49,7 @@ static int global_phb_number; /* Global phb counter *//* 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;
arch/powerpc/kernel/pci_32.c +2 -0
@@ -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 );
arch/powerpc/kernel/ppc_ksyms.c deleted +0 -39
@@ -1,39 +0,0 @@ -#include <linux/ftrace.h> -#include <linux/mm.h> - -#include <asm/processor.h> -#include <asm/switch_to.h> -#include <asm/cacheflush.h> -#include <asm/epapr_hcalls.h> - -EXPORT_SYMBOL (flush_dcache_range); -EXPORT_SYMBOL (flush_icache_range); - -EXPORT_SYMBOL (empty_zero_page); - -long long __bswapdi2 (long long ); -EXPORT_SYMBOL (__bswapdi2); - -#ifdef CONFIG_FUNCTION_TRACER -EXPORT_SYMBOL (_mcount); -#endif - -#ifdef CONFIG_PPC_FPU -EXPORT_SYMBOL (load_fp_state); -EXPORT_SYMBOL (store_fp_state); -#endif - -#ifdef CONFIG_ALTIVEC -EXPORT_SYMBOL (load_vr_state); -EXPORT_SYMBOL (store_vr_state); -#endif - -#ifdef CONFIG_VSX -EXPORT_SYMBOL_GPL (__giveup_vsx); -#endif - -#ifdef CONFIG_EPAPR_PARAVIRT -EXPORT_SYMBOL (epapr_hypercall_start); -#endif - -EXPORT_SYMBOL (current_stack_pointer);
arch/powerpc/kernel/ppc_ksyms_32.c deleted +0 -61
61 lines not on this page · raw message
arch/powerpc/kernel/setup_32.c +6 -0
@@ -16,6 +16,7 @@#include <linux/cpu.h> #include <linux/console.h> #include <linux/memblock.h> +#include <linux/export.h> #include <asm/io.h> #include <asm/prom.h>
@@ -48,11 +49,16 @@ int boot_cpuid_phys;EXPORT_SYMBOL_GPL (boot_cpuid_phys);int smp_hw_index[NR_CPUS ]; +EXPORT_SYMBOL (smp_hw_index);unsigned long ISA_DMA_THRESHOLD ;unsigned int DMA_MODE_READ ;unsigned int DMA_MODE_WRITE ; +EXPORT_SYMBOL (ISA_DMA_THRESHOLD ); +EXPORT_SYMBOL (DMA_MODE_READ ); +EXPORT_SYMBOL (DMA_MODE_WRITE ); +/* * These are used in binfmt_elf.c to put aux entries on the stack * for each elf executable being started.
arch/powerpc/kernel/time.c +1 -0
@@ -565,6 +565,7 @@ void timer_interrupt(struct pt_regs * regs)irq_exit ();set_irq_regs (old_regs); } +EXPORT_SYMBOL (timer_interrupt);/* * Hypervisor decrementer interrupts shouldn't occur but are sometimes
arch/powerpc/kernel/vector.S +4 -0
@@ -6,6 +6,7 @@ #include <asm/thread_info.h> #include <asm/page.h> #include <asm/ptrace.h> +#include <asm/export.h> #ifdef CONFIG_PPC_TRANSACTIONAL_MEM /* void do_load_up_transact_altivec(struct thread_struct *thread)
@@ -42,6 +43,7 @@ _GLOBAL(load_vr_state) mtvscr v0 REST_32VRS(0,r4,r3) blr +EXPORT_SYMBOL(load_vr_state) /* * Store VMX state into memory, including VSCR.
@@ -53,6 +55,7 @@ _GLOBAL(store_vr_state) li r4, VRSTATE_VSCR stvx v0, r4, r3 blr +EXPORT_SYMBOL(store_vr_state) /* * Disable VMX for the task which had it previously,
@@ -179,6 +182,7 @@ _GLOBAL(__giveup_vsx) std r4,_MSR-STACK_FRAME_OVERHEAD(r5) 1: blr +EXPORT_SYMBOL_GPL(__giveup_vsx) #endif /* CONFIG_VSX */
arch/powerpc/lib/Makefile +1 -1
@@ -9,7 +9,7 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) CFLAGS_REMOVE_code-patching.o = -pg CFLAGS_REMOVE_feature-fixups.o = -pg -obj-y += string.o alloc.o crtsavres.o ppc_ksyms.o code-patching.o \ +obj-y += string.o alloc.o crtsavres.o code-patching.o \ feature-fixups.o obj-$(CONFIG_PPC32) += div64.o copy_32.o
arch/powerpc/lib/checksum_32.S +4 -0
@@ -16,6 +16,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .text
@@ -39,6 +40,7 @@ _GLOBAL(ip_fast_csum) not r3,r3 srwi r3,r3,16 blr +EXPORT_SYMBOL(ip_fast_csum) /* * computes the checksum of a memory block at buff, length len,
@@ -77,6 +79,7 @@ _GLOBAL(csum_partial) adde r0,r0,r5 5: addze r3,r0 /* add in final carry */ blr +EXPORT_SYMBOL(csum_partial) /* * Computes the checksum of a memory block at src, length len,
@@ -207,3 +210,4 @@ dst_error: .long 95b,dst_error .long 96b,dst_error .long 97b,dst_error +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/powerpc/lib/checksum_64.S +4 -0
@@ -16,6 +16,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> /* * ip_fast_csum(r3=buf, r4=len) -- Optimized for IP header
@@ -43,6 +44,7 @@ _GLOBAL(ip_fast_csum) not r3,r3 srwi r3,r3,16 blr +EXPORT_SYMBOL(ip_fast_csum) /* * Computes the checksum of a memory block at buff, length len,
@@ -203,6 +205,7 @@ _GLOBAL(csum_partial) add r3,r4,r0 srdi r3,r3,32 blr +EXPORT_SYMBOL(csum_partial) .macro srcnr
@@ -457,3 +460,4 @@ dstnr; stb r6,0(r4) li r6,-EFAULT stw r6,0(r8) blr +EXPORT_SYMBOL(csum_partial_copy_generic)
arch/powerpc/lib/copy_32.S +5 -0
@@ -12,6 +12,7 @@ #include <asm/cache.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> #define COPY_16_BYTES \ lwz r7,4(r4); \
@@ -92,6 +93,7 @@ _GLOBAL(memset) subf r6,r0,r6 cmplwi 0,r4,0 bne 2f /* Use normal procedure if r4 is not zero */ +EXPORT_SYMBOL(memset) _GLOBAL(memset_nocache_branch) b 2f /* Skip optimised bloc until cache is enabled */
@@ -216,6 +218,8 @@ _GLOBAL(memcpy) stbu r0,1(r6) bdnz 40b 65: blr +EXPORT_SYMBOL(memcpy) +EXPORT_SYMBOL(memmove) _GLOBAL(generic_memcpy) srwi. r7,r5,3
@@ -507,3 +511,4 @@ _GLOBAL(__copy_tofrom_user) .long 112b,120b .long 114b,120b .text +EXPORT_SYMBOL(__copy_tofrom_user)
arch/powerpc/lib/copypage_64.S +2 -0
@@ -10,6 +10,7 @@ #include <asm/processor.h> #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .section ".toc","aw" PPC64_CACHES:
@@ -110,3 +111,4 @@ END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ) std r11,120(r3) std r12,128(r3) blr +EXPORT_SYMBOL(copy_page)
arch/powerpc/lib/copyuser_64.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> #ifdef __BIG_ENDIAN__ #define sLd sld /* Shift towards low-numbered address. */
@@ -671,3 +672,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) .llong 89b,100b .llong 90b,100b .llong 91b,100b +EXPORT_SYMBOL(__copy_tofrom_user)
arch/powerpc/lib/hweight_64.S +5 -0
@@ -19,6 +19,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> /* Note: This code relies on -mminimal-toc */
@@ -32,6 +33,7 @@ FTR_SECTION_ELSE clrldi r3,r3,64-8 blr ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight8) _GLOBAL(__arch_hweight16) BEGIN_FTR_SECTION
@@ -54,6 +56,7 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 50) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight16) _GLOBAL(__arch_hweight32) BEGIN_FTR_SECTION
@@ -79,6 +82,7 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 51) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight32) _GLOBAL(__arch_hweight64) BEGIN_FTR_SECTION
@@ -108,3 +112,4 @@ FTR_SECTION_ELSE blr ALT_FTR_SECTION_END_NESTED_IFCLR(CPU_FTR_POPCNTD, 52) ALT_FTR_SECTION_END_IFCLR(CPU_FTR_POPCNTB) +EXPORT_SYMBOL(__arch_hweight64)
arch/powerpc/lib/mem_64.S +3 -0
@@ -11,6 +11,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> _GLOBAL(memset) neg r0,r3
@@ -76,6 +77,7 @@ _GLOBAL(memset) 10: bflr 31 stb r4,0(r6) blr +EXPORT_SYMBOL(memset) _GLOBAL_TOC(memmove) cmplw 0,r3,r4
@@ -117,3 +119,4 @@ _GLOBAL(backwards_memcpy) beq 2b mtctr r7 b 1b +EXPORT_SYMBOL(memmove)
arch/powerpc/lib/memcmp_64.S +2 -0
@@ -8,6 +8,7 @@ * 2 of the License, or (at your option) any later version. */ #include <asm/ppc_asm.h> +#include <asm/export.h> #define off8 r6 #define off16 r7
@@ -231,3 +232,4 @@ _GLOBAL(memcmp) ld r28,-32(r1) ld r27,-40(r1) blr +EXPORT_SYMBOL(memcmp)
arch/powerpc/lib/memcpy_64.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/processor.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .align 7 _GLOBAL_TOC(memcpy)
@@ -219,3 +220,4 @@ END_FTR_SECTION_IFCLR(CPU_FTR_UNALIGNED_LD_STD) 4: ld r3,-STACKFRAMESIZE+STK_REG(R31)(r1) /* return dest pointer */ blr #endif +EXPORT_SYMBOL(memcpy)
arch/powerpc/lib/ppc_ksyms.c deleted +0 -35
@@ -1,35 +0,0 @@ -#include <linux/string.h> -#include <linux/uaccess.h> -#include <linux/bitops.h> -#include <net/checksum.h> - -EXPORT_SYMBOL (memcpy); -EXPORT_SYMBOL (memset); -EXPORT_SYMBOL (memmove); -EXPORT_SYMBOL (memcmp); -EXPORT_SYMBOL (memchr); - -EXPORT_SYMBOL (strcpy); -EXPORT_SYMBOL (strncpy); -EXPORT_SYMBOL (strcat); -EXPORT_SYMBOL (strlen); -EXPORT_SYMBOL (strcmp); -EXPORT_SYMBOL (strncmp); - -#ifndef CONFIG_GENERIC_CSUM -EXPORT_SYMBOL (csum_partial); -EXPORT_SYMBOL (csum_partial_copy_generic); -EXPORT_SYMBOL (ip_fast_csum); -EXPORT_SYMBOL (csum_tcpudp_magic); -#endif - -EXPORT_SYMBOL (__copy_tofrom_user); -EXPORT_SYMBOL (__clear_user); -EXPORT_SYMBOL (copy_page); - -#ifdef CONFIG_PPC64 -EXPORT_SYMBOL (__arch_hweight8); -EXPORT_SYMBOL (__arch_hweight16); -EXPORT_SYMBOL (__arch_hweight32); -EXPORT_SYMBOL (__arch_hweight64); -#endif
arch/powerpc/lib/string.S +10 -0
@@ -11,6 +11,7 @@ #include <asm/processor.h> #include <asm/errno.h> #include <asm/ppc_asm.h> +#include <asm/export.h> .section __ex_table,"a" PPC_LONG_ALIGN
@@ -24,6 +25,7 @@ _GLOBAL(strcpy) stbu r0,1(r5) bne 1b blr +EXPORT_SYMBOL(strcpy) /* This clears out any unused part of the destination buffer, just as the libc version does. -- paulus */
@@ -44,6 +46,7 @@ _GLOBAL(strncpy) 2: stbu r0,1(r6) /* clear it out if so */ bdnz 2b blr +EXPORT_SYMBOL(strncpy) _GLOBAL(strcat) addi r5,r3,-1
@@ -57,6 +60,7 @@ _GLOBAL(strcat) stbu r0,1(r5) bne 1b blr +EXPORT_SYMBOL(strcat) _GLOBAL(strcmp) addi r5,r3,-1
@@ -68,6 +72,7 @@ _GLOBAL(strcmp) beqlr 1 beq 1b blr +EXPORT_SYMBOL(strcmp) _GLOBAL(strncmp) PPC_LCMPI 0,r5,0
@@ -84,6 +89,7 @@ _GLOBAL(strncmp) blr 2: li r3,0 blr +EXPORT_SYMBOL(strncmp) _GLOBAL(strlen) addi r4,r3,-1
@@ -92,6 +98,7 @@ _GLOBAL(strlen) bne 1b subf r3,r3,r4 blr +EXPORT_SYMBOL(strlen) #ifdef CONFIG_PPC32 _GLOBAL(memcmp)
@@ -107,6 +114,7 @@ _GLOBAL(memcmp) blr 2: li r3,0 blr +EXPORT_SYMBOL(memcmp) #endif _GLOBAL(memchr)
@@ -120,6 +128,7 @@ _GLOBAL(memchr) beqlr 2: li r3,0 blr +EXPORT_SYMBOL(memchr) #ifdef CONFIG_PPC32 _GLOBAL(__clear_user)
@@ -163,4 +172,5 @@ _GLOBAL(__clear_user) PPC_LONG 1b,91b PPC_LONG 8b,92b .text +EXPORT_SYMBOL(__clear_user) #endif
arch/powerpc/lib/string_64.S +2 -0
@@ -20,6 +20,7 @@ #include <asm/ppc_asm.h> #include <asm/asm-offsets.h> +#include <asm/export.h> .section ".toc","aw" PPC64_CACHES:
@@ -200,3 +201,4 @@ err1; dcbz r0,r3 cmpdi r4,32 blt .Lshort_clear b .Lmedium_clear +EXPORT_SYMBOL(__clear_user)
arch/powerpc/mm/hash_low_32.S +3 -0
@@ -26,6 +26,7 @@ #include <asm/ppc_asm.h> #include <asm/thread_info.h> #include <asm/asm-offsets.h> +#include <asm/export.h> #ifdef CONFIG_SMP .section .bss
@@ -33,6 +34,7 @@ .globl mmu_hash_lock mmu_hash_lock: .space 4 +EXPORT_SYMBOL(mmu_hash_lock) #endif /* CONFIG_SMP */ /*
@@ -575,6 +577,7 @@ _GLOBAL(flush_hash_pages) rlwinm r8,r8,0,31,29 /* clear HASHPTE bit */ stwcx. r8,0,r5 /* update the pte */ bne- 33b +EXPORT_SYMBOL(flush_hash_pages) /* Get the address of the primary PTE group in the hash table (r3) */ _GLOBAL(flush_hash_patch_A)
arch/powerpc/sysdev/dcr-low.S +3 -0
@@ -12,6 +12,7 @@ #include <asm/ppc_asm.h> #include <asm/processor.h> #include <asm/bug.h> +#include <asm/export.h> #define DCR_ACCESS_PROLOG(table) \ cmpli cr0,r3,1024; \
@@ -28,9 +29,11 @@ _GLOBAL(__mfdcr) DCR_ACCESS_PROLOG(__mfdcr_table) +EXPORT_SYMBOL(__mfdcr) _GLOBAL(__mtdcr) DCR_ACCESS_PROLOG(__mtdcr_table) +EXPORT_SYMBOL(__mtdcr) __mfdcr_table: mfdcr r3,0; blr
Signature · 1 line
2.1.4
PATCH v2 9/13 ppc: get rid of unreachable abs() implementation
In reply to Al ViroFrom: Al Viro <[email protected]>
Both the extern and export had been killed off by Christoph back in 2004; the actual implementation had been left behind. Time to end that depravity, let's bury the body...
--- arch/powerpc/kernel/misc_32.S | 6 ------ 1 file changed, 6 deletions(-)
arch/powerpc/kernel/misc_32.S +0 -6
@@ -696,12 +696,6 @@ _GLOBAL(__bswapdi2) blr EXPORT_SYMBOL(__bswapdi2) -_GLOBAL(abs) - srawi r4,r3,31 - xor r3,r3,r4 - sub r3,r3,r4 - blr - #ifdef CONFIG_SMP _GLOBAL(start_secondary_resume) /* Reset stack */
Signature · 1 line
2.1.4
PATCH v2 10/13 sparc: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/sparc/include/asm/Kbuild | 1 + arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/entry.S | 3 + arch/sparc/kernel/head_32.S | 3 + arch/sparc/kernel/head_64.S | 7 +- arch/sparc/kernel/helpers.S | 2 + arch/sparc/kernel/hvcalls.S | 4 + arch/sparc/kernel/sparc_ksyms.c | 12 +++ arch/sparc/kernel/sparc_ksyms_32.c | 31 ------- arch/sparc/kernel/sparc_ksyms_64.c | 52 ------------ arch/sparc/lib/Makefile | 1 - arch/sparc/lib/U1memcpy.S | 2 + arch/sparc/lib/VISsave.S | 2 + arch/sparc/lib/ashldi3.S | 2 + arch/sparc/lib/ashrdi3.S | 2 + arch/sparc/lib/atomic_64.S | 10 ++- arch/sparc/lib/bitops.S | 7 ++ arch/sparc/lib/blockops.S | 3 + arch/sparc/lib/bzero.S | 4 + arch/sparc/lib/checksum_32.S | 3 + arch/sparc/lib/checksum_64.S | 2 + arch/sparc/lib/clear_page.S | 3 + arch/sparc/lib/copy_in_user.S | 2 + arch/sparc/lib/copy_page.S | 2 + arch/sparc/lib/copy_user.S | 2 + arch/sparc/lib/csum_copy.S | 3 + arch/sparc/lib/divdi3.S | 2 + arch/sparc/lib/ffs.S | 3 + arch/sparc/lib/hweight.S | 5 ++ arch/sparc/lib/ipcsum.S | 2 + arch/sparc/lib/ksyms.c | 165 ------------------------------------- arch/sparc/lib/locks.S | 5 ++ arch/sparc/lib/lshrdi3.S | 2 + arch/sparc/lib/mcount.S | 2 + arch/sparc/lib/memcmp.S | 2 + arch/sparc/lib/memcpy.S | 4 + arch/sparc/lib/memmove.S | 2 + arch/sparc/lib/memscan_32.S | 4 + arch/sparc/lib/memscan_64.S | 4 + arch/sparc/lib/memset.S | 3 + arch/sparc/lib/muldi3.S | 2 + arch/sparc/lib/strlen.S | 2 + arch/sparc/lib/strncmp_32.S | 2 + arch/sparc/lib/strncmp_64.S | 2 + arch/sparc/lib/xor.S | 9 ++ 45 files changed, 136 insertions(+), 253 deletions(-) create mode 100644 arch/sparc/kernel/sparc_ksyms.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_32.c delete mode 100644 arch/sparc/kernel/sparc_ksyms_64.c delete mode 100644 arch/sparc/lib/ksyms.c
arch/sparc/include/asm/Kbuild +1 -0
@@ -6,6 +6,7 @@ generic-y += cputime.h generic-y += div64.h generic-y += emergency-restart.h generic-y += exec.h +generic-y += export.h generic-y += irq_regs.h generic-y += irq_work.h generic-y += linkage.h
arch/sparc/kernel/Makefile +1 -1
@@ -85,7 +85,7 @@ obj-y += auxio_$(BITS).o obj-$(CONFIG_SUN_PM) += apc.o pmc.o obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_MODULES) += sparc_ksyms_$(BITS).o +obj-$(CONFIG_MODULES) += sparc_ksyms.o obj-$(CONFIG_SPARC_LED) += led.o obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
arch/sparc/kernel/entry.S +3 -0
@@ -29,6 +29,7 @@ #include <asm/unistd.h> #include <asm/asmmacro.h> +#include <asm/export.h> #define curptr g6
@@ -1190,6 +1191,8 @@ delay_continue: ret restore +EXPORT_SYMBOL(__udelay) +EXPORT_SYMBOL(__ndelay) /* Handle a software breakpoint */ /* We have to inform parent that child has stopped */
arch/sparc/kernel/head_32.S +3 -0
@@ -24,6 +24,7 @@ #include <asm/thread_info.h> /* TI_UWINMASK */ #include <asm/errno.h> #include <asm/pgtsrmmu.h> /* SRMMU_PGDIR_SHIFT */ +#include <asm/export.h> .data /* The following are used with the prom_vector node-ops to figure out
@@ -60,6 +61,7 @@ sun4e_notsup: */ .globl empty_zero_page empty_zero_page: .skip PAGE_SIZE +EXPORT_SYMBOL(empty_zero_page) .global root_flags .global ram_flags
@@ -813,3 +815,4 @@ lvl14_save: __ret_efault: ret restore %g0, -EFAULT, %o0 +EXPORT_SYMBOL(__ret_efault)
arch/sparc/kernel/head_64.S +6 -1
@@ -32,7 +32,8 @@ #include <asm/estate.h> #include <asm/sfafsr.h> #include <asm/unistd.h> - +#include <asm/export.h> + /* This section from from _start to sparc64_boot_end should fit into * 0x0000000000404000 to 0x0000000000408000. */
@@ -143,6 +144,7 @@ prom_cpu_compatible: .skip 64 prom_root_node: .word 0 +EXPORT_SYMBOL(prom_root_node) prom_mmu_ihandle_cache: .word 0 prom_boot_mapped_pc:
@@ -158,6 +160,7 @@ is_sun4v: .word 0 sun4v_chip_type: .word SUN4V_CHIP_INVALID +EXPORT_SYMBOL(sun4v_chip_type) 1: rd %pc, %l0
@@ -928,6 +931,7 @@ swapper_4m_tsb: .globl prom_tba, tlb_type prom_tba: .xword 0 tlb_type: .word 0 /* Must NOT end up in BSS */ +EXPORT_SYMBOL(tlb_type) .section ".fixup",#alloc,#execinstr .globl __ret_efault, __retl_efault, __ret_one, __retl_one
@@ -935,6 +939,7 @@ ENTRY(__ret_efault) ret restore %g0, -EFAULT, %o0 ENDPROC(__ret_efault) +EXPORT_SYMBOL(__ret_efault) ENTRY(__retl_efault) retl
arch/sparc/kernel/helpers.S +2 -0
@@ -15,6 +15,7 @@ __flushw_user: 2: retl nop .size __flushw_user,.-__flushw_user +EXPORT_SYMBOL(__flushw_user) /* Flush %fp and %i7 to the stack for all register * windows active inside of the cpu. This allows
@@ -61,3 +62,4 @@ real_hard_smp_processor_id: .size hard_smp_processor_id,.-hard_smp_processor_id #endif .size real_hard_smp_processor_id,.-real_hard_smp_processor_id +EXPORT_SYMBOL_GPL(real_hard_smp_processor_id)
arch/sparc/kernel/hvcalls.S +4 -0
@@ -775,6 +775,7 @@ ENTRY(sun4v_niagara_getperf) retl nop ENDPROC(sun4v_niagara_getperf) +EXPORT_SYMBOL(sun4v_niagara_getperf) ENTRY(sun4v_niagara_setperf) mov HV_FAST_SET_PERFREG, %o5
@@ -782,6 +783,7 @@ ENTRY(sun4v_niagara_setperf) retl nop ENDPROC(sun4v_niagara_setperf) +EXPORT_SYMBOL(sun4v_niagara_setperf) ENTRY(sun4v_niagara2_getperf) mov %o0, %o4
@@ -791,6 +793,7 @@ ENTRY(sun4v_niagara2_getperf) retl nop ENDPROC(sun4v_niagara2_getperf) +EXPORT_SYMBOL(sun4v_niagara2_getperf) ENTRY(sun4v_niagara2_setperf) mov HV_FAST_N2_SET_PERFREG, %o5
@@ -798,6 +801,7 @@ ENTRY(sun4v_niagara2_setperf) retl nop ENDPROC(sun4v_niagara2_setperf) +EXPORT_SYMBOL(sun4v_niagara2_setperf) ENTRY(sun4v_reboot_data_set) mov HV_FAST_REBOOT_DATA_SET, %o5
arch/sparc/kernel/sparc_ksyms.c new file +12 -0
@@ -0,0 +1,12 @@ +/* +* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. +* +* Copyright (C) 1996 David S. Miller ([email protected]) +* Copyright (C) 1996 Eddie C. Dost ([email protected]) +*/ + +#include <linux/init.h> +#include <linux/export.h> + +/* This is needed only for drivers/sbus/char/openprom.c */ +EXPORT_SYMBOL (saved_command_line);
arch/sparc/kernel/sparc_ksyms_32.c deleted +0 -31
@@ -1,31 +0,0 @@ -/* -* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. -* -* Copyright (C) 1996 David S. Miller ([email protected]) -* Copyright (C) 1996 Eddie C. Dost ([email protected]) -*/ - -#include <linux/module.h> - -#include <asm/pgtable.h> -#include <asm/uaccess.h> -#include <asm/delay.h> -#include <asm/head.h> -#include <asm/dma.h> - -struct poll { -int fd; -short events; -short revents; -}; - -/* from entry.S */ -EXPORT_SYMBOL (__udelay); -EXPORT_SYMBOL (__ndelay); - -/* from head_32.S */ -EXPORT_SYMBOL (__ret_efault); -EXPORT_SYMBOL (empty_zero_page); - -/* Exporting a symbol from /init/main.c */ -EXPORT_SYMBOL (saved_command_line);
arch/sparc/kernel/sparc_ksyms_64.c deleted +0 -52
52 lines not on this page · raw message
arch/sparc/lib/Makefile +0 -1
@@ -43,5 +43,4 @@ lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o hweight.o ffs.o obj-$(CONFIG_SPARC64) += iomap.o obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o -obj-y += ksyms.o obj-$(CONFIG_SPARC64) += PeeCeeI.o
arch/sparc/lib/U1memcpy.S +2 -0
@@ -7,6 +7,7 @@ #ifdef __KERNEL__ #include <asm/visasm.h> #include <asm/asi.h> +#include <asm/export.h> #define GLOBAL_SPARE g7 #else #define GLOBAL_SPARE g5
@@ -567,3 +568,4 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ mov EX_RETVAL(%o4), %o0 .size FUNC_NAME, .-FUNC_NAME +EXPORT_SYMBOL(FUNC_NAME)
arch/sparc/lib/VISsave.S +2 -0
@@ -13,6 +13,7 @@ #include <asm/ptrace.h> #include <asm/visasm.h> #include <asm/thread_info.h> +#include <asm/export.h> /* On entry: %o5=current FPRS value, %g7 is callers address */ /* May clobber %o5, %g1, %g2, %g3, %g7, %icc, %xcc */
@@ -79,3 +80,4 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3 80: jmpl %g7 + %g0, %g0 nop ENDPROC(VISenter) +EXPORT_SYMBOL(VISenter)
arch/sparc/lib/ashldi3.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(__ashldi3)
@@ -33,3 +34,4 @@ ENTRY(__ashldi3) retl nop ENDPROC(__ashldi3) +EXPORT_SYMBOL(__ashldi3)
arch/sparc/lib/ashrdi3.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(__ashrdi3)
@@ -35,3 +36,4 @@ ENTRY(__ashrdi3) jmpl %o7 + 8, %g0 nop ENDPROC(__ashrdi3) +EXPORT_SYMBOL(__ashrdi3)
arch/sparc/lib/atomic_64.S +8 -2
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> #include <asm/backoff.h> +#include <asm/export.h> .text
@@ -28,6 +29,7 @@ ENTRY(atomic_##op) /* %o0 = increment, %o1 = atomic_ptr */ \ nop; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ ENDPROC(atomic_##op); \ +EXPORT_SYMBOL(atomic_##op); \ #define ATOMIC_OP_RETURN(op) \ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
@@ -41,7 +43,8 @@ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \ retl; \ sra %g1, 0, %o0; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ -ENDPROC(atomic_##op##_return); +ENDPROC(atomic_##op##_return); \ +EXPORT_SYMBOL(atomic_##op##_return); \ #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op)
@@ -68,6 +71,7 @@ ENTRY(atomic64_##op) /* %o0 = increment, %o1 = atomic_ptr */ \ nop; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ ENDPROC(atomic64_##op); \ +EXPORT_SYMBOL(atomic64_##op); \ #define ATOMIC64_OP_RETURN(op) \ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \
@@ -81,7 +85,8 @@ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \ retl; \ op %g1, %o0, %o0; \ 2: BACKOFF_SPIN(%o2, %o3, 1b); \ -ENDPROC(atomic64_##op##_return); +ENDPROC(atomic64_##op##_return); \ +EXPORT_SYMBOL(atomic64_##op##_return); #define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op)
@@ -108,3 +113,4 @@ ENTRY(atomic64_dec_if_positive) /* %o0 = atomic_ptr */ sub %g1, 1, %o0 2: BACKOFF_SPIN(%o2, %o3, 1b) ENDPROC(atomic64_dec_if_positive) +EXPORT_SYMBOL(atomic64_dec_if_positive)
arch/sparc/lib/bitops.S +7 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> #include <asm/backoff.h> +#include <asm/export.h> .text
@@ -29,6 +30,7 @@ ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_set_bit) +EXPORT_SYMBOL(test_and_set_bit) ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -50,6 +52,7 @@ ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_clear_bit) +EXPORT_SYMBOL(test_and_clear_bit) ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -71,6 +74,7 @@ ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(test_and_change_bit) +EXPORT_SYMBOL(test_and_change_bit) ENTRY(set_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -90,6 +94,7 @@ ENTRY(set_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(set_bit) +EXPORT_SYMBOL(set_bit) ENTRY(clear_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -109,6 +114,7 @@ ENTRY(clear_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(clear_bit) +EXPORT_SYMBOL(clear_bit) ENTRY(change_bit) /* %o0=nr, %o1=addr */ BACKOFF_SETUP(%o3)
@@ -128,3 +134,4 @@ ENTRY(change_bit) /* %o0=nr, %o1=addr */ nop 2: BACKOFF_SPIN(%o3, %o4, 1b) ENDPROC(change_bit) +EXPORT_SYMBOL(change_bit)
arch/sparc/lib/blockops.S +3 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/page.h> +#include <asm/export.h> /* Zero out 64 bytes of memory at (buf + offset). * Assumes %g1 contains zero.
@@ -64,6 +65,7 @@ ENTRY(bzero_1page) retl nop ENDPROC(bzero_1page) +EXPORT_SYMBOL(bzero_1page) ENTRY(__copy_1page) /* NOTE: If you change the number of insns of this routine, please check
@@ -87,3 +89,4 @@ ENTRY(__copy_1page) retl nop ENDPROC(__copy_1page) +EXPORT_SYMBOL(__copy_1page)
arch/sparc/lib/bzero.S +4 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text
@@ -78,6 +79,8 @@ __bzero_done: mov %o3, %o0 ENDPROC(__bzero) ENDPROC(memset) +EXPORT_SYMBOL(__bzero) +EXPORT_SYMBOL(memset) #define EX_ST(x,y) \ 98: x,y; \
@@ -143,3 +146,4 @@ __clear_user_done: retl clr %o0 ENDPROC(__clear_user) +EXPORT_SYMBOL(__clear_user)
arch/sparc/lib/checksum_32.S +3 -0
@@ -14,6 +14,7 @@ */ #include <asm/errno.h> +#include <asm/export.h> #define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \ ldd [buf + offset + 0x00], t0; \
@@ -104,6 +105,7 @@ csum_partial_fix_alignment: * buffer of size 0x20. Follow the code path for that case. */ .globl csum_partial + EXPORT_SYMBOL(csum_partial) csum_partial: /* %o0=buf, %o1=len, %o2=sum */ andcc %o0, 0x7, %g0 ! alignment problems? bne csum_partial_fix_alignment ! yep, handle it
@@ -335,6 +337,7 @@ cc_dword_align: */ .align 8 .globl __csum_partial_copy_sparc_generic + EXPORT_SYMBOL(__csum_partial_copy_sparc_generic) __csum_partial_copy_sparc_generic: /* %o0=src, %o1=dest, %g1=len, %g7=sum */ xor %o0, %o1, %o4 ! get changing bits
arch/sparc/lib/checksum_64.S +2 -0
@@ -13,6 +13,7 @@ * BSD4.4 portable checksum routine */ +#include <asm/export.h> .text csum_partial_fix_alignment:
@@ -37,6 +38,7 @@ csum_partial_fix_alignment: .align 32 .globl csum_partial + EXPORT_SYMBOL(csum_partial) csum_partial: /* %o0=buff, %o1=len, %o2=sum */ prefetch [%o0 + 0x000], #n_reads clr %o4
arch/sparc/lib/clear_page.S +3 -0
@@ -10,6 +10,7 @@ #include <asm/pgtable.h> #include <asm/spitfire.h> #include <asm/head.h> +#include <asm/export.h> /* What we used to do was lock a TLB entry into a specific * TLB slot, clear the page with interrupts disabled, then
@@ -26,6 +27,7 @@ .text .globl _clear_page + EXPORT_SYMBOL(_clear_page) _clear_page: /* %o0=dest */ ba,pt %xcc, clear_page_common clr %o4
@@ -35,6 +37,7 @@ _clear_page: /* %o0=dest */ */ .align 32 .globl clear_user_page + EXPORT_SYMBOL(clear_user_page) clear_user_page: /* %o0=dest, %o1=vaddr */ lduw [%g6 + TI_PRE_COUNT], %o2 sethi %hi(PAGE_OFFSET), %g2
arch/sparc/lib/copy_in_user.S +2 -0
@@ -5,6 +5,7 @@ #include <linux/linkage.h> #include <asm/asi.h> +#include <asm/export.h> #define XCC xcc
@@ -90,3 +91,4 @@ ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */ retl clr %o0 ENDPROC(___copy_in_user) +EXPORT_SYMBOL(___copy_in_user)
arch/sparc/lib/copy_page.S +2 -0
@@ -10,6 +10,7 @@ #include <asm/pgtable.h> #include <asm/spitfire.h> #include <asm/head.h> +#include <asm/export.h> /* What we used to do was lock a TLB entry into a specific * TLB slot, clear the page with interrupts disabled, then
@@ -44,6 +45,7 @@ .align 32 .globl copy_user_page .type copy_user_page,#function + EXPORT_SYMBOL(copy_user_page) copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ lduw [%g6 + TI_PRE_COUNT], %o4 sethi %hi(PAGE_OFFSET), %g2
arch/sparc/lib/copy_user.S +2 -0
@@ -15,6 +15,7 @@ #include <asm/asmmacro.h> #include <asm/page.h> #include <asm/thread_info.h> +#include <asm/export.h> /* Work around cpp -rob */ #define ALLOC #alloc
@@ -119,6 +120,7 @@ __copy_user_begin: .globl __copy_user + EXPORT_SYMBOL(__copy_user) dword_align: andcc %o1, 1, %g0 be 4f
arch/sparc/lib/csum_copy.S +3 -0
@@ -3,6 +3,8 @@ * Copyright (C) 2005 David S. Miller <[email protected]> */ +#include <asm/export.h> + #ifdef __KERNEL__ #define GLOBAL_SPARE %g7 #else
@@ -63,6 +65,7 @@ add %o5, %o4, %o4 .globl FUNC_NAME + EXPORT_SYMBOL(FUNC_NAME) FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ LOAD(prefetch, %o0 + 0x000, #n_reads) xor %o0, %o1, %g1
arch/sparc/lib/divdi3.S +2 -0
@@ -17,6 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <asm/export.h> .text .align 4 .globl __divdi3
@@ -279,3 +280,4 @@ __divdi3: .LL81: ret restore +EXPORT_SYMBOL(__divdi3)
arch/sparc/lib/ffs.S +3 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .register %g2,#scratch
@@ -65,6 +66,8 @@ ENTRY(__ffs) add %o2, %g1, %o0 ENDPROC(ffs) ENDPROC(__ffs) +EXPORT_SYMBOL(__ffs) +EXPORT_SYMBOL(ffs) .section .popc_6insn_patch, "ax" .word ffs
arch/sparc/lib/hweight.S +5 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .text .align 32
@@ -7,6 +8,7 @@ ENTRY(__arch_hweight8) nop nop ENDPROC(__arch_hweight8) +EXPORT_SYMBOL(__arch_hweight8) .section .popc_3insn_patch, "ax" .word __arch_hweight8 sllx %o0, 64-8, %g1
@@ -19,6 +21,7 @@ ENTRY(__arch_hweight16) nop nop ENDPROC(__arch_hweight16) +EXPORT_SYMBOL(__arch_hweight16) .section .popc_3insn_patch, "ax" .word __arch_hweight16 sllx %o0, 64-16, %g1
@@ -31,6 +34,7 @@ ENTRY(__arch_hweight32) nop nop ENDPROC(__arch_hweight32) +EXPORT_SYMBOL(__arch_hweight32) .section .popc_3insn_patch, "ax" .word __arch_hweight32 sllx %o0, 64-32, %g1
@@ -43,6 +47,7 @@ ENTRY(__arch_hweight64) nop nop ENDPROC(__arch_hweight64) +EXPORT_SYMBOL(__arch_hweight64) .section .popc_3insn_patch, "ax" .word __arch_hweight64 retl
arch/sparc/lib/ipcsum.S +2 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(ip_fast_csum) /* %o0 = iph, %o1 = ihl */
@@ -31,3 +32,4 @@ ENTRY(ip_fast_csum) /* %o0 = iph, %o1 = ihl */ retl and %o2, %o1, %o0 ENDPROC(ip_fast_csum) +EXPORT_SYMBOL(ip_fast_csum)
arch/sparc/lib/ksyms.c deleted +0 -165
165 lines not on this page · raw message
arch/sparc/lib/locks.S +5 -0
@@ -10,6 +10,7 @@ #include <asm/psr.h> #include <asm/smp.h> #include <asm/spinlock.h> +#include <asm/export.h> .text .align 4
@@ -48,6 +49,7 @@ ___rw_write_enter_spin_on_wlock: ld [%g1], %g2 .globl ___rw_read_enter +EXPORT_SYMBOL(___rw_read_enter) ___rw_read_enter: orcc %g2, 0x0, %g0 bne,a ___rw_read_enter_spin_on_wlock
@@ -59,6 +61,7 @@ ___rw_read_enter: mov %g4, %o7 .globl ___rw_read_exit +EXPORT_SYMBOL(___rw_read_exit) ___rw_read_exit: orcc %g2, 0x0, %g0 bne,a ___rw_read_exit_spin_on_wlock
@@ -70,6 +73,7 @@ ___rw_read_exit: mov %g4, %o7 .globl ___rw_read_try +EXPORT_SYMBOL(___rw_read_try) ___rw_read_try: orcc %g2, 0x0, %g0 bne ___rw_read_try_spin_on_wlock
@@ -81,6 +85,7 @@ ___rw_read_try: mov %g4, %o7 .globl ___rw_write_enter +EXPORT_SYMBOL(___rw_write_enter) ___rw_write_enter: orcc %g2, 0x0, %g0 bne ___rw_write_enter_spin_on_wlock
arch/sparc/lib/lshrdi3.S +2 -0
@@ -1,4 +1,5 @@ #include <linux/linkage.h> +#include <asm/export.h> ENTRY(__lshrdi3) cmp %o2, 0
@@ -25,3 +26,4 @@ ENTRY(__lshrdi3) retl nop ENDPROC(__lshrdi3) +EXPORT_SYMBOL(__lshrdi3)
arch/sparc/lib/mcount.S +2 -0
@@ -6,6 +6,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> /* * This is the main variant and is called by C code. GCC's -pg option
@@ -16,6 +17,7 @@ .align 32 .globl _mcount .type _mcount,#function + EXPORT_SYMBOL(_mcount) .globl mcount .type mcount,#function _mcount:
arch/sparc/lib/memcmp.S +2 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/export.h> .text ENTRY(memcmp)
@@ -25,3 +26,4 @@ ENTRY(memcmp) 2: retl mov 0, %o0 ENDPROC(memcmp) +EXPORT_SYMBOL(memcmp)
arch/sparc/lib/memcpy.S +4 -0
@@ -7,6 +7,7 @@ * Copyright (C) 1996 Jakub Jelinek ([email protected]) */ +#include <asm/export.h> #define FUNC(x) \ .globl x; \ .type x,@function; \
@@ -143,8 +144,10 @@ x: #ifdef __KERNEL__ FUNC(amemmove) FUNC(__memmove) +EXPORT_SYMBOL(__memmove) #endif FUNC(memmove) +EXPORT_SYMBOL(memmove) cmp %o0, %o1 mov %o0, %g7 bleu 9f
@@ -202,6 +205,7 @@ FUNC(memmove) add %o0, 2, %o0 FUNC(memcpy) /* %o0=dst %o1=src %o2=len */ +EXPORT_SYMBOL(memcpy) sub %o0, %o1, %o4 mov %o0, %g7
arch/sparc/lib/memmove.S +2 -0
@@ -5,6 +5,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(memmove) /* o0=dst o1=src o2=len */
@@ -57,3 +58,4 @@ ENTRY(memmove) /* o0=dst o1=src o2=len */ stb %g7, [%o0 - 0x1] ba,a,pt %xcc, 99b ENDPROC(memmove) +EXPORT_SYMBOL(memmove)
arch/sparc/lib/memscan_32.S +4 -0
@@ -4,6 +4,8 @@ * Copyright (C) 1996 David S. Miller ([email protected]) */ +#include <asm/export.h> + /* In essence, this is just a fancy strlen. */ #define LO_MAGIC 0x01010101
@@ -13,6 +15,8 @@ .align 4 .globl __memscan_zero, __memscan_generic .globl memscan +EXPORT_SYMBOL(__memscan_zero) +EXPORT_SYMBOL(__memscan_generic) __memscan_zero: /* %o0 = addr, %o1 = size */ cmp %o1, 0
arch/sparc/lib/memscan_64.S +4 -0
@@ -5,6 +5,8 @@ * Copyright (C) 1998 David S. Miller ([email protected]) */ + #include <asm/export.h> + #define HI_MAGIC 0x8080808080808080 #define LO_MAGIC 0x0101010101010101 #define ASI_PL 0x88
@@ -13,6 +15,8 @@ .align 32 .globl __memscan_zero, __memscan_generic .globl memscan + EXPORT_SYMBOL(__memscan_zero) + EXPORT_SYMBOL(__memscan_generic) __memscan_zero: /* %o0 = bufp, %o1 = size */
arch/sparc/lib/memset.S +3 -0
@@ -9,6 +9,7 @@ */ #include <asm/ptrace.h> +#include <asm/export.h> /* Work around cpp -rob */ #define ALLOC #alloc
@@ -63,6 +64,8 @@ __bzero_begin: .globl __bzero .globl memset + EXPORT_SYMBOL(__bzero) + EXPORT_SYMBOL(memset) .globl __memset_start, __memset_end __memset_start: memset:
arch/sparc/lib/muldi3.S +2 -0
@@ -17,6 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <asm/export.h> .text .align 4 .globl __muldi3
@@ -74,3 +75,4 @@ __muldi3: add %l2, %l0, %i0 ret restore %g0, %l3, %o1 +EXPORT_SYMBOL(__muldi3)
arch/sparc/lib/strlen.S +2 -0
@@ -7,6 +7,7 @@ #include <linux/linkage.h> #include <asm/asm.h> +#include <asm/export.h> #define LO_MAGIC 0x01010101 #define HI_MAGIC 0x80808080
@@ -78,3 +79,4 @@ ENTRY(strlen) retl mov 2, %o0 ENDPROC(strlen) +EXPORT_SYMBOL(strlen)
arch/sparc/lib/strncmp_32.S +2 -0
@@ -4,6 +4,7 @@ */ #include <linux/linkage.h> +#include <asm/export.h> .text ENTRY(strncmp)
@@ -116,3 +117,4 @@ ENTRY(strncmp) retl sub %o3, %o0, %o0 ENDPROC(strncmp) +EXPORT_SYMBOL(strncmp)
arch/sparc/lib/strncmp_64.S +2 -0
@@ -6,6 +6,7 @@ #include <linux/linkage.h> #include <asm/asi.h> +#include <asm/export.h> .text ENTRY(strncmp)
@@ -28,3 +29,4 @@ ENTRY(strncmp) retl clr %o0 ENDPROC(strncmp) +EXPORT_SYMBOL(strncmp)
arch/sparc/lib/xor.S +9 -0
@@ -13,6 +13,7 @@ #include <asm/asi.h> #include <asm/dcu.h> #include <asm/spitfire.h> +#include <asm/export.h> /* * Requirements:
@@ -90,6 +91,7 @@ ENTRY(xor_vis_2) retl wr %g0, 0, %fprs ENDPROC(xor_vis_2) +EXPORT_SYMBOL(xor_vis_2) ENTRY(xor_vis_3) rd %fprs, %o5
@@ -156,6 +158,7 @@ ENTRY(xor_vis_3) retl wr %g0, 0, %fprs ENDPROC(xor_vis_3) +EXPORT_SYMBOL(xor_vis_3) ENTRY(xor_vis_4) rd %fprs, %o5
@@ -241,6 +244,7 @@ ENTRY(xor_vis_4) retl wr %g0, 0, %fprs ENDPROC(xor_vis_4) +EXPORT_SYMBOL(xor_vis_4) ENTRY(xor_vis_5) save %sp, -192, %sp
@@ -347,6 +351,7 @@ ENTRY(xor_vis_5) ret restore ENDPROC(xor_vis_5) +EXPORT_SYMBOL(xor_vis_5) /* Niagara versions. */ ENTRY(xor_niagara_2) /* %o0=bytes, %o1=dest, %o2=src */
@@ -393,6 +398,7 @@ ENTRY(xor_niagara_2) /* %o0=bytes, %o1=dest, %o2=src */ ret restore ENDPROC(xor_niagara_2) +EXPORT_SYMBOL(xor_niagara_2) ENTRY(xor_niagara_3) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2 */ save %sp, -192, %sp
@@ -454,6 +460,7 @@ ENTRY(xor_niagara_3) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2 */ ret restore ENDPROC(xor_niagara_3) +EXPORT_SYMBOL(xor_niagara_3) ENTRY(xor_niagara_4) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3 */ save %sp, -192, %sp
@@ -536,6 +543,7 @@ ENTRY(xor_niagara_4) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3 */ ret restore ENDPROC(xor_niagara_4) +EXPORT_SYMBOL(xor_niagara_4) ENTRY(xor_niagara_5) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3, %o5=src4 */ save %sp, -192, %sp
@@ -634,3 +642,4 @@ ENTRY(xor_niagara_5) /* %o0=bytes, %o1=dest, %o2=src1, %o3=src2, %o4=src3, %o5=s ret restore ENDPROC(xor_niagara_5) +EXPORT_SYMBOL(xor_niagara_5)
Signature · 1 line
2.1.4
PATCH v2 11/13 unify 32bit and 64bit string.h
In reply to Al ViroFrom: Al Viro <[email protected]>
--- arch/sparc/include/asm/string.h | 34 +++++++++++++++++++++++ arch/sparc/include/asm/string_32.h | 56 -------------------------------------- arch/sparc/include/asm/string_64.h | 44 ------------------------------ arch/sparc/lib/memcpy.S | 5 ---- 4 files changed, 34 insertions(+), 105 deletions(-)
arch/sparc/include/asm/string.h +34 -0
@@ -5,4 +5,38 @@#else #include <asm/string_32.h> #endif + +/* First the mem*() things. */ +#define __HAVE_ARCH_MEMMOVE +void *memmove (void *,const void *,__kernel_size_t ); + +#define __HAVE_ARCH_MEMCPY +#define memcpy (t, f, n) __builtin_memcpy(t, f, n) + +#define __HAVE_ARCH_MEMSET +#define memset (s, c, count) __builtin_memset(s, c, count) + +#define __HAVE_ARCH_MEMSCAN + +#define memscan (__arg0, __char, __arg2) \ +({ \ + void *__memscan_zero(void *, size_t); \ + void *__memscan_generic(void *, int, size_t); \ + void *__retval, *__addr = (__arg0); \ + size_t __size = (__arg2); \ + \ + if(__builtin_constant_p(__char) && !(__char)) \ + __retval = __memscan_zero(__addr, __size); \ + else \ + __retval = __memscan_generic(__addr, (__char), __size); \ + \ + __retval; \ +}) + +#define __HAVE_ARCH_MEMCMP +int memcmp (const void *,const void *,__kernel_size_t ); + +#define __HAVE_ARCH_STRNCMP +int strncmp (const char *,const char *,__kernel_size_t ); +#endif
arch/sparc/include/asm/string_32.h +0 -56
60 lines not on this page · raw message
arch/sparc/include/asm/string_64.h +0 -44
54 lines not on this page · raw message
arch/sparc/lib/memcpy.S +0 -5
@@ -141,11 +141,6 @@ x: retl nop ! Only bcopy returns here and it retuns void... -#ifdef __KERNEL__ -FUNC(amemmove) -FUNC(__memmove) -EXPORT_SYMBOL(__memmove) -#endif FUNC(memmove) EXPORT_SYMBOL(memmove) cmp %o0, %o1
Signature · 1 line
2.1.4
PATCH v2 12/13 sparc32: debride memcpy.S a bit
In reply to Al ViroFrom: Al Viro <[email protected]>
unreachable code, unused macros...
--- arch/sparc/lib/memcpy.S | 79 ------------------------------------------------- 1 file changed, 79 deletions(-)
arch/sparc/lib/memcpy.S +0 -79
@@ -59,88 +59,9 @@ x: stb %t0, [%dst - (offset) - 0x02]; \ stb %t1, [%dst - (offset) - 0x01]; -/* Both these macros have to start with exactly the same insn */ -#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \ - ldd [%src - (offset) - 0x20], %t0; \ - ldd [%src - (offset) - 0x18], %t2; \ - ldd [%src - (offset) - 0x10], %t4; \ - ldd [%src - (offset) - 0x08], %t6; \ - st %t0, [%dst - (offset) - 0x20]; \ - st %t1, [%dst - (offset) - 0x1c]; \ - st %t2, [%dst - (offset) - 0x18]; \ - st %t3, [%dst - (offset) - 0x14]; \ - st %t4, [%dst - (offset) - 0x10]; \ - st %t5, [%dst - (offset) - 0x0c]; \ - st %t6, [%dst - (offset) - 0x08]; \ - st %t7, [%dst - (offset) - 0x04]; - -#define RMOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, t7) \ - ldd [%src - (offset) - 0x20], %t0; \ - ldd [%src - (offset) - 0x18], %t2; \ - ldd [%src - (offset) - 0x10], %t4; \ - ldd [%src - (offset) - 0x08], %t6; \ - std %t0, [%dst - (offset) - 0x20]; \ - std %t2, [%dst - (offset) - 0x18]; \ - std %t4, [%dst - (offset) - 0x10]; \ - std %t6, [%dst - (offset) - 0x08]; - -#define RMOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - st %t0, [%dst + (offset) + 0x00]; \ - st %t1, [%dst + (offset) + 0x04]; \ - st %t2, [%dst + (offset) + 0x08]; \ - st %t3, [%dst + (offset) + 0x0c]; - -#define RMOVE_SHORTCHUNK(src, dst, offset, t0, t1) \ - ldub [%src + (offset) + 0x00], %t0; \ - ldub [%src + (offset) + 0x01], %t1; \ - stb %t0, [%dst + (offset) + 0x00]; \ - stb %t1, [%dst + (offset) + 0x01]; - -#define SMOVE_CHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, prev, shil, shir, offset2) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - srl %t0, shir, %t5; \ - srl %t1, shir, %t6; \ - sll %t0, shil, %t0; \ - or %t5, %prev, %t5; \ - sll %t1, shil, %prev; \ - or %t6, %t0, %t0; \ - srl %t2, shir, %t1; \ - srl %t3, shir, %t6; \ - sll %t2, shil, %t2; \ - or %t1, %prev, %t1; \ - std %t4, [%dst + (offset) + (offset2) - 0x04]; \ - std %t0, [%dst + (offset) + (offset2) + 0x04]; \ - sll %t3, shil, %prev; \ - or %t6, %t2, %t4; - -#define SMOVE_ALIGNCHUNK(src, dst, offset, t0, t1, t2, t3, t4, t5, t6, prev, shil, shir, offset2) \ - ldd [%src + (offset) + 0x00], %t0; \ - ldd [%src + (offset) + 0x08], %t2; \ - srl %t0, shir, %t4; \ - srl %t1, shir, %t5; \ - sll %t0, shil, %t6; \ - or %t4, %prev, %t0; \ - sll %t1, shil, %prev; \ - or %t5, %t6, %t1; \ - srl %t2, shir, %t4; \ - srl %t3, shir, %t5; \ - sll %t2, shil, %t6; \ - or %t4, %prev, %t2; \ - sll %t3, shil, %prev; \ - or %t5, %t6, %t3; \ - std %t0, [%dst + (offset) + (offset2) + 0x00]; \ - std %t2, [%dst + (offset) + (offset2) + 0x08]; - .text .align 4 -0: - retl - nop ! Only bcopy returns here and it retuns void... - FUNC(memmove) EXPORT_SYMBOL(memmove) cmp %o0, %o1
Signature · 1 line
2.1.4
PATCH v2 13/13 ia64: move exports to definitions
In reply to Al ViroFrom: Al Viro <[email protected]>
Here we have another kind of deviation from the default case - a difference between exporting functions and non-functions. EXPORT_DATA_SYMBOL... is really different from EXPORT_SYMBOL... on ia64, and we need to use the right one when moving exports from *.c where C compiler has the required information to *.S, where we need to supply it manually.
parisc64 will be another one like that.
--- arch/ia64/include/asm/export.h | 3 ++ arch/ia64/kernel/entry.S | 3 ++ arch/ia64/kernel/esi_stub.S | 2 + arch/ia64/kernel/head.S | 2 + arch/ia64/kernel/ia64_ksyms.c | 94 +-------------------------------------- arch/ia64/kernel/ivt.S | 2 + arch/ia64/kernel/pal.S | 7 +++ arch/ia64/kernel/setup.c | 4 ++ arch/ia64/lib/clear_page.S | 2 + arch/ia64/lib/clear_user.S | 2 + arch/ia64/lib/copy_page.S | 2 + arch/ia64/lib/copy_page_mck.S | 2 + arch/ia64/lib/copy_user.S | 2 + arch/ia64/lib/flush.S | 2 + arch/ia64/lib/idiv32.S | 2 + arch/ia64/lib/idiv64.S | 2 + arch/ia64/lib/ip_fast_csum.S | 3 ++ arch/ia64/lib/memcpy.S | 2 + arch/ia64/lib/memcpy_mck.S | 3 ++ arch/ia64/lib/memset.S | 2 + arch/ia64/lib/strlen.S | 2 + arch/ia64/lib/strlen_user.S | 2 + arch/ia64/lib/strncpy_from_user.S | 2 + arch/ia64/lib/strnlen_user.S | 2 + arch/ia64/lib/xor.S | 5 +++ 25 files changed, 64 insertions(+), 92 deletions(-) create mode 100644 arch/ia64/include/asm/export.h
arch/ia64/include/asm/export.h new file +3 -0
@@ -0,0 +1,3 @@ +/* EXPORT_DATA_SYMBOL != EXPORT_SYMBOL here */ +#define KSYM_FUNC (name) @fptr(name) +#include <asm-generic/export.h>
arch/ia64/kernel/entry.S +3 -0
@@ -48,6 +48,7 @@ #include <asm/thread_info.h> #include <asm/unistd.h> #include <asm/ftrace.h> +#include <asm/export.h> #include "minstate.h"
@@ -1345,12 +1346,14 @@ GLOBAL_ENTRY(unw_init_running) mov rp=loc0 br.ret.sptk.many rp END(unw_init_running) +EXPORT_SYMBOL(unw_init_running) #ifdef CONFIG_FUNCTION_TRACER #ifdef CONFIG_DYNAMIC_FTRACE GLOBAL_ENTRY(_mcount) br ftrace_stub END(_mcount) +EXPORT_SYMBOL(_mcount) .here: br.ret.sptk.many b0
arch/ia64/kernel/esi_stub.S +2 -0
@@ -35,6 +35,7 @@ #include <asm/processor.h> #include <asm/asmmacro.h> +#include <asm/export.h> /* * Inputs:
@@ -94,3 +95,4 @@ GLOBAL_ENTRY(esi_call_phys) mov gp=loc2 br.ret.sptk.many rp END(esi_call_phys) +EXPORT_SYMBOL_GPL(esi_call_phys)
arch/ia64/kernel/head.S +2 -0
@@ -32,6 +32,7 @@ #include <asm/mca_asm.h> #include <linux/init.h> #include <linux/linkage.h> +#include <asm/export.h> #ifdef CONFIG_HOTPLUG_CPU #define SAL_PSR_BITS_TO_SET \
@@ -168,6 +169,7 @@ RestRR: \ __PAGE_ALIGNED_DATA .global empty_zero_page +EXPORT_DATA_SYMBOL_GPL(empty_zero_page) empty_zero_page: .skip PAGE_SIZE
arch/ia64/kernel/ia64_ksyms.c +2 -92
103 lines not on this page · raw message
arch/ia64/kernel/ivt.S +2 -0
@@ -57,6 +57,7 @@ #include <asm/thread_info.h> #include <asm/unistd.h> #include <asm/errno.h> +#include <asm/export.h> #if 0 # define PSR_DEFAULT_BITS psr.ac
@@ -85,6 +86,7 @@ .align 32768 // align on 32KB boundary .global ia64_ivt + EXPORT_DATA_SYMBOL(ia64_ivt) ia64_ivt: ///////////////////////////////////////////////////////////////////////////////////////// // 0x0000 Entry 0 (size 64 bundles) VHPT Translation (8,20,47)
arch/ia64/kernel/pal.S +7 -0
@@ -14,6 +14,7 @@ #include <asm/asmmacro.h> #include <asm/processor.h> +#include <asm/export.h> .data pal_entry_point:
@@ -87,6 +88,7 @@ GLOBAL_ENTRY(ia64_pal_call_static) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_static) +EXPORT_SYMBOL(ia64_pal_call_static) /* * Make a PAL call using the stacked registers calling convention.
@@ -122,6 +124,7 @@ GLOBAL_ENTRY(ia64_pal_call_stacked) srlz.d // serialize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_stacked) +EXPORT_SYMBOL(ia64_pal_call_stacked) /* * Make a physical mode PAL call using the static registers calling convention.
@@ -193,6 +196,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_static) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_phys_static) +EXPORT_SYMBOL(ia64_pal_call_phys_static) /* * Make a PAL call using the stacked registers in physical mode.
@@ -250,6 +254,7 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked) srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 END(ia64_pal_call_phys_stacked) +EXPORT_SYMBOL(ia64_pal_call_phys_stacked) /* * Save scratch fp scratch regs which aren't saved in pt_regs already
@@ -275,6 +280,7 @@ GLOBAL_ENTRY(ia64_save_scratch_fpregs) stf.spill [r2] = f15,32 br.ret.sptk.many rp END(ia64_save_scratch_fpregs) +EXPORT_SYMBOL(ia64_save_scratch_fpregs) /* * Load scratch fp scratch regs (fp10-fp15)
@@ -296,3 +302,4 @@ GLOBAL_ENTRY(ia64_load_scratch_fpregs) ldf.fill f15 = [r2],32 br.ret.sptk.many rp END(ia64_load_scratch_fpregs) +EXPORT_SYMBOL(ia64_load_scratch_fpregs)
arch/ia64/kernel/setup.c +4 -0
@@ -71,7 +71,11 @@ EXPORT_SYMBOL(__per_cpu_offset);#endif DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info); +EXPORT_SYMBOL (ia64_cpu_info); DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); +#ifdef CONFIG_SMP +EXPORT_SYMBOL (local_per_cpu_offset); +#endif unsigned long ia64_cycles_per_usec;struct ia64_boot_param *ia64_boot_param;struct screen_info screen_info;
arch/ia64/lib/clear_page.S +2 -0
@@ -11,6 +11,7 @@ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #ifdef CONFIG_ITANIUM # define L3_LINE_SIZE 64 // Itanium L3 line size
@@ -74,3 +75,4 @@ GLOBAL_ENTRY(clear_page) mov ar.lc = saved_lc // restore lc br.ret.sptk.many rp END(clear_page) +EXPORT_SYMBOL(clear_page)
arch/ia64/lib/clear_user.S +2 -0
@@ -12,6 +12,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // arguments
@@ -207,3 +208,4 @@ GLOBAL_ENTRY(__do_clear_user) mov ar.lc=saved_lc br.ret.sptk.many rp END(__do_clear_user) +EXPORT_SYMBOL(__do_clear_user)
arch/ia64/lib/copy_page.S +2 -0
@@ -16,6 +16,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define PIPE_DEPTH 3 #define EPI p[PIPE_DEPTH-1]
@@ -96,3 +97,4 @@ GLOBAL_ENTRY(copy_page) mov ar.lc=saved_lc br.ret.sptk.many rp END(copy_page) +EXPORT_SYMBOL(copy_page)
arch/ia64/lib/copy_page_mck.S +2 -0
@@ -61,6 +61,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define PREFETCH_DIST 8 // McKinley sustains 16 outstanding L2 misses (8 ld, 8 st)
@@ -183,3 +184,4 @@ GLOBAL_ENTRY(copy_page) mov pr = saved_pr, -1 br.ret.sptk.many rp END(copy_page) +EXPORT_SYMBOL(copy_page)
arch/ia64/lib/copy_user.S +2 -0
@@ -30,6 +30,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // Tuneable parameters
@@ -608,3 +609,4 @@ GLOBAL_ENTRY(__copy_user) mov ar.pfs=saved_pfs br.ret.sptk.many rp END(__copy_user) +EXPORT_SYMBOL(__copy_user)
arch/ia64/lib/flush.S +2 -0
@@ -8,6 +8,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> /*
@@ -60,6 +61,7 @@ GLOBAL_ENTRY(flush_icache_range) mov ar.lc=r3 // restore ar.lc br.ret.sptk.many rp END(flush_icache_range) +EXPORT_SYMBOL_GPL(flush_icache_range) /* * clflush_cache_range(start,size)
arch/ia64/lib/idiv32.S +2 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> #ifdef MODULO # define OP mod
@@ -81,3 +82,4 @@ GLOBAL_ENTRY(NAME) getf.sig r8 = f6 // transfer result to result register br.ret.sptk.many rp END(NAME) +EXPORT_SYMBOL(NAME)
arch/ia64/lib/idiv64.S +2 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> #ifdef MODULO # define OP mod
@@ -78,3 +79,4 @@ GLOBAL_ENTRY(NAME) getf.sig r8 = f11 // transfer result to result register br.ret.sptk.many rp END(NAME) +EXPORT_SYMBOL(NAME)
arch/ia64/lib/ip_fast_csum.S +3 -0
@@ -13,6 +13,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> /* * Since we know that most likely this function is called with buf aligned
@@ -92,6 +93,7 @@ GLOBAL_ENTRY(ip_fast_csum) mov b0=r34 br.ret.sptk.many b0 END(ip_fast_csum) +EXPORT_SYMBOL(ip_fast_csum) GLOBAL_ENTRY(csum_ipv6_magic) ld4 r20=[in0],4
@@ -142,3 +144,4 @@ GLOBAL_ENTRY(csum_ipv6_magic) andcm r8=r9,r8 br.ret.sptk.many b0 END(csum_ipv6_magic) +EXPORT_SYMBOL(csum_ipv6_magic)
arch/ia64/lib/memcpy.S +2 -0
@@ -14,6 +14,7 @@ * David Mosberger-Tang <[email protected]> */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(memcpy)
@@ -299,3 +300,4 @@ GLOBAL_ENTRY(memcpy) COPY(56, 0) END(memcpy) +EXPORT_SYMBOL(memcpy)
arch/ia64/lib/memcpy_mck.S +3 -0
@@ -15,6 +15,7 @@ */ #include <asm/asmmacro.h> #include <asm/page.h> +#include <asm/export.h> #define EK(y...) EX(y)
@@ -78,6 +79,7 @@ GLOBAL_ENTRY(memcpy) br.cond.sptk .common_code ;; END(memcpy) +EXPORT_SYMBOL(memcpy) GLOBAL_ENTRY(__copy_user) .prologue // check dest alignment
@@ -664,3 +666,4 @@ EK(.ex_handler, (p17) st8 [dst1]=r39,8); \ /* end of McKinley specific optimization */ END(__copy_user) +EXPORT_SYMBOL(__copy_user)
arch/ia64/lib/memset.S +2 -0
@@ -18,6 +18,7 @@ to get peak speed when value = 0. */ #include <asm/asmmacro.h> +#include <asm/export.h> #undef ret #define dest in0
@@ -360,3 +361,4 @@ GLOBAL_ENTRY(memset) br.ret.sptk.many rp } END(memset) +EXPORT_SYMBOL(memset)
arch/ia64/lib/strlen.S +2 -0
@@ -17,6 +17,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // //
@@ -190,3 +191,4 @@ GLOBAL_ENTRY(strlen) mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what br.ret.sptk.many rp // end of successful recovery code END(strlen) +EXPORT_SYMBOL(strlen)
arch/ia64/lib/strlen_user.S +2 -0
@@ -16,6 +16,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> // // int strlen_user(char *)
@@ -196,3 +197,4 @@ GLOBAL_ENTRY(__strlen_user) mov ar.pfs=saved_pfs // because of ar.ec, restore no matter what br.ret.sptk.many rp END(__strlen_user) +EXPORT_SYMBOL(__strlen_user)
arch/ia64/lib/strncpy_from_user.S +2 -0
@@ -17,6 +17,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(__strncpy_from_user) alloc r2=ar.pfs,3,0,0,0
@@ -42,3 +43,4 @@ GLOBAL_ENTRY(__strncpy_from_user) [.Lexit:] br.ret.sptk.many rp END(__strncpy_from_user) +EXPORT_SYMBOL(__strncpy_from_user)
arch/ia64/lib/strnlen_user.S +2 -0
@@ -13,6 +13,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(__strnlen_user) .prologue
@@ -43,3 +44,4 @@ GLOBAL_ENTRY(__strnlen_user) mov ar.lc=r16 // restore ar.lc br.ret.sptk.many rp END(__strnlen_user) +EXPORT_SYMBOL(__strnlen_user)
arch/ia64/lib/xor.S +5 -0
@@ -14,6 +14,7 @@ */ #include <asm/asmmacro.h> +#include <asm/export.h> GLOBAL_ENTRY(xor_ia64_2) .prologue
@@ -51,6 +52,7 @@ GLOBAL_ENTRY(xor_ia64_2) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_2) +EXPORT_SYMBOL(xor_ia64_2) GLOBAL_ENTRY(xor_ia64_3) .prologue
@@ -91,6 +93,7 @@ GLOBAL_ENTRY(xor_ia64_3) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_3) +EXPORT_SYMBOL(xor_ia64_3) GLOBAL_ENTRY(xor_ia64_4) .prologue
@@ -134,6 +137,7 @@ GLOBAL_ENTRY(xor_ia64_4) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_4) +EXPORT_SYMBOL(xor_ia64_4) GLOBAL_ENTRY(xor_ia64_5) .prologue
@@ -182,3 +186,4 @@ GLOBAL_ENTRY(xor_ia64_5) mov pr = r29, -1 br.ret.sptk.few rp END(xor_ia64_5) +EXPORT_SYMBOL(xor_ia64_5)
Signature · 1 line
2.1.4
Quoted 8 lines · Al Viro
If everyone (including kbuild folks) is OK with the arch-independent parts of this series, I'd like to put the first two commits into never-rebased branch so that individual architecture trees could pull that and apply the corresponding arch-dependent stuff on top of that; going that way would minimize the amount of conflicts that would need to be dealt with during this cycle, but it obviously depends on those first two commits being acceptable to everyone. Please, review and comment.
Quoted 15 lines
Shortlog:
Al Viro (13):
[kbuild] handle exports in lib-y objects reliablyEXPORT_SYMBOL()for asm
x86: move exports to actual definitions
alpha: move exports to actual definitions
m68k: move exports to definitions
s390: move exports to definitions
arm: move exports to definitions
ppc: move exports to definitions
ppc: get rid of unreachableabs()implementation
sparc: move exports to definitions [sparc] unify 32bit and 64bitstring.h
sparc32: debridememcpy.Sa bit
ia64: move exports to definitions
After several pings by Al (sorry about that!), I got around to review a rebased version of this patchset at
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git asm-exports
The kbuild commits are good, but since we are close to the end of the merge window, I will apply them to my kbuild branch after 4.8-rc1.
Thanks,
Michal
Dne 2.8.2016 v 16:01 Michal Marek napsal(a):
Quoted 17 lines · Al Viro
Quoted 7 lines
Shortlog:
Al Viro (13):
[kbuild] handle exports in lib-y objects reliablyEXPORT_SYMBOL()for asm
x86: move exports to actual definitions
alpha: move exports to actual definitions
m68k: move exports to definitionsQuoted 8 lines
s390: move exports to definitions
arm: move exports to definitions
ppc: move exports to definitions
ppc: get rid of unreachableabs()implementation
sparc: move exports to definitions [sparc] unify 32bit and 64bitstring.h
sparc32: debridememcpy.Sa bit
ia64: move exports to definitions
Quoted 7 lines
After several pings by Al (sorry about that!), I got around to review a rebased version of this patchset at
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.gitasm-exportsThe kbuild commits are good, but since we are close to the end of the merge window, I will apply them to my kbuild branch after 4.8-rc1.
The rebased patchset is now in kbuild.git#kbuild. Before pushing, I noticed one issue: For some reason, drivers/firmware/efi/libstub/lib-ksyms.o is regenerated each time, leading to relink of vmlinux. I'm looking into this.
Michal
Dne 16.8.2016 v 07:48 Michal Marek napsal(a):
Quoted 23 lines
Dne 2.8.2016 v 16:01 Michal Marek napsal(a):
Quoted 22 lines · Al Viro
Quoted 7 lines
Shortlog:
Al Viro (13):
[kbuild] handle exports in lib-y objects reliablyEXPORT_SYMBOL()for asm
x86: move exports to actual definitions
alpha: move exports to actual definitions
m68k: move exports to definitionsQuoted 8 lines
s390: move exports to definitions
arm: move exports to definitions
ppc: move exports to definitions
ppc: get rid of unreachableabs()implementation
sparc: move exports to definitions [sparc] unify 32bit and 64bitstring.h
sparc32: debridememcpy.Sa bit
ia64: move exports to definitionsAfter several pings by Al (sorry about that!), I got around to review a rebased version of this patchset at
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.gitasm-exports
Quoted 7 lines
Quoted 2 lines
The kbuild commits are good, but since we are close to the end of the merge window, I will apply them to my kbuild branch after 4.8-rc1.
The rebased patchset is now in kbuild.git#kbuild. Before pushing, I noticed one issue: For some reason,
drivers/firmware/efi/libstub/lib-ksyms.ois regenerated each time, leading to relink of vmlinux. I'm looking into this.
OK, it's the
$(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
$(call if_changed_rule,cc_o_c)
rule in drivers/firmware/efi/libstub/Makefile file that conflicts with the lib-ksyms.o rule. I need to find a better solution to this hack.
Michal