[linux] 01/01: Clean up symbol version fixes for symbols exported from asm
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Wed Jul 19 21:00:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit 45a06e2c0f3eb2b39ba3d1a91ba23a53c11e8392
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Wed Jul 19 01:07:37 2017 +0100
Clean up symbol version fixes for symbols exported from asm
We can't keep reverting these changes, so instead move forward. Most
architectures now have <asm/asm-protoypes.h> and only 3 were left:
- alpha: Added <asm/asm-protoypes.h> and submitted patch upstream
- m68k: Did same, but realised it's only needed for Coldfire configs
so we don't need any patches
- sparc: Cherry-picked changes from upstream
---
debian/changelog | 11 +-
...re-symbol-versions-for-symbols-exported-f.patch | 39 +
...-alpha-move-exports-to-actual-definitions.patch | 869 -------------
.../revert-m68k-move-exports-to-definitions.patch | 207 ----
...prototypes.h-for-genksyms-to-generate-crc.patch | 47 +
.../revert-sparc-move-exports-to-definitions.patch | 1307 --------------------
...n-makefile.build-requires-line-break-betw.patch | 92 ++
debian/patches/series | 6 +-
8 files changed, 190 insertions(+), 2388 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6f2f8e7..4d40ef3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
linux (4.12.2-1~exp2) UNRELEASED; urgency=medium
* media: Enable USB_RAINSHADOW_CEC as module (see #868511)
- * [sparc64] Update "Revert "sparc: move exports to definitions"" again
- (really fixes FTBFS)
+ * Clean up symbol version fixes for symbols exported from asm
+ (fixes FTBFS on sparc64):
+ - [alpha] Un-revert "alpha: move exports to actual definitions"
+ - [alpha] Restore symbol versions for symbols exported from assembly
+ - [m68k] Un-revert "m68k: move exports to definitions"
+ - [sparc64] Un-revert "sparc: move exports to definitions"
+ - [sparc64] Adding asm-prototypes.h for genksyms to generate crc
+ - [sparc64] sed regex in Makefile.build requires line break between
+ exported symbols
-- Ben Hutchings <ben at decadent.org.uk> Tue, 18 Jul 2017 13:26:41 +0100
diff --git a/debian/patches/bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch b/debian/patches/bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch
new file mode 100644
index 0000000..7e6e0ac
--- /dev/null
+++ b/debian/patches/bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch
@@ -0,0 +1,39 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Tue, 18 Jul 2017 23:44:25 +0100
+Subject: alpha: Restore symbol versions for symbols exported from assembly
+Forwarded: https://marc.info/?l=linux-alpha&m=150042247925108&w=2
+
+Add <asm/asm-prototypes.h> so that genksyms knows the types of
+these symbols and can generate CRCs for them.
+
+Fixes: 00fc0e0dda62 ("alpha: move exports to actual definitions")
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ arch/alpha/include/asm/asm-prototypes.h | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+ create mode 100644 arch/alpha/include/asm/asm-prototypes.h
+
+diff --git a/arch/alpha/include/asm/asm-prototypes.h b/arch/alpha/include/asm/asm-prototypes.h
+new file mode 100644
+index 000000000000..d12c68ea340b
+--- /dev/null
++++ b/arch/alpha/include/asm/asm-prototypes.h
+@@ -0,0 +1,18 @@
++#include <linux/spinlock.h>
++
++#include <asm/checksum.h>
++#include <asm/console.h>
++#include <asm/page.h>
++#include <asm/string.h>
++#include <asm/uaccess.h>
++
++#include <asm-generic/asm-prototypes.h>
++
++extern void __divl(void);
++extern void __reml(void);
++extern void __divq(void);
++extern void __remq(void);
++extern void __divlu(void);
++extern void __remlu(void);
++extern void __divqu(void);
++extern void __remqu(void);
diff --git a/debian/patches/bugfix/alpha/revert-alpha-move-exports-to-actual-definitions.patch b/debian/patches/bugfix/alpha/revert-alpha-move-exports-to-actual-definitions.patch
deleted file mode 100644
index e041716..0000000
--- a/debian/patches/bugfix/alpha/revert-alpha-move-exports-to-actual-definitions.patch
+++ /dev/null
@@ -1,869 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 1 Dec 2016 23:14:46 +0000
-Subject: Revert "alpha: move exports to actual definitions"
-Forwarded: not-needed
-
-This reverts commit 00fc0e0dda6286407f3854cd71a125f519a5689c because
-symbols exported from assembly don't automatically get modversions (ABI
-hashes).
-
-Commit 8525023121de "alpha: switch __copy_user() and __do_clean_user() to
-normal calling conventions" renamed __do_clear_user() to __clear_user().
----
- 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, 131 insertions(+), 99 deletions(-)
- create mode 100644 arch/alpha/kernel/alpha_ksyms.c
-
---- a/arch/alpha/include/asm/Kbuild
-+++ b/arch/alpha/include/asm/Kbuild
-@@ -2,7 +2,6 @@
-
- generic-y += clkdev.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
---- a/arch/alpha/kernel/Makefile
-+++ b/arch/alpha/kernel/Makefile
-@@ -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 \
-- systbls.o err_common.o io.o
-+ alpha_ksyms.o systbls.o err_common.o io.o
-
- obj-$(CONFIG_VGA_HOSE) += console.o
- obj-$(CONFIG_SMP) += smp.o
---- /dev/null
-+++ b/arch/alpha/kernel/alpha_ksyms.c
-@@ -0,0 +1,102 @@
-+/*
-+ * linux/arch/alpha/kernel/alpha_ksyms.c
-+ *
-+ * Export the alpha-specific functions that are needed for loadable
-+ * modules.
-+ */
-+
-+#include <linux/module.h>
-+#include <asm/console.h>
-+#include <asm/uaccess.h>
-+#include <asm/checksum.h>
-+#include <asm/fpu.h>
-+#include <asm/machvec.h>
-+
-+#include <linux/syscalls.h>
-+
-+/* these are C runtime functions with special calling conventions: */
-+extern void __divl (void);
-+extern void __reml (void);
-+extern void __divq (void);
-+extern void __remq (void);
-+extern void __divlu (void);
-+extern void __remlu (void);
-+extern void __divqu (void);
-+extern void __remqu (void);
-+
-+EXPORT_SYMBOL(alpha_mv);
-+EXPORT_SYMBOL(callback_getenv);
-+EXPORT_SYMBOL(callback_setenv);
-+EXPORT_SYMBOL(callback_save_env);
-+
-+/* platform dependent support */
-+EXPORT_SYMBOL(strcat);
-+EXPORT_SYMBOL(strcpy);
-+EXPORT_SYMBOL(strlen);
-+EXPORT_SYMBOL(strncpy);
-+EXPORT_SYMBOL(strncat);
-+EXPORT_SYMBOL(strchr);
-+EXPORT_SYMBOL(strrchr);
-+EXPORT_SYMBOL(memmove);
-+EXPORT_SYMBOL(__memcpy);
-+EXPORT_SYMBOL(__memset);
-+EXPORT_SYMBOL(___memset);
-+EXPORT_SYMBOL(__memsetw);
-+EXPORT_SYMBOL(__constant_c_memset);
-+EXPORT_SYMBOL(copy_page);
-+EXPORT_SYMBOL(clear_page);
-+
-+EXPORT_SYMBOL(alpha_read_fp_reg);
-+EXPORT_SYMBOL(alpha_read_fp_reg_s);
-+EXPORT_SYMBOL(alpha_write_fp_reg);
-+EXPORT_SYMBOL(alpha_write_fp_reg_s);
-+
-+/* Networking helper routines. */
-+EXPORT_SYMBOL(csum_tcpudp_magic);
-+EXPORT_SYMBOL(ip_compute_csum);
-+EXPORT_SYMBOL(ip_fast_csum);
-+EXPORT_SYMBOL(csum_partial_copy_nocheck);
-+EXPORT_SYMBOL(csum_partial_copy_from_user);
-+EXPORT_SYMBOL(csum_ipv6_magic);
-+
-+#ifdef CONFIG_MATHEMU_MODULE
-+extern long (*alpha_fp_emul_imprecise)(struct pt_regs *, unsigned long);
-+extern long (*alpha_fp_emul) (unsigned long pc);
-+EXPORT_SYMBOL(alpha_fp_emul_imprecise);
-+EXPORT_SYMBOL(alpha_fp_emul);
-+#endif
-+
-+/*
-+ * The following are specially called from the uaccess assembly stubs.
-+ */
-+EXPORT_SYMBOL(__copy_user);
-+EXPORT_SYMBOL(__clear_user);
-+
-+/*
-+ * SMP-specific symbols.
-+ */
-+
-+#ifdef CONFIG_SMP
-+EXPORT_SYMBOL(_atomic_dec_and_lock);
-+#endif /* CONFIG_SMP */
-+
-+/*
-+ * The following are special because they're not called
-+ * explicitly (the C compiler or assembler generates them in
-+ * response to division operations). Fortunately, their
-+ * interface isn't gonna change any time soon now, so it's OK
-+ * to leave it out of version control.
-+ */
-+# undef memcpy
-+# undef memset
-+EXPORT_SYMBOL(__divl);
-+EXPORT_SYMBOL(__divlu);
-+EXPORT_SYMBOL(__divq);
-+EXPORT_SYMBOL(__divqu);
-+EXPORT_SYMBOL(__reml);
-+EXPORT_SYMBOL(__remlu);
-+EXPORT_SYMBOL(__remq);
-+EXPORT_SYMBOL(__remqu);
-+EXPORT_SYMBOL(memcpy);
-+EXPORT_SYMBOL(memset);
-+EXPORT_SYMBOL(memchr);
---- a/arch/alpha/kernel/machvec_impl.h
-+++ b/arch/alpha/kernel/machvec_impl.h
-@@ -144,11 +144,9 @@
- else beforehand. Fine. We'll do it ourselves. */
- #if 0
- #define ALIAS_MV(system) \
-- struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv"))); \
-- EXPORT_SYMBOL(alpha_mv);
-+ struct alpha_machine_vector alpha_mv __attribute__((alias(#system "_mv")));
- #else
- #define ALIAS_MV(system) \
-- asm(".global alpha_mv\nalpha_mv = " #system "_mv"); \
-- EXPORT_SYMBOL(alpha_mv);
-+ asm(".global alpha_mv\nalpha_mv = " #system "_mv");
- #endif
- #endif /* GENERIC */
---- a/arch/alpha/kernel/setup.c
-+++ b/arch/alpha/kernel/setup.c
-@@ -115,7 +115,6 @@ unsigned long alpha_agpgart_size = DEFAU
-
- #ifdef CONFIG_ALPHA_GENERIC
- struct alpha_machine_vector alpha_mv;
--EXPORT_SYMBOL(alpha_mv);
- #endif
-
- #ifndef alpha_using_srm
---- a/arch/alpha/lib/callback_srm.S
-+++ b/arch/alpha/lib/callback_srm.S
-@@ -3,7 +3,6 @@
- */
-
- #include <asm/console.h>
--#include <asm/export.h>
-
- .text
- #define HWRPB_CRB_OFFSET 0xc0
-@@ -93,10 +92,6 @@ 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
---- a/arch/alpha/lib/checksum.c
-+++ b/arch/alpha/lib/checksum.c
-@@ -48,7 +48,6 @@ __sum16 csum_tcpudp_magic(__be32 saddr,
- (__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,
- __u32 len, __u8 proto, __wsum sum)
-@@ -145,7 +144,6 @@ __sum16 ip_fast_csum(const void *iph, un
- {
- return (__force __sum16)~do_csum(iph,ihl*4);
- }
--EXPORT_SYMBOL(ip_fast_csum);
-
- /*
- * computes the checksum of a memory block at buff, length len,
-@@ -180,4 +178,3 @@ __sum16 ip_compute_csum(const void *buff
- {
- return (__force __sum16)~from64to16(do_csum(buff,len));
- }
--EXPORT_SYMBOL(ip_compute_csum);
---- a/arch/alpha/lib/clear_page.S
-+++ b/arch/alpha/lib/clear_page.S
-@@ -3,7 +3,7 @@
- *
- * Zero an entire page.
- */
--#include <asm/export.h>
-+
- .text
- .align 4
- .global clear_page
-@@ -37,4 +37,3 @@ clear_page:
- nop
-
- .end clear_page
-- EXPORT_SYMBOL(clear_page)
---- a/arch/alpha/lib/clear_user.S
-+++ b/arch/alpha/lib/clear_user.S
-@@ -9,7 +9,6 @@
- * a successful copy). There is also some rather minor exception setup
- * stuff.
- */
--#include <asm/export.h>
-
- /* Allow an exception for an insn; exit if we get one. */
- #define EX(x,y...) \
-@@ -98,4 +97,3 @@ $exception:
- ret $31, ($26), 1 # .. e1 :
-
- .end __clear_user
-- EXPORT_SYMBOL(__clear_user)
---- a/arch/alpha/lib/copy_page.S
-+++ b/arch/alpha/lib/copy_page.S
-@@ -3,7 +3,7 @@
- *
- * Copy an entire page.
- */
--#include <asm/export.h>
-+
- .text
- .align 4
- .global copy_page
-@@ -47,4 +47,3 @@ copy_page:
- nop
-
- .end copy_page
-- EXPORT_SYMBOL(copy_page)
---- a/arch/alpha/lib/copy_user.S
-+++ b/arch/alpha/lib/copy_user.S
-@@ -11,8 +11,6 @@
- * exception setup stuff..
- */
-
--#include <asm/export.h>
--
- /* Allow an exception for an insn; exit if we get one. */
- #define EXI(x,y...) \
- 99: x,##y; \
-@@ -117,4 +115,3 @@ $exitout:
- ret $31,($26),1
-
- .end __copy_user
--EXPORT_SYMBOL(__copy_user)
---- a/arch/alpha/lib/csum_ipv6_magic.S
-+++ b/arch/alpha/lib/csum_ipv6_magic.S
-@@ -12,7 +12,6 @@
- * added by Ivan Kokshaysky <ink at jurassic.park.msu.ru>
- */
-
--#include <asm/export.h>
- .globl csum_ipv6_magic
- .align 4
- .ent csum_ipv6_magic
-@@ -114,4 +113,3 @@ csum_ipv6_magic:
- ret # .. e1 :
-
- .end csum_ipv6_magic
-- EXPORT_SYMBOL(csum_ipv6_magic)
---- a/arch/alpha/lib/csum_partial_copy.c
-+++ b/arch/alpha/lib/csum_partial_copy.c
-@@ -368,7 +368,6 @@ csum_partial_copy_from_user(const void _
- }
- 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)
-@@ -381,4 +380,3 @@ csum_partial_copy_nocheck(const void *sr
- set_fs(oldfs);
- return checksum;
- }
--EXPORT_SYMBOL(csum_partial_copy_nocheck);
---- a/arch/alpha/lib/dec_and_lock.c
-+++ b/arch/alpha/lib/dec_and_lock.c
-@@ -7,7 +7,6 @@
-
- #include <linux/spinlock.h>
- #include <linux/atomic.h>
--#include <linux/export.h>
-
- asm (".text \n\
- .global _atomic_dec_and_lock \n\
-@@ -40,4 +39,3 @@ static int __used atomic_dec_and_lock_1(
- spin_unlock(lock);
- return 0;
- }
--EXPORT_SYMBOL(_atomic_dec_and_lock);
---- a/arch/alpha/lib/divide.S
-+++ b/arch/alpha/lib/divide.S
-@@ -45,7 +45,6 @@
- * $28 - compare status
- */
-
--#include <asm/export.h>
- #define halt .long 0
-
- /*
-@@ -152,7 +151,6 @@ 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
-@@ -195,4 +193,3 @@ sfunction:
- addq $30,STACK,$30
- ret $31,($23),1
- .end sfunction
--EXPORT_SYMBOL(sfunction)
---- a/arch/alpha/lib/ev6-clear_page.S
-+++ b/arch/alpha/lib/ev6-clear_page.S
-@@ -3,7 +3,7 @@
- *
- * Zero an entire page.
- */
--#include <asm/export.h>
-+
- .text
- .align 4
- .global clear_page
-@@ -52,4 +52,3 @@ clear_page:
- nop
-
- .end clear_page
-- EXPORT_SYMBOL(clear_page)
---- a/arch/alpha/lib/ev6-clear_user.S
-+++ b/arch/alpha/lib/ev6-clear_user.S
-@@ -28,7 +28,6 @@
- * 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; \
-@@ -209,4 +208,4 @@ $exception: # Destination for exceptio
- nop # .. E .. .. :
- ret $31, ($26), 1 # L0 .. .. .. : L U L U
- .end __clear_user
-- EXPORT_SYMBOL(__clear_user)
-+
---- a/arch/alpha/lib/ev6-copy_page.S
-+++ b/arch/alpha/lib/ev6-copy_page.S
-@@ -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,4 +201,3 @@ copy_page:
- nop
-
- .end copy_page
-- EXPORT_SYMBOL(copy_page)
---- a/arch/alpha/lib/ev6-copy_user.S
-+++ b/arch/alpha/lib/ev6-copy_user.S
-@@ -22,7 +22,6 @@
- * 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; \
-@@ -222,4 +221,4 @@ $exitout: # Destination for exception
- ret $31,($26),1 # L0 .. .. .. : L U L U
-
- .end __copy_user
-- EXPORT_SYMBOL(__copy_user)
-+
---- a/arch/alpha/lib/ev6-csum_ipv6_magic.S
-+++ b/arch/alpha/lib/ev6-csum_ipv6_magic.S
-@@ -52,7 +52,6 @@
- * 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
-@@ -149,4 +148,3 @@ csum_ipv6_magic:
- ret # L0 : L U L U
-
- .end csum_ipv6_magic
-- EXPORT_SYMBOL(csum_ipv6_magic)
---- a/arch/alpha/lib/ev6-divide.S
-+++ b/arch/alpha/lib/ev6-divide.S
-@@ -55,7 +55,6 @@
- * Try not to change the actual algorithm if possible for consistency.
- */
-
--#include <asm/export.h>
- #define halt .long 0
-
- /*
-@@ -206,7 +205,6 @@ 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
-@@ -259,4 +257,3 @@ sfunction:
- addq $30,STACK,$30 # E :
- ret $31,($23),1 # L0 : L U U L
- .end sfunction
--EXPORT_SYMBOL(sfunction)
---- a/arch/alpha/lib/ev6-memchr.S
-+++ b/arch/alpha/lib/ev6-memchr.S
-@@ -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,4 +189,3 @@ $not_found:
- ret # L0 :
-
- .end memchr
-- EXPORT_SYMBOL(memchr)
---- a/arch/alpha/lib/ev6-memcpy.S
-+++ b/arch/alpha/lib/ev6-memcpy.S
-@@ -19,7 +19,7 @@
- * Temp usage notes:
- * $1,$2, - scratch
- */
--#include <asm/export.h>
-+
- .set noreorder
- .set noat
-
-@@ -242,7 +242,6 @@ $nomoredata:
- nop # E :
-
- .end memcpy
-- EXPORT_SYMBOL(memcpy)
-
- /* For backwards module compatibility. */
- __memcpy = memcpy
---- a/arch/alpha/lib/ev6-memset.S
-+++ b/arch/alpha/lib/ev6-memset.S
-@@ -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,7 +229,6 @@ end_b:
- nop
- ret $31,($26),1 # L0 :
- .end ___memset
-- EXPORT_SYMBOL(___memset)
-
- /*
- * This is the original body of code, prior to replication and
-@@ -407,7 +406,6 @@ 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
-@@ -596,9 +594,6 @@ end_w:
- ret $31,($26),1 # L0 :
-
- .end __memsetw
-- EXPORT_SYMBOL(__memsetw)
-
- memset = ___memset
- __memset = ___memset
-- EXPORT_SYMBOL(memset)
-- EXPORT_SYMBOL(__memset)
---- a/arch/alpha/lib/ev67-strcat.S
-+++ b/arch/alpha/lib/ev67-strcat.S
-@@ -19,7 +19,7 @@
- * string once.
- */
-
--#include <asm/export.h>
-+
- .text
-
- .align 4
-@@ -52,4 +52,3 @@ $found: cttz $2, $3 # U0 :
- br __stxcpy # L0 :
-
- .end strcat
-- EXPORT_SYMBOL(strcat)
---- a/arch/alpha/lib/ev67-strchr.S
-+++ b/arch/alpha/lib/ev67-strchr.S
-@@ -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,4 +86,3 @@ $found: negq t0, t1 # E : clear all
- ret # L0 :
-
- .end strchr
-- EXPORT_SYMBOL(strchr)
---- a/arch/alpha/lib/ev67-strlen.S
-+++ b/arch/alpha/lib/ev67-strlen.S
-@@ -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,4 +47,3 @@ $found:
- ret $31, ($26) # L0 :
-
- .end strlen
-- EXPORT_SYMBOL(strlen)
---- a/arch/alpha/lib/ev67-strncat.S
-+++ b/arch/alpha/lib/ev67-strncat.S
-@@ -20,7 +20,7 @@
- * Try not to change the actual algorithm if possible for consistency.
- */
-
--#include <asm/export.h>
-+
- .text
-
- .align 4
-@@ -92,4 +92,3 @@ $zerocount:
- ret # L0 :
-
- .end strncat
-- EXPORT_SYMBOL(strncat)
---- a/arch/alpha/lib/ev67-strrchr.S
-+++ b/arch/alpha/lib/ev67-strrchr.S
-@@ -18,7 +18,7 @@
- * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
- */
-
--#include <asm/export.h>
-+
- #include <asm/regdef.h>
-
- .set noreorder
-@@ -107,4 +107,3 @@ $eos:
- nop
-
- .end strrchr
-- EXPORT_SYMBOL(strrchr)
---- a/arch/alpha/lib/fpreg.c
-+++ b/arch/alpha/lib/fpreg.c
-@@ -4,9 +4,6 @@
- * (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
-@@ -55,7 +52,6 @@ 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));
-@@ -101,7 +97,6 @@ alpha_write_fp_reg (unsigned long reg, u
- 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));
-@@ -151,7 +146,6 @@ 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));
-@@ -197,4 +191,3 @@ alpha_write_fp_reg_s (unsigned long reg,
- case 31: LDS(31, val); break;
- }
- }
--EXPORT_SYMBOL(alpha_write_fp_reg_s);
---- a/arch/alpha/lib/memchr.S
-+++ b/arch/alpha/lib/memchr.S
-@@ -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,4 +162,3 @@ $not_found:
- ret # .. e1 :
-
- .end memchr
-- EXPORT_SYMBOL(memchr)
---- a/arch/alpha/lib/memcpy.c
-+++ b/arch/alpha/lib/memcpy.c
-@@ -16,7 +16,6 @@
- */
-
- #include <linux/types.h>
--#include <linux/export.h>
-
- /*
- * This should be done in one go with ldq_u*2/mask/stq_u. Do it
-@@ -159,4 +158,6 @@ void * memcpy(void * dest, const void *s
- __memcpy_unaligned_up ((unsigned long) dest, (unsigned long) src, n);
- return dest;
- }
--EXPORT_SYMBOL(memcpy);
-+
-+/* For backward modules compatibility, define __memcpy. */
-+asm("__memcpy = memcpy; .globl __memcpy");
---- a/arch/alpha/lib/memmove.S
-+++ b/arch/alpha/lib/memmove.S
-@@ -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,4 +179,3 @@ $egress:
- nop
-
- .end memmove
-- EXPORT_SYMBOL(memmove)
---- a/arch/alpha/lib/memset.S
-+++ b/arch/alpha/lib/memset.S
-@@ -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,8 +106,6 @@ within_one_quad:
- end:
- ret $31,($26),1 /* E1 */
- .end ___memset
--EXPORT_SYMBOL(___memset)
--EXPORT_SYMBOL(__constant_c_memset)
-
- .align 5
- .ent __memsetw
-@@ -124,9 +122,6 @@ __memsetw:
- br __constant_c_memset /* .. E1 */
-
- .end __memsetw
--EXPORT_SYMBOL(__memsetw)
-
- memset = ___memset
- __memset = ___memset
-- EXPORT_SYMBOL(memset)
-- EXPORT_SYMBOL(__memset)
---- a/arch/alpha/lib/strcat.S
-+++ b/arch/alpha/lib/strcat.S
-@@ -4,7 +4,6 @@
- *
- * Append a null-terminated string from SRC to DST.
- */
--#include <asm/export.h>
-
- .text
-
-@@ -51,4 +50,3 @@ $found: negq $2, $3 # clear all but
- br __stxcpy
-
- .end strcat
--EXPORT_SYMBOL(strcat);
---- a/arch/alpha/lib/strchr.S
-+++ b/arch/alpha/lib/strchr.S
-@@ -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,4 +68,3 @@ $retnull:
- ret # .. e1 :
-
- .end strchr
-- EXPORT_SYMBOL(strchr)
---- a/arch/alpha/lib/strcpy.S
-+++ b/arch/alpha/lib/strcpy.S
-@@ -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,4 +21,3 @@ strcpy:
- br __stxcpy # do the copy
-
- .end strcpy
-- EXPORT_SYMBOL(strcpy)
---- a/arch/alpha/lib/strlen.S
-+++ b/arch/alpha/lib/strlen.S
-@@ -11,7 +11,7 @@
- * do this instead of the 9 instructions that
- * binary search needs).
- */
--#include <asm/export.h>
-+
- .set noreorder
- .set noat
-
-@@ -55,4 +55,3 @@ done: subq $0, $16, $0
- ret $31, ($26)
-
- .end strlen
-- EXPORT_SYMBOL(strlen)
---- a/arch/alpha/lib/strncat.S
-+++ b/arch/alpha/lib/strncat.S
-@@ -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,4 +82,3 @@ $zerocount:
- ret
-
- .end strncat
-- EXPORT_SYMBOL(strncat)
---- a/arch/alpha/lib/strncpy.S
-+++ b/arch/alpha/lib/strncpy.S
-@@ -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,4 +79,3 @@ $zerolen:
- ret
-
- .end strncpy
-- EXPORT_SYMBOL(strncpy)
---- a/arch/alpha/lib/strrchr.S
-+++ b/arch/alpha/lib/strrchr.S
-@@ -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,4 +85,3 @@ $retnull:
- ret # .. e1 :
-
- .end strrchr
-- EXPORT_SYMBOL(strrchr)
diff --git a/debian/patches/bugfix/m68k/revert-m68k-move-exports-to-definitions.patch b/debian/patches/bugfix/m68k/revert-m68k-move-exports-to-definitions.patch
deleted file mode 100644
index 0b5c40b..0000000
--- a/debian/patches/bugfix/m68k/revert-m68k-move-exports-to-definitions.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 1 Dec 2016 23:14:09 +0000
-Subject: Revert "m68k: move exports to definitions"
-Forwarded: not-needed
-
-This reverts commit d13ffb5630443e6112df0263969cbdfc8ab9ab57 because
-symbols exported from assembly don't automatically get modversions (ABI
-hashes).
-
-Updated for 4.11: don't revert additions of #include <compiler.h> as
-it's needed for other reasons (see #862393).
----
---- a/arch/m68k/include/asm/export.h
-+++ /dev/null
-@@ -1,3 +0,0 @@
--#define KSYM_ALIGN 2
--#define KCRC_ALIGN 2
--#include <asm-generic/export.h>
---- a/arch/m68k/kernel/Makefile
-+++ b/arch/m68k/kernel/Makefile
-@@ -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 module.o process.o ptrace.o
-+obj-y := entry.o irq.o m68k_ksyms.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
---- /dev/null
-+++ b/arch/m68k/kernel/m68k_ksyms.c
-@@ -0,0 +1,32 @@
-+#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
---- a/arch/m68k/lib/ashldi3.c
-+++ b/arch/m68k/lib/ashldi3.c
-@@ -14,7 +14,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICU
- GNU General Public License for more details. */
-
- #include <linux/compiler.h>
--#include <linux/export.h>
-
- #define BITS_PER_UNIT 8
-
-@@ -58,4 +57,3 @@ __ashldi3 (DItype u, word_type b)
-
- return w.ll;
- }
--EXPORT_SYMBOL(__ashldi3);
---- a/arch/m68k/lib/ashrdi3.c
-+++ b/arch/m68k/lib/ashrdi3.c
-@@ -14,7 +14,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICU
- GNU General Public License for more details. */
-
- #include <linux/compiler.h>
--#include <linux/export.h>
-
- #define BITS_PER_UNIT 8
-
-@@ -59,4 +58,3 @@ __ashrdi3 (DItype u, word_type b)
-
- return w.ll;
- }
--EXPORT_SYMBOL(__ashrdi3);
---- a/arch/m68k/lib/divsi3.S
-+++ b/arch/m68k/lib/divsi3.S
-@@ -33,8 +33,6 @@ General Public License for more details.
- D. V. Henkel-Wallace (gumby at cygnus.com) Fete Bastille, 1992
- */
-
--#include <asm/export.h>
--
- /* These are predefined by new versions of GNU cpp. */
-
- #ifndef __USER_LABEL_PREFIX__
-@@ -120,4 +118,3 @@ L2: movel d1, sp at -
- L3: movel sp at +, d2
- rts
-
-- EXPORT_SYMBOL(__divsi3)
---- a/arch/m68k/lib/lshrdi3.c
-+++ b/arch/m68k/lib/lshrdi3.c
-@@ -14,7 +14,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICU
- GNU General Public License for more details. */
-
- #include <linux/compiler.h>
--#include <linux/export.h>
-
- #define BITS_PER_UNIT 8
-
-@@ -58,4 +57,3 @@ __lshrdi3 (DItype u, word_type b)
-
- return w.ll;
- }
--EXPORT_SYMBOL(__lshrdi3);
---- a/arch/m68k/lib/modsi3.S
-+++ b/arch/m68k/lib/modsi3.S
-@@ -33,8 +33,6 @@ General Public License for more details.
- D. V. Henkel-Wallace (gumby at cygnus.com) Fete Bastille, 1992
- */
-
--#include <asm/export.h>
--
- /* These are predefined by new versions of GNU cpp. */
-
- #ifndef __USER_LABEL_PREFIX__
-@@ -108,4 +106,3 @@ SYM (__modsi3):
- movel d1, d0
- rts
-
-- EXPORT_SYMBOL(__modsi3)
---- a/arch/m68k/lib/muldi3.c
-+++ b/arch/m68k/lib/muldi3.c
-@@ -15,7 +15,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICU
- GNU General Public License for more details. */
-
- #include <linux/compiler.h>
--#include <linux/export.h>
-
- #ifdef CONFIG_CPU_HAS_NO_MULDIV64
-
-@@ -93,4 +92,3 @@ __muldi3 (DItype u, DItype v)
-
- return w.ll;
- }
--EXPORT_SYMBOL(__muldi3);
---- a/arch/m68k/lib/mulsi3.S
-+++ b/arch/m68k/lib/mulsi3.S
-@@ -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 (gumby at cygnus.com) 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)
-+
---- a/arch/m68k/lib/udivsi3.S
-+++ b/arch/m68k/lib/udivsi3.S
-@@ -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 (gumby at cygnus.com) 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)
-+
---- a/arch/m68k/lib/umodsi3.S
-+++ b/arch/m68k/lib/umodsi3.S
-@@ -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 (gumby at cygnus.com) 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)
-+
diff --git a/debian/patches/bugfix/sparc/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch b/debian/patches/bugfix/sparc/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
new file mode 100644
index 0000000..065f0a2
--- /dev/null
+++ b/debian/patches/bugfix/sparc/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
@@ -0,0 +1,47 @@
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy at oracle.com>
+Date: Mon, 19 Jun 2017 13:08:48 -0400
+Subject: Adding asm-prototypes.h for genksyms to generate crc
+Origin: https://git.kernel.org/linus/bdca8cc096203b17ad0ac4e19f50578207e054d2
+
+This patch adds the prototypes of assembly defined functions to asm-prototypes.h.
+Some prototypes are directly added as they are not present in any existing header
+files.
+
+Signed-off-by: Nagarathnam Muthusamy <nagarathnam.muthusamy at oracle.com>
+Reviewed-by: Babu Moger <babu.moger at oracle.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ arch/sparc/include/asm/asm-prototypes.h | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+ create mode 100644 arch/sparc/include/asm/asm-prototypes.h
+
+diff --git a/arch/sparc/include/asm/asm-prototypes.h b/arch/sparc/include/asm/asm-prototypes.h
+new file mode 100644
+index 000000000000..d381e11c5dbb
+--- /dev/null
++++ b/arch/sparc/include/asm/asm-prototypes.h
+@@ -0,0 +1,24 @@
++/*
++ * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
++ */
++
++#include <asm/xor.h>
++#include <asm/checksum.h>
++#include <asm/trap_block.h>
++#include <asm/uaccess.h>
++#include <asm/atomic.h>
++#include <asm/ftrace.h>
++#include <asm/cacheflush.h>
++#include <asm/oplib.h>
++#include <linux/atomic.h>
++
++void *__memscan_zero(void *, size_t);
++void *__memscan_generic(void *, int, size_t);
++void *__bzero(void *, size_t);
++void VISenter(void); /* Dummy prototype to supress warning */
++#undef memcpy
++#undef memset
++void *memcpy(void *dest, const void *src, size_t n);
++void *memset(void *s, int c, size_t n);
++typedef int TItype __attribute__((mode(TI)));
++TItype __multi3(TItype a, TItype b);
diff --git a/debian/patches/bugfix/sparc/revert-sparc-move-exports-to-definitions.patch b/debian/patches/bugfix/sparc/revert-sparc-move-exports-to-definitions.patch
deleted file mode 100644
index 093c654..0000000
--- a/debian/patches/bugfix/sparc/revert-sparc-move-exports-to-definitions.patch
+++ /dev/null
@@ -1,1307 +0,0 @@
-From: Ben Hutchings <ben at decadent.org.uk>
-Date: Thu, 12 Jan 2017 00:08:36 +0000
-Subject: Revert "sparc: move exports to definitions"
-Forwarded: not-needed
-
-This reverts commit d3867f0483103b8ff7edfdea3ef1981c03d96891 because
-symbols exported from assembly don't automatically get modversions (ABI
-hashes).
-
-Commit 70a6fcf3283a "[sparc] unify 32bit and 64bit string.h" removed
-the export of __memmove; don't try to export it again. It also
-completely disabled declaration of prototypes of memscan, memcpy and
-memset, which are defined as macros. gcc will still generate implicit
-calls to memcpy and memset, so restore both exports and prototypes for
-them. Don't restore the export of memscan.
-
-Commit aa95ce361ed9 "sparc64: Delete __ret_efault." did what it says;
-don't try to export that symbol.
-
-Commit 1b4af13ff2cc "sparc64: Add __multi3 for gcc 7.x and later."
-did what it says; add a prototype and export it from C code instead.
----
- 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 | 6 +-
- arch/sparc/kernel/helpers.S | 2 -
- arch/sparc/kernel/hvcalls.S | 5 --
- 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 | 16 +---
- 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 | 173 +++++++++++++++++++++++++++++++++++++
- 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 | 3 -
- 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, 263 insertions(+), 139 deletions(-)
- delete mode 100644 arch/sparc/kernel/sparc_ksyms.c
- create mode 100644 arch/sparc/kernel/sparc_ksyms_32.c
- create mode 100644 arch/sparc/kernel/sparc_ksyms_64.c
- create mode 100644 arch/sparc/lib/ksyms.c
-
---- a/arch/sparc/include/asm/Kbuild
-+++ b/arch/sparc/include/asm/Kbuild
-@@ -5,7 +5,6 @@ generic-y += clkdev.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
---- a/arch/sparc/kernel/Makefile
-+++ b/arch/sparc/kernel/Makefile
-@@ -86,7 +86,7 @@ obj-y += auxio_$(BIT
- obj-$(CONFIG_SUN_PM) += apc.o pmc.o
-
- obj-$(CONFIG_MODULES) += module.o
--obj-$(CONFIG_MODULES) += sparc_ksyms.o
-+obj-$(CONFIG_MODULES) += sparc_ksyms_$(BITS).o
- obj-$(CONFIG_SPARC_LED) += led.o
- obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
-
---- a/arch/sparc/kernel/entry.S
-+++ b/arch/sparc/kernel/entry.S
-@@ -29,7 +29,6 @@
- #include <asm/unistd.h>
-
- #include <asm/asmmacro.h>
--#include <asm/export.h>
-
- #define curptr g6
-
-@@ -1208,8 +1207,6 @@ delay_continue:
-
- ret
- restore
--EXPORT_SYMBOL(__udelay)
--EXPORT_SYMBOL(__ndelay)
-
- /* Handle a software breakpoint */
- /* We have to inform parent that child has stopped */
---- a/arch/sparc/kernel/head_32.S
-+++ b/arch/sparc/kernel/head_32.S
-@@ -24,7 +24,6 @@
- #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
-@@ -61,7 +60,6 @@ sun4e_notsup:
- */
- .globl empty_zero_page
- empty_zero_page: .skip PAGE_SIZE
--EXPORT_SYMBOL(empty_zero_page)
-
- .global root_flags
- .global ram_flags
---- a/arch/sparc/kernel/head_64.S
-+++ b/arch/sparc/kernel/head_64.S
-@@ -32,8 +32,7 @@
- #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.
- */
-@@ -145,7 +144,6 @@ 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:
-@@ -161,7 +159,6 @@ is_sun4v:
- .word 0
- sun4v_chip_type:
- .word SUN4V_CHIP_INVALID
--EXPORT_SYMBOL(sun4v_chip_type)
- 1:
- rd %pc, %l0
-
-@@ -927,7 +924,6 @@ 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
-
- ENTRY(__retl_efault)
---- a/arch/sparc/kernel/helpers.S
-+++ b/arch/sparc/kernel/helpers.S
-@@ -15,7 +15,6 @@ __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
-@@ -62,4 +61,3 @@ 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)
---- a/arch/sparc/kernel/hvcalls.S
-+++ b/arch/sparc/kernel/hvcalls.S
-@@ -343,7 +343,6 @@ ENTRY(sun4v_mach_set_watchdog)
- 0: retl
- nop
- ENDPROC(sun4v_mach_set_watchdog)
--EXPORT_SYMBOL(sun4v_mach_set_watchdog)
-
- /* No inputs and does not return. */
- ENTRY(sun4v_mach_sir)
-@@ -777,7 +776,6 @@ 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
-@@ -785,7 +783,6 @@ ENTRY(sun4v_niagara_setperf)
- retl
- nop
- ENDPROC(sun4v_niagara_setperf)
--EXPORT_SYMBOL(sun4v_niagara_setperf)
-
- ENTRY(sun4v_niagara2_getperf)
- mov %o0, %o4
-@@ -795,7 +792,6 @@ 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
-@@ -803,7 +799,6 @@ 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
---- a/arch/sparc/kernel/sparc_ksyms.c
-+++ /dev/null
-@@ -1,12 +0,0 @@
--/*
-- * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
-- *
-- * Copyright (C) 1996 David S. Miller (davem at caip.rutgers.edu)
-- * Copyright (C) 1996 Eddie C. Dost (ecd at skynet.be)
-- */
--
--#include <linux/init.h>
--#include <linux/export.h>
--
--/* This is needed only for drivers/sbus/char/openprom.c */
--EXPORT_SYMBOL(saved_command_line);
---- /dev/null
-+++ b/arch/sparc/kernel/sparc_ksyms_32.c
-@@ -0,0 +1,30 @@
-+/*
-+ * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
-+ *
-+ * Copyright (C) 1996 David S. Miller (davem at caip.rutgers.edu)
-+ * Copyright (C) 1996 Eddie C. Dost (ecd at skynet.be)
-+ */
-+
-+#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(empty_zero_page);
-+
-+/* Exporting a symbol from /init/main.c */
-+EXPORT_SYMBOL(saved_command_line);
---- /dev/null
-+++ b/arch/sparc/kernel/sparc_ksyms_64.c
-@@ -0,0 +1,58 @@
-+/* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
-+ *
-+ * Copyright (C) 1996, 2007 David S. Miller (davem at davemloft.net)
-+ * Copyright (C) 1996 Eddie C. Dost (ecd at skynet.be)
-+ * Copyright (C) 1999 Jakub Jelinek (jj at ultra.linux.cz)
-+ */
-+
-+#include <linux/export.h>
-+#include <linux/pci.h>
-+#include <linux/bitops.h>
-+
-+#include <asm/cpudata.h>
-+#include <asm/uaccess.h>
-+#include <asm/spitfire.h>
-+#include <asm/oplib.h>
-+#include <asm/hypervisor.h>
-+#include <asm/cacheflush.h>
-+
-+struct poll {
-+ int fd;
-+ short events;
-+ short revents;
-+};
-+
-+/* from helpers.S */
-+EXPORT_SYMBOL(__flushw_user);
-+EXPORT_SYMBOL_GPL(real_hard_smp_processor_id);
-+
-+/* from head_64.S */
-+EXPORT_SYMBOL(tlb_type);
-+EXPORT_SYMBOL(sun4v_chip_type);
-+EXPORT_SYMBOL(prom_root_node);
-+
-+/* from hvcalls.S */
-+EXPORT_SYMBOL(sun4v_niagara_getperf);
-+EXPORT_SYMBOL(sun4v_niagara_setperf);
-+EXPORT_SYMBOL(sun4v_niagara2_getperf);
-+EXPORT_SYMBOL(sun4v_niagara2_setperf);
-+EXPORT_SYMBOL(sun4v_mach_set_watchdog);
-+
-+/* from hweight.S */
-+EXPORT_SYMBOL(__arch_hweight8);
-+EXPORT_SYMBOL(__arch_hweight16);
-+EXPORT_SYMBOL(__arch_hweight32);
-+EXPORT_SYMBOL(__arch_hweight64);
-+
-+/* from ffs_ffz.S */
-+EXPORT_SYMBOL(ffs);
-+EXPORT_SYMBOL(__ffs);
-+
-+/* from multi3.S */
-+/* XXX should teach genksyms about __int128 */
-+typedef struct fake_int128 { long long a, b; } __aligned(16) fake_int128;
-+asmlinkage fake_int128 __multi3(fake_int128, fake_int128);
-+EXPORT_SYMBOL(__multi3);
-+
-+/* Exporting a symbol from /init/main.c */
-+EXPORT_SYMBOL(saved_command_line);
---- a/arch/sparc/lib/Makefile
-+++ b/arch/sparc/lib/Makefile
-@@ -44,4 +44,5 @@ lib-$(CONFIG_SPARC64) += mcount.o ipcsum
-
- obj-$(CONFIG_SPARC64) += iomap.o
- obj-$(CONFIG_SPARC32) += atomic32.o ucmpdi2.o
-+obj-y += ksyms.o
- obj-$(CONFIG_SPARC64) += PeeCeeI.o
---- a/arch/sparc/lib/U1memcpy.S
-+++ b/arch/sparc/lib/U1memcpy.S
-@@ -8,7 +8,6 @@
- #include <linux/linkage.h>
- #include <asm/visasm.h>
- #include <asm/asi.h>
--#include <asm/export.h>
- #define GLOBAL_SPARE g7
- #else
- #define GLOBAL_SPARE g5
-@@ -681,4 +680,3 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len
- mov EX_RETVAL(%o4), %o0
-
- .size FUNC_NAME, .-FUNC_NAME
--EXPORT_SYMBOL(FUNC_NAME)
---- a/arch/sparc/lib/VISsave.S
-+++ b/arch/sparc/lib/VISsave.S
-@@ -13,7 +13,6 @@
- #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 */
-@@ -80,4 +79,3 @@ vis1: ldub [%g6 + TI_FPSAVED], %g3
- 80: jmpl %g7 + %g0, %g0
- nop
- ENDPROC(VISenter)
--EXPORT_SYMBOL(VISenter)
---- a/arch/sparc/lib/ashldi3.S
-+++ b/arch/sparc/lib/ashldi3.S
-@@ -6,7 +6,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- ENTRY(__ashldi3)
-@@ -34,4 +33,3 @@ ENTRY(__ashldi3)
- retl
- nop
- ENDPROC(__ashldi3)
--EXPORT_SYMBOL(__ashldi3)
---- a/arch/sparc/lib/ashrdi3.S
-+++ b/arch/sparc/lib/ashrdi3.S
-@@ -6,7 +6,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- ENTRY(__ashrdi3)
-@@ -36,4 +35,3 @@ ENTRY(__ashrdi3)
- jmpl %o7 + 8, %g0
- nop
- ENDPROC(__ashrdi3)
--EXPORT_SYMBOL(__ashrdi3)
---- a/arch/sparc/lib/atomic_64.S
-+++ b/arch/sparc/lib/atomic_64.S
-@@ -6,7 +6,6 @@
- #include <linux/linkage.h>
- #include <asm/asi.h>
- #include <asm/backoff.h>
--#include <asm/export.h>
-
- .text
-
-@@ -30,7 +29,6 @@ ENTRY(atomic_##op) /* %o0 = increment, %
- 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 */ \
-@@ -44,8 +42,7 @@ ENTRY(atomic_##op##_return) /* %o0 = inc
- retl; \
- sra %g1, 0, %o0; \
- 2: BACKOFF_SPIN(%o2, %o3, 1b); \
--ENDPROC(atomic_##op##_return); \
--EXPORT_SYMBOL(atomic_##op##_return);
-+ENDPROC(atomic_##op##_return);
-
- #define ATOMIC_FETCH_OP(op) \
- ENTRY(atomic_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
-@@ -59,8 +56,7 @@ ENTRY(atomic_fetch_##op) /* %o0 = increm
- retl; \
- sra %g1, 0, %o0; \
- 2: BACKOFF_SPIN(%o2, %o3, 1b); \
--ENDPROC(atomic_fetch_##op); \
--EXPORT_SYMBOL(atomic_fetch_##op);
-+ENDPROC(atomic_fetch_##op);
-
- #define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
-
-@@ -92,7 +88,6 @@ ENTRY(atomic64_##op) /* %o0 = increment,
- 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 */ \
-@@ -106,8 +101,7 @@ ENTRY(atomic64_##op##_return) /* %o0 = i
- retl; \
- op %g1, %o0, %o0; \
- 2: BACKOFF_SPIN(%o2, %o3, 1b); \
--ENDPROC(atomic64_##op##_return); \
--EXPORT_SYMBOL(atomic64_##op##_return);
-+ENDPROC(atomic64_##op##_return);
-
- #define ATOMIC64_FETCH_OP(op) \
- ENTRY(atomic64_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
-@@ -121,8 +115,7 @@ ENTRY(atomic64_fetch_##op) /* %o0 = incr
- retl; \
- mov %g1, %o0; \
- 2: BACKOFF_SPIN(%o2, %o3, 1b); \
--ENDPROC(atomic64_fetch_##op); \
--EXPORT_SYMBOL(atomic64_fetch_##op);
-+ENDPROC(atomic64_fetch_##op);
-
- #define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op) ATOMIC64_FETCH_OP(op)
-
-@@ -154,4 +147,3 @@ ENTRY(atomic64_dec_if_positive) /* %o0 =
- sub %g1, 1, %o0
- 2: BACKOFF_SPIN(%o2, %o3, 1b)
- ENDPROC(atomic64_dec_if_positive)
--EXPORT_SYMBOL(atomic64_dec_if_positive)
---- a/arch/sparc/lib/bitops.S
-+++ b/arch/sparc/lib/bitops.S
-@@ -6,7 +6,6 @@
- #include <linux/linkage.h>
- #include <asm/asi.h>
- #include <asm/backoff.h>
--#include <asm/export.h>
-
- .text
-
-@@ -30,7 +29,6 @@ ENTRY(test_and_set_bit) /* %o0=nr, %o1=a
- 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)
-@@ -52,7 +50,6 @@ ENTRY(test_and_clear_bit) /* %o0=nr, %o1
- 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)
-@@ -74,7 +71,6 @@ ENTRY(test_and_change_bit) /* %o0=nr, %o
- 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)
-@@ -94,7 +90,6 @@ 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)
-@@ -114,7 +109,6 @@ 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)
-@@ -134,4 +128,3 @@ ENTRY(change_bit) /* %o0=nr, %o1=addr */
- nop
- 2: BACKOFF_SPIN(%o3, %o4, 1b)
- ENDPROC(change_bit)
--EXPORT_SYMBOL(change_bit)
---- a/arch/sparc/lib/blockops.S
-+++ b/arch/sparc/lib/blockops.S
-@@ -6,7 +6,6 @@
-
- #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.
-@@ -65,7 +64,6 @@ 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
-@@ -89,4 +87,3 @@ ENTRY(__copy_1page)
- retl
- nop
- ENDPROC(__copy_1page)
--EXPORT_SYMBOL(__copy_1page)
---- a/arch/sparc/lib/bzero.S
-+++ b/arch/sparc/lib/bzero.S
-@@ -5,7 +5,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
-
-@@ -79,8 +78,6 @@ __bzero_done:
- mov %o3, %o0
- ENDPROC(__bzero)
- ENDPROC(memset)
--EXPORT_SYMBOL(__bzero)
--EXPORT_SYMBOL(memset)
-
- #define EX_ST(x,y) \
- 98: x,y; \
-@@ -146,4 +143,3 @@ __clear_user_done:
- retl
- clr %o0
- ENDPROC(__clear_user)
--EXPORT_SYMBOL(__clear_user)
---- a/arch/sparc/lib/checksum_32.S
-+++ b/arch/sparc/lib/checksum_32.S
-@@ -14,7 +14,6 @@
- */
-
- #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; \
-@@ -105,7 +104,6 @@ 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
-@@ -337,7 +335,6 @@ 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
---- a/arch/sparc/lib/checksum_64.S
-+++ b/arch/sparc/lib/checksum_64.S
-@@ -13,7 +13,6 @@
- * BSD4.4 portable checksum routine
- */
-
--#include <asm/export.h>
- .text
-
- csum_partial_fix_alignment:
-@@ -38,7 +37,6 @@ 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
---- a/arch/sparc/lib/clear_page.S
-+++ b/arch/sparc/lib/clear_page.S
-@@ -10,7 +10,6 @@
- #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
-@@ -27,7 +26,6 @@
- .text
-
- .globl _clear_page
-- EXPORT_SYMBOL(_clear_page)
- _clear_page: /* %o0=dest */
- ba,pt %xcc, clear_page_common
- clr %o4
-@@ -37,7 +35,6 @@ _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
---- a/arch/sparc/lib/copy_in_user.S
-+++ b/arch/sparc/lib/copy_in_user.S
-@@ -5,7 +5,6 @@
-
- #include <linux/linkage.h>
- #include <asm/asi.h>
--#include <asm/export.h>
-
- #define XCC xcc
-
-@@ -106,4 +105,3 @@ ENTRY(raw_copy_in_user) /* %o0=dst, %o1=
- retl
- clr %o0
- ENDPROC(raw_copy_in_user)
--EXPORT_SYMBOL(raw_copy_in_user)
---- a/arch/sparc/lib/copy_page.S
-+++ b/arch/sparc/lib/copy_page.S
-@@ -10,7 +10,6 @@
- #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
-@@ -45,7 +44,6 @@
- .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
---- a/arch/sparc/lib/copy_user.S
-+++ b/arch/sparc/lib/copy_user.S
-@@ -15,7 +15,6 @@
- #include <asm/asmmacro.h>
- #include <asm/page.h>
- #include <asm/thread_info.h>
--#include <asm/export.h>
-
- /* Work around cpp -rob */
- #define ALLOC #alloc
-@@ -120,7 +119,6 @@
- __copy_user_begin:
-
- .globl __copy_user
-- EXPORT_SYMBOL(__copy_user)
- dword_align:
- andcc %o1, 1, %g0
- be 4f
---- a/arch/sparc/lib/csum_copy.S
-+++ b/arch/sparc/lib/csum_copy.S
-@@ -3,8 +3,6 @@
- * Copyright (C) 2005 David S. Miller <davem at davemloft.net>
- */
-
--#include <asm/export.h>
--
- #ifdef __KERNEL__
- #define GLOBAL_SPARE %g7
- #else
-@@ -65,7 +63,6 @@
- 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
---- a/arch/sparc/lib/divdi3.S
-+++ b/arch/sparc/lib/divdi3.S
-@@ -17,7 +17,6 @@ along with GNU CC; see the file COPYING.
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
--#include <asm/export.h>
- .text
- .align 4
- .globl __divdi3
-@@ -280,4 +279,3 @@ __divdi3:
- .LL81:
- ret
- restore
--EXPORT_SYMBOL(__divdi3)
---- a/arch/sparc/lib/ffs.S
-+++ b/arch/sparc/lib/ffs.S
-@@ -1,5 +1,4 @@
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .register %g2,#scratch
-
-@@ -66,8 +65,6 @@ ENTRY(__ffs)
- add %o2, %g1, %o0
- ENDPROC(ffs)
- ENDPROC(__ffs)
--EXPORT_SYMBOL(__ffs)
--EXPORT_SYMBOL(ffs)
-
- .section .popc_6insn_patch, "ax"
- .word ffs
---- a/arch/sparc/lib/hweight.S
-+++ b/arch/sparc/lib/hweight.S
-@@ -1,5 +1,4 @@
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- .align 32
-@@ -8,7 +7,6 @@ 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
-@@ -21,7 +19,6 @@ 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
-@@ -34,7 +31,6 @@ 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
-@@ -47,7 +43,6 @@ ENTRY(__arch_hweight64)
- nop
- nop
- ENDPROC(__arch_hweight64)
--EXPORT_SYMBOL(__arch_hweight64)
- .section .popc_3insn_patch, "ax"
- .word __arch_hweight64
- retl
---- a/arch/sparc/lib/ipcsum.S
-+++ b/arch/sparc/lib/ipcsum.S
-@@ -1,5 +1,4 @@
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- ENTRY(ip_fast_csum) /* %o0 = iph, %o1 = ihl */
-@@ -32,4 +31,3 @@ ENTRY(ip_fast_csum) /* %o0 = iph, %o1 =
- retl
- and %o2, %o1, %o0
- ENDPROC(ip_fast_csum)
--EXPORT_SYMBOL(ip_fast_csum)
---- /dev/null
-+++ b/arch/sparc/lib/ksyms.c
-@@ -0,0 +1,173 @@
-+/*
-+ * Export of symbols defined in assembler
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/string.h>
-+#include <linux/types.h>
-+
-+#include <asm/checksum.h>
-+#include <asm/uaccess.h>
-+#include <asm/ftrace.h>
-+
-+/* string functions */
-+EXPORT_SYMBOL(strlen);
-+EXPORT_SYMBOL(strncmp);
-+
-+/* mem* functions */
-+extern void *__memscan_zero(void *, size_t);
-+extern void *__memscan_generic(void *, int, size_t);
-+#undef memcpy
-+extern void *memcpy(void *, const void *, size_t);
-+#undef memset
-+extern void *memset(void *, int, size_t);
-+extern void *__bzero(void *, size_t);
-+
-+EXPORT_SYMBOL(__memscan_zero);
-+EXPORT_SYMBOL(__memscan_generic);
-+EXPORT_SYMBOL(memcmp);
-+EXPORT_SYMBOL(memcpy);
-+EXPORT_SYMBOL(memset);
-+EXPORT_SYMBOL(memmove);
-+EXPORT_SYMBOL(__bzero);
-+
-+/* Networking helper routines. */
-+EXPORT_SYMBOL(csum_partial);
-+
-+#ifdef CONFIG_MCOUNT
-+EXPORT_SYMBOL(_mcount);
-+#endif
-+
-+/*
-+ * sparc
-+ */
-+#ifdef CONFIG_SPARC32
-+extern int __ashrdi3(int, int);
-+extern int __ashldi3(int, int);
-+extern int __lshrdi3(int, int);
-+extern int __muldi3(int, int);
-+extern int __divdi3(int, int);
-+
-+extern void (*__copy_1page)(void *, const void *);
-+extern void (*bzero_1page)(void *);
-+
-+extern void ___rw_read_enter(void);
-+extern void ___rw_read_try(void);
-+extern void ___rw_read_exit(void);
-+extern void ___rw_write_enter(void);
-+
-+/* Networking helper routines. */
-+EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
-+
-+/* Special internal versions of library functions. */
-+EXPORT_SYMBOL(__copy_1page);
-+EXPORT_SYMBOL(bzero_1page);
-+
-+/* Moving data to/from/in userspace. */
-+EXPORT_SYMBOL(__copy_user);
-+
-+/* Used by asm/spinlock.h */
-+#ifdef CONFIG_SMP
-+EXPORT_SYMBOL(___rw_read_enter);
-+EXPORT_SYMBOL(___rw_read_try);
-+EXPORT_SYMBOL(___rw_read_exit);
-+EXPORT_SYMBOL(___rw_write_enter);
-+#endif
-+
-+EXPORT_SYMBOL(__ashrdi3);
-+EXPORT_SYMBOL(__ashldi3);
-+EXPORT_SYMBOL(__lshrdi3);
-+EXPORT_SYMBOL(__muldi3);
-+EXPORT_SYMBOL(__divdi3);
-+#endif
-+
-+/*
-+ * sparc64
-+ */
-+#ifdef CONFIG_SPARC64
-+/* Networking helper routines. */
-+EXPORT_SYMBOL(csum_partial_copy_nocheck);
-+EXPORT_SYMBOL(__csum_partial_copy_from_user);
-+EXPORT_SYMBOL(__csum_partial_copy_to_user);
-+EXPORT_SYMBOL(ip_fast_csum);
-+
-+/* Moving data to/from/in userspace. */
-+EXPORT_SYMBOL(raw_copy_to_user);
-+EXPORT_SYMBOL(raw_copy_from_user);
-+EXPORT_SYMBOL(raw_copy_in_user);
-+EXPORT_SYMBOL(__clear_user);
-+
-+/* Atomic counter implementation. */
-+#define ATOMIC_OP(op) \
-+EXPORT_SYMBOL(atomic_##op); \
-+EXPORT_SYMBOL(atomic64_##op);
-+
-+#define ATOMIC_OP_RETURN(op) \
-+EXPORT_SYMBOL(atomic_##op##_return); \
-+EXPORT_SYMBOL(atomic64_##op##_return);
-+
-+#define ATOMIC_FETCH_OP(op) \
-+EXPORT_SYMBOL(atomic_fetch_##op); \
-+EXPORT_SYMBOL(atomic64_fetch_##op);
-+
-+#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
-+
-+ATOMIC_OPS(add)
-+ATOMIC_OPS(sub)
-+
-+#undef ATOMIC_OPS
-+#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
-+
-+ATOMIC_OPS(and)
-+ATOMIC_OPS(or)
-+ATOMIC_OPS(xor)
-+
-+#undef ATOMIC_OPS
-+#undef ATOMIC_FETCH_OP
-+#undef ATOMIC_OP_RETURN
-+#undef ATOMIC_OP
-+
-+EXPORT_SYMBOL(atomic64_dec_if_positive);
-+
-+/* Atomic bit operations. */
-+EXPORT_SYMBOL(test_and_set_bit);
-+EXPORT_SYMBOL(test_and_clear_bit);
-+EXPORT_SYMBOL(test_and_change_bit);
-+EXPORT_SYMBOL(set_bit);
-+EXPORT_SYMBOL(clear_bit);
-+EXPORT_SYMBOL(change_bit);
-+
-+/* Special internal versions of library functions. */
-+EXPORT_SYMBOL(_clear_page);
-+EXPORT_SYMBOL(clear_user_page);
-+EXPORT_SYMBOL(copy_user_page);
-+
-+/* RAID code needs this */
-+void VISenter(void);
-+EXPORT_SYMBOL(VISenter);
-+
-+extern void xor_vis_2(unsigned long, unsigned long *, unsigned long *);
-+extern void xor_vis_3(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *);
-+extern void xor_vis_4(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *, unsigned long *);
-+extern void xor_vis_5(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *, unsigned long *, unsigned long *);
-+EXPORT_SYMBOL(xor_vis_2);
-+EXPORT_SYMBOL(xor_vis_3);
-+EXPORT_SYMBOL(xor_vis_4);
-+EXPORT_SYMBOL(xor_vis_5);
-+
-+extern void xor_niagara_2(unsigned long, unsigned long *, unsigned long *);
-+extern void xor_niagara_3(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *);
-+extern void xor_niagara_4(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *, unsigned long *);
-+extern void xor_niagara_5(unsigned long, unsigned long *, unsigned long *,
-+ unsigned long *, unsigned long *, unsigned long *);
-+
-+EXPORT_SYMBOL(xor_niagara_2);
-+EXPORT_SYMBOL(xor_niagara_3);
-+EXPORT_SYMBOL(xor_niagara_4);
-+EXPORT_SYMBOL(xor_niagara_5);
-+#endif
---- a/arch/sparc/lib/locks.S
-+++ b/arch/sparc/lib/locks.S
-@@ -10,7 +10,6 @@
- #include <asm/psr.h>
- #include <asm/smp.h>
- #include <asm/spinlock.h>
--#include <asm/export.h>
-
- .text
- .align 4
-@@ -49,7 +48,6 @@ ___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
-@@ -61,7 +59,6 @@ ___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
-@@ -73,7 +70,6 @@ ___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
-@@ -85,7 +81,6 @@ ___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
---- a/arch/sparc/lib/lshrdi3.S
-+++ b/arch/sparc/lib/lshrdi3.S
-@@ -1,5 +1,4 @@
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- ENTRY(__lshrdi3)
- cmp %o2, 0
-@@ -26,4 +25,3 @@ ENTRY(__lshrdi3)
- retl
- nop
- ENDPROC(__lshrdi3)
--EXPORT_SYMBOL(__lshrdi3)
---- a/arch/sparc/lib/mcount.S
-+++ b/arch/sparc/lib/mcount.S
-@@ -6,7 +6,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- /*
- * This is the main variant and is called by C code. GCC's -pg option
-@@ -17,7 +16,6 @@
- .align 32
- .globl _mcount
- .type _mcount,#function
-- EXPORT_SYMBOL(_mcount)
- .globl mcount
- .type mcount,#function
- _mcount:
---- a/arch/sparc/lib/memcmp.S
-+++ b/arch/sparc/lib/memcmp.S
-@@ -6,7 +6,6 @@
-
- #include <linux/linkage.h>
- #include <asm/asm.h>
--#include <asm/export.h>
-
- .text
- ENTRY(memcmp)
-@@ -26,4 +25,3 @@ ENTRY(memcmp)
- 2: retl
- mov 0, %o0
- ENDPROC(memcmp)
--EXPORT_SYMBOL(memcmp)
---- a/arch/sparc/lib/memcpy.S
-+++ b/arch/sparc/lib/memcpy.S
-@@ -7,7 +7,6 @@
- * Copyright (C) 1996 Jakub Jelinek (jj at sunsite.mff.cuni.cz)
- */
-
--#include <asm/export.h>
- #define FUNC(x) \
- .globl x; \
- .type x, at function; \
-@@ -63,7 +62,6 @@ x:
- .align 4
-
- FUNC(memmove)
--EXPORT_SYMBOL(memmove)
- cmp %o0, %o1
- mov %o0, %g7
- bleu 9f
-@@ -121,7 +119,6 @@ EXPORT_SYMBOL(memmove)
- add %o0, 2, %o0
-
- FUNC(memcpy) /* %o0=dst %o1=src %o2=len */
--EXPORT_SYMBOL(memcpy)
-
- sub %o0, %o1, %o4
- mov %o0, %g7
---- a/arch/sparc/lib/memmove.S
-+++ b/arch/sparc/lib/memmove.S
-@@ -5,7 +5,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- ENTRY(memmove) /* o0=dst o1=src o2=len */
-@@ -58,4 +57,3 @@ ENTRY(memmove) /* o0=dst o1=src o2=len *
- stb %g7, [%o0 - 0x1]
- ba,a,pt %xcc, 99b
- ENDPROC(memmove)
--EXPORT_SYMBOL(memmove)
---- a/arch/sparc/lib/memscan_32.S
-+++ b/arch/sparc/lib/memscan_32.S
-@@ -4,8 +4,6 @@
- * Copyright (C) 1996 David S. Miller (davem at caip.rutgers.edu)
- */
-
--#include <asm/export.h>
--
- /* In essence, this is just a fancy strlen. */
-
- #define LO_MAGIC 0x01010101
-@@ -15,8 +13,6 @@
- .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
---- a/arch/sparc/lib/memscan_64.S
-+++ b/arch/sparc/lib/memscan_64.S
-@@ -5,8 +5,6 @@
- * Copyright (C) 1998 David S. Miller (davem at redhat.com)
- */
-
-- #include <asm/export.h>
--
- #define HI_MAGIC 0x8080808080808080
- #define LO_MAGIC 0x0101010101010101
- #define ASI_PL 0x88
-@@ -15,8 +13,6 @@
- .align 32
- .globl __memscan_zero, __memscan_generic
- .globl memscan
-- EXPORT_SYMBOL(__memscan_zero)
-- EXPORT_SYMBOL(__memscan_generic)
-
- __memscan_zero:
- /* %o0 = bufp, %o1 = size */
---- a/arch/sparc/lib/memset.S
-+++ b/arch/sparc/lib/memset.S
-@@ -9,7 +9,6 @@
- */
-
- #include <asm/ptrace.h>
--#include <asm/export.h>
-
- /* Work around cpp -rob */
- #define ALLOC #alloc
-@@ -64,8 +63,6 @@ __bzero_begin:
-
- .globl __bzero
- .globl memset
-- EXPORT_SYMBOL(__bzero)
-- EXPORT_SYMBOL(memset)
- .globl __memset_start, __memset_end
- __memset_start:
- memset:
---- a/arch/sparc/lib/muldi3.S
-+++ b/arch/sparc/lib/muldi3.S
-@@ -17,7 +17,6 @@ along with GNU CC; see the file COPYING.
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
--#include <asm/export.h>
- .text
- .align 4
- .globl __muldi3
-@@ -75,4 +74,3 @@ __muldi3:
- add %l2, %l0, %i0
- ret
- restore %g0, %l3, %o1
--EXPORT_SYMBOL(__muldi3)
---- a/arch/sparc/lib/strlen.S
-+++ b/arch/sparc/lib/strlen.S
-@@ -7,7 +7,6 @@
-
- #include <linux/linkage.h>
- #include <asm/asm.h>
--#include <asm/export.h>
-
- #define LO_MAGIC 0x01010101
- #define HI_MAGIC 0x80808080
-@@ -79,4 +78,3 @@ ENTRY(strlen)
- retl
- mov 2, %o0
- ENDPROC(strlen)
--EXPORT_SYMBOL(strlen)
---- a/arch/sparc/lib/strncmp_32.S
-+++ b/arch/sparc/lib/strncmp_32.S
-@@ -4,7 +4,6 @@
- */
-
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- ENTRY(strncmp)
-@@ -117,4 +116,3 @@ ENTRY(strncmp)
- retl
- sub %o3, %o0, %o0
- ENDPROC(strncmp)
--EXPORT_SYMBOL(strncmp)
---- a/arch/sparc/lib/strncmp_64.S
-+++ b/arch/sparc/lib/strncmp_64.S
-@@ -6,7 +6,6 @@
-
- #include <linux/linkage.h>
- #include <asm/asi.h>
--#include <asm/export.h>
-
- .text
- ENTRY(strncmp)
-@@ -29,4 +28,3 @@ ENTRY(strncmp)
- retl
- clr %o0
- ENDPROC(strncmp)
--EXPORT_SYMBOL(strncmp)
---- a/arch/sparc/lib/xor.S
-+++ b/arch/sparc/lib/xor.S
-@@ -13,7 +13,6 @@
- #include <asm/asi.h>
- #include <asm/dcu.h>
- #include <asm/spitfire.h>
--#include <asm/export.h>
-
- /*
- * Requirements:
-@@ -91,7 +90,6 @@ 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
-@@ -158,7 +156,6 @@ 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
-@@ -244,7 +241,6 @@ 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
-@@ -351,7 +347,6 @@ 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 */
-@@ -398,7 +393,6 @@ ENTRY(xor_niagara_2) /* %o0=bytes, %o1=d
- 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
-@@ -460,7 +454,6 @@ ENTRY(xor_niagara_3) /* %o0=bytes, %o1=d
- 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
-@@ -543,7 +536,6 @@ ENTRY(xor_niagara_4) /* %o0=bytes, %o1=d
- 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
-@@ -642,4 +634,3 @@ ENTRY(xor_niagara_5) /* %o0=bytes, %o1=d
- ret
- restore
- ENDPROC(xor_niagara_5)
--EXPORT_SYMBOL(xor_niagara_5)
---- a/arch/sparc/lib/multi3.S
-+++ b/arch/sparc/lib/multi3.S
-@@ -1,5 +1,4 @@
- #include <linux/linkage.h>
--#include <asm/export.h>
-
- .text
- .align 4
-@@ -32,4 +31,3 @@ ENTRY(__multi3) /* %o0 = u, %o1 = v */
- retl
- add %g1, %o0, %o0
- ENDPROC(__multi3)
--EXPORT_SYMBOL(__multi3)
diff --git a/debian/patches/bugfix/sparc/sed-regex-in-makefile.build-requires-line-break-betw.patch b/debian/patches/bugfix/sparc/sed-regex-in-makefile.build-requires-line-break-betw.patch
new file mode 100644
index 0000000..38b68ed
--- /dev/null
+++ b/debian/patches/bugfix/sparc/sed-regex-in-makefile.build-requires-line-break-betw.patch
@@ -0,0 +1,92 @@
+From: Nagarathnam Muthusamy <nagarathnam.muthusamy at oracle.com>
+Date: Mon, 19 Jun 2017 13:08:49 -0400
+Subject: sed regex in Makefile.build requires line break between exported
+ symbols
+Origin: https://git.kernel.org/linus/d16c0649feb4fe4e814f44803df5a617769c3233
+
+The following regex in Makefile.build matches only one ___EXPORT_SYMBOL per line.
+
+sed
+'s/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/'
+
+ATOMIC_OPS macro in atomic_64.S expands multiple symbols in same line hence
+version generation is done only for the last matched symbol. This patch adds
+new line between the symbol expansions.
+
+Signed-off-by: Nagarathnam Muthusamy <nagarathnam.muthusamy at oracle.com>
+Reviewed-by: Babu Moger <babu.moger at oracle.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ arch/sparc/lib/atomic_64.S | 44 ++++++++++++++++++++++++++------------------
+ 1 file changed, 26 insertions(+), 18 deletions(-)
+
+diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
+index 1c6a1bde5138..ce17c3094ba6 100644
+--- a/arch/sparc/lib/atomic_64.S
++++ b/arch/sparc/lib/atomic_64.S
+@@ -62,19 +62,23 @@ ENTRY(atomic_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
+ ENDPROC(atomic_fetch_##op); \
+ EXPORT_SYMBOL(atomic_fetch_##op);
+
+-#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_OP_RETURN(op) ATOMIC_FETCH_OP(op)
++ATOMIC_OP(add)
++ATOMIC_OP_RETURN(add)
++ATOMIC_FETCH_OP(add)
+
+-ATOMIC_OPS(add)
+-ATOMIC_OPS(sub)
++ATOMIC_OP(sub)
++ATOMIC_OP_RETURN(sub)
++ATOMIC_FETCH_OP(sub)
+
+-#undef ATOMIC_OPS
+-#define ATOMIC_OPS(op) ATOMIC_OP(op) ATOMIC_FETCH_OP(op)
++ATOMIC_OP(and)
++ATOMIC_FETCH_OP(and)
+
+-ATOMIC_OPS(and)
+-ATOMIC_OPS(or)
+-ATOMIC_OPS(xor)
++ATOMIC_OP(or)
++ATOMIC_FETCH_OP(or)
++
++ATOMIC_OP(xor)
++ATOMIC_FETCH_OP(xor)
+
+-#undef ATOMIC_OPS
+ #undef ATOMIC_FETCH_OP
+ #undef ATOMIC_OP_RETURN
+ #undef ATOMIC_OP
+@@ -124,19 +128,23 @@ ENTRY(atomic64_fetch_##op) /* %o0 = increment, %o1 = atomic_ptr */ \
+ ENDPROC(atomic64_fetch_##op); \
+ EXPORT_SYMBOL(atomic64_fetch_##op);
+
+-#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_OP_RETURN(op) ATOMIC64_FETCH_OP(op)
++ATOMIC64_OP(add)
++ATOMIC64_OP_RETURN(add)
++ATOMIC64_FETCH_OP(add)
++
++ATOMIC64_OP(sub)
++ATOMIC64_OP_RETURN(sub)
++ATOMIC64_FETCH_OP(sub)
+
+-ATOMIC64_OPS(add)
+-ATOMIC64_OPS(sub)
++ATOMIC64_OP(and)
++ATOMIC64_FETCH_OP(and)
+
+-#undef ATOMIC64_OPS
+-#define ATOMIC64_OPS(op) ATOMIC64_OP(op) ATOMIC64_FETCH_OP(op)
++ATOMIC64_OP(or)
++ATOMIC64_FETCH_OP(or)
+
+-ATOMIC64_OPS(and)
+-ATOMIC64_OPS(or)
+-ATOMIC64_OPS(xor)
++ATOMIC64_OP(xor)
++ATOMIC64_FETCH_OP(xor)
+
+-#undef ATOMIC64_OPS
+ #undef ATOMIC64_FETCH_OP
+ #undef ATOMIC64_OP_RETURN
+ #undef ATOMIC64_OP
diff --git a/debian/patches/series b/debian/patches/series
index 87a2ea0..ad18163 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -117,9 +117,9 @@ debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
bugfix/all/binfmt_elf-use-elf_et_dyn_base-only-for-pie.patch
# Fix exported symbol versions
-bugfix/sparc/revert-sparc-move-exports-to-definitions.patch
-bugfix/m68k/revert-m68k-move-exports-to-definitions.patch
-bugfix/alpha/revert-alpha-move-exports-to-actual-definitions.patch
+bugfix/sparc/adding-asm-prototypes.h-for-genksyms-to-generate-crc.patch
+bugfix/sparc/sed-regex-in-makefile.build-requires-line-break-betw.patch
+bugfix/alpha/alpha-restore-symbol-versions-for-symbols-exported-f.patch
bugfix/all/module-disable-matching-missing-version-crc.patch
# ABI maintenance
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list