]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: uaccess: use asm EXPORT_SYMBOL()
authorMark Rutland <mark.rutland@arm.com>
Fri, 7 Dec 2018 18:08:20 +0000 (18:08 +0000)
committerWill Deacon <will.deacon@arm.com>
Mon, 10 Dec 2018 11:50:11 +0000 (11:50 +0000)
For a while now it's been possible to use EXPORT_SYMBOL() in assembly
files, which allows us to place exports immediately after assembly
functions, as we do for C functions.

As a step towards removing arm64ksyms.c, let's move the uaccess exports
to the assembly files the functions are defined in.  As we have to
include <asm/assembler.h>, the existing includes are fixed to follow the
usual ordering conventions.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/arm64ksyms.c
arch/arm64/lib/clear_user.S
arch/arm64/lib/copy_from_user.S
arch/arm64/lib/copy_in_user.S
arch/arm64/lib/copy_to_user.S

index 784b257d9643978ff8b20a66a8c60f08cfda241c..02019667e3194ecf820330a71e07d81b25de7bbb 100644 (file)
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
-#include <linux/uaccess.h>
 #include <linux/io.h>
 #include <linux/kprobes.h>
 
 #include <asm/checksum.h>
 
-       /* user mem (segment) */
-EXPORT_SYMBOL(__arch_copy_from_user);
-EXPORT_SYMBOL(__arch_copy_to_user);
-EXPORT_SYMBOL(__arch_clear_user);
-EXPORT_SYMBOL(__arch_copy_in_user);
-
        /* string / mem functions */
 #ifndef CONFIG_KASAN
 EXPORT_SYMBOL(strchr);
index 21ba0b29621b2fab087aa8adaeb15e0d589966ac..feb225bd4b80414f1cf97349a87272e28053b396 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/linkage.h>
 
 #include <asm/asm-uaccess.h>
+#include <asm/assembler.h>
 
        .text
 
@@ -53,6 +54,7 @@ uao_user_alternative 9f, strb, sttrb, wzr, x0, 0
        uaccess_disable_not_uao x2, x3
        ret
 ENDPROC(__arch_clear_user)
+EXPORT_SYMBOL(__arch_clear_user)
 
        .section .fixup,"ax"
        .align  2
index 20305d485046754c7c59c48ef28c77dfc54f2ca0..dea6c762d52fbecd54ec3dd9804b97434fc5f147 100644 (file)
@@ -16,8 +16,9 @@
 
 #include <linux/linkage.h>
 
-#include <asm/cache.h>
 #include <asm/asm-uaccess.h>
+#include <asm/assembler.h>
+#include <asm/cache.h>
 
 /*
  * Copy from user space to a kernel buffer (alignment handled by the hardware)
@@ -71,6 +72,7 @@ ENTRY(__arch_copy_from_user)
        mov     x0, #0                          // Nothing to copy
        ret
 ENDPROC(__arch_copy_from_user)
+EXPORT_SYMBOL(__arch_copy_from_user)
 
        .section .fixup,"ax"
        .align  2
index 54b75deb1d1606c2d5c317b35ee2f5bbc78144ba..a84227fbf71678f85569b2df838e7817b96d6d02 100644 (file)
@@ -18,8 +18,9 @@
 
 #include <linux/linkage.h>
 
-#include <asm/cache.h>
 #include <asm/asm-uaccess.h>
+#include <asm/assembler.h>
+#include <asm/cache.h>
 
 /*
  * Copy from user space to user space (alignment handled by the hardware)
@@ -73,6 +74,7 @@ ENTRY(__arch_copy_in_user)
        mov     x0, #0
        ret
 ENDPROC(__arch_copy_in_user)
+EXPORT_SYMBOL(__arch_copy_in_user)
 
        .section .fixup,"ax"
        .align  2
index fda6172d6b88819bcec2a69439fa202c57119f40..ef44c7ca3ffbef984d82703646b5b8e88f59fd9c 100644 (file)
@@ -16,8 +16,9 @@
 
 #include <linux/linkage.h>
 
-#include <asm/cache.h>
 #include <asm/asm-uaccess.h>
+#include <asm/assembler.h>
+#include <asm/cache.h>
 
 /*
  * Copy to user space from a kernel buffer (alignment handled by the hardware)
@@ -70,6 +71,7 @@ ENTRY(__arch_copy_to_user)
        mov     x0, #0
        ret
 ENDPROC(__arch_copy_to_user)
+EXPORT_SYMBOL(__arch_copy_to_user)
 
        .section .fixup,"ax"
        .align  2