@@ -30,9 +30,6 @@
#include <asm/checksum.h>
-EXPORT_SYMBOL(copy_page);
-EXPORT_SYMBOL(clear_page);
-
/* user mem (segment) */
EXPORT_SYMBOL(__arch_copy_from_user);
EXPORT_SYMBOL(__arch_copy_to_user);
@@ -14,9 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <linux/linkage.h>
#include <linux/const.h>
+#include <linux/linkage.h>
+
#include <asm/assembler.h>
+#include <asm/export.h>
#include <asm/page.h>
/*
@@ -37,3 +39,4 @@ ENTRY(clear_page)
b.ne 1b
ret
ENDPROC(clear_page)
+EXPORT_SYMBOL(clear_page)
@@ -14,12 +14,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <linux/linkage.h>
#include <linux/const.h>
+#include <linux/linkage.h>
+
+#include <asm/alternative.h>
#include <asm/assembler.h>
-#include <asm/page.h>
+#include <asm/export.h>
#include <asm/cpufeature.h>
-#include <asm/alternative.h>
+#include <asm/page.h>
/*
* Copy a page from src to dest (both are page aligned)
@@ -87,3 +89,4 @@ alternative_else_nop_endif
ret
ENDPROC(copy_page)
+EXPORT_SYMBOL(copy_page)
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 copy_page and clear_page exports to the assembly files the functions are defined in. As we have to include <asm/export.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> --- arch/arm64/kernel/arm64ksyms.c | 3 --- arch/arm64/lib/clear_page.S | 5 ++++- arch/arm64/lib/copy_page.S | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-)