[sparc64] Update "Revert "sparc: move exports to definitions"" again

This should really fix the FTBFS - at least, the build got as far as
building linux-image packages.

genksyms doesn't recognise __int128 as a type name, so fails to parse
the prototype for __multi3().  I could fix genksyms but would have to
regenerate the parser tables which would be a horrible patch to
maintan.  So use a struct type instead for now.  gcc doesn't seem to
care about this because it isn't a normal C function.

Also update the patch properly for 4.12 - I removed exports for some
symbols that were not really removed but renamed.
This commit is contained in:
Ben Hutchings 2017-07-18 22:50:53 +01:00
parent 33fb750f9d
commit aaafbb9091
2 changed files with 15 additions and 3 deletions

2
debian/changelog vendored
View File

@ -1,6 +1,8 @@
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)
-- Ben Hutchings <ben@decadent.org.uk> Tue, 18 Jul 2017 13:26:41 +0100

View File

@ -272,7 +272,7 @@ did what it says; add a prototype and export it from C code instead.
+EXPORT_SYMBOL(saved_command_line);
--- /dev/null
+++ b/arch/sparc/kernel/sparc_ksyms_64.c
@@ -0,0 +1,56 @@
@@ -0,0 +1,58 @@
+/* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
+ *
+ * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
@ -324,7 +324,9 @@ did what it says; add a prototype and export it from C code instead.
+EXPORT_SYMBOL(__ffs);
+
+/* from multi3.S */
+asmlinkage __int128 __multi3(__int128, __int128);
+/* 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 */
@ -650,6 +652,11 @@ did what it says; add a prototype and export it from C code instead.
#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 @@
@ -792,7 +799,7 @@ did what it says; add a prototype and export it from C code instead.
-EXPORT_SYMBOL(ip_fast_csum)
--- /dev/null
+++ b/arch/sparc/lib/ksyms.c
@@ -0,0 +1,170 @@
@@ -0,0 +1,173 @@
+/*
+ * Export of symbols defined in assembler
+ */
@ -887,6 +894,9 @@ did what it says; add a prototype and export it from C code instead.
+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. */