From 42663ef3cf5dbd78864809d60a6985ba4ce58796 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 1 Dec 2016 23:14:09 +0000 Subject: [PATCH] Revert "m68k: move exports to definitions" This reverts commit d13ffb5630443e6112df0263969cbdfc8ab9ab57 because symbols exported from assembly don't automatically get modversions (ABI hashes). Gbp-Pq: Topic bugfix/m68k Gbp-Pq: Name revert-m68k-move-exports-to-definitions.patch --- 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, 39 insertions(+), 32 deletions(-) delete mode 100644 arch/m68k/include/asm/export.h create mode 100644 arch/m68k/kernel/m68k_ksyms.c diff --git a/arch/m68k/include/asm/export.h b/arch/m68k/include/asm/export.h deleted file mode 100644 index 0af20f48bd07..000000000000 --- a/arch/m68k/include/asm/export.h +++ /dev/null @@ -1,3 +0,0 @@ -#define KSYM_ALIGN 2 -#define KCRC_ALIGN 2 -#include diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 74c898ced8cc..8a1c4d3f91c8 100644 --- 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 diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c new file mode 100644 index 000000000000..774c1bd59c36 --- /dev/null +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -0,0 +1,32 @@ +#include + +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 diff --git a/arch/m68k/lib/ashldi3.c b/arch/m68k/lib/ashldi3.c index 8dffd36ec4f2..37234c2df47f 100644 --- a/arch/m68k/lib/ashldi3.c +++ b/arch/m68k/lib/ashldi3.c @@ -13,9 +13,6 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#include -#include - #define BITS_PER_UNIT 8 typedef int SItype __attribute__ ((mode (SI))); @@ -58,4 +55,3 @@ __ashldi3 (DItype u, word_type b) return w.ll; } -EXPORT_SYMBOL(__ashldi3); diff --git a/arch/m68k/lib/ashrdi3.c b/arch/m68k/lib/ashrdi3.c index e6565a3ee2c3..1d59345f36c6 100644 --- a/arch/m68k/lib/ashrdi3.c +++ b/arch/m68k/lib/ashrdi3.c @@ -13,9 +13,6 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#include -#include - #define BITS_PER_UNIT 8 typedef int SItype __attribute__ ((mode (SI))); @@ -59,4 +56,3 @@ __ashrdi3 (DItype u, word_type b) return w.ll; } -EXPORT_SYMBOL(__ashrdi3); diff --git a/arch/m68k/lib/divsi3.S b/arch/m68k/lib/divsi3.S index 3a2143f51631..2c0ec85ac661 100644 --- 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@cygnus.com) Fete Bastille, 1992 */ -#include - /* These are predefined by new versions of GNU cpp. */ #ifndef __USER_LABEL_PREFIX__ @@ -120,4 +118,3 @@ L2: movel d1, sp@- L3: movel sp@+, d2 rts - EXPORT_SYMBOL(__divsi3) diff --git a/arch/m68k/lib/lshrdi3.c b/arch/m68k/lib/lshrdi3.c index 039779737c7d..49e1ec8f2cc2 100644 --- a/arch/m68k/lib/lshrdi3.c +++ b/arch/m68k/lib/lshrdi3.c @@ -13,9 +13,6 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#include -#include - #define BITS_PER_UNIT 8 typedef int SItype __attribute__ ((mode (SI))); @@ -58,4 +55,3 @@ __lshrdi3 (DItype u, word_type b) return w.ll; } -EXPORT_SYMBOL(__lshrdi3); diff --git a/arch/m68k/lib/modsi3.S b/arch/m68k/lib/modsi3.S index 1c967649a4e0..1d9e0efdf31d 100644 --- 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@cygnus.com) Fete Bastille, 1992 */ -#include - /* 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) diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c index 6459af5b2af0..9006d15b8721 100644 --- a/arch/m68k/lib/muldi3.c +++ b/arch/m68k/lib/muldi3.c @@ -14,9 +14,6 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ -#include -#include - #ifdef CONFIG_CPU_HAS_NO_MULDIV64 #define SI_TYPE_SIZE 32 @@ -93,4 +90,3 @@ __muldi3 (DItype u, DItype v) return w.ll; } -EXPORT_SYMBOL(__muldi3); diff --git a/arch/m68k/lib/mulsi3.S b/arch/m68k/lib/mulsi3.S index 855675e69a8a..c39ad4e738e9 100644 --- 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@cygnus.com) Fete Bastille, 1992 */ -#include + /* 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) + diff --git a/arch/m68k/lib/udivsi3.S b/arch/m68k/lib/udivsi3.S index 78440ae513bf..35a5446572a5 100644 --- 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@cygnus.com) Fete Bastille, 1992 */ -#include + /* 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) + diff --git a/arch/m68k/lib/umodsi3.S b/arch/m68k/lib/umodsi3.S index b6fd11f58948..099da514a8fd 100644 --- 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@cygnus.com) Fete Bastille, 1992 */ -#include + /* 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) + -- 2.30.2