MIPS: Export {copy, clear}_page functions alongside their definitions
authorPaul Burton <paul.burton@imgtec.com>
Mon, 7 Nov 2016 11:14:16 +0000 (11:14 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:48:39 +0000 (16:48 +0100)
Now that EXPORT_SYMBOL can be used from assembly source, move the
EXPORT_SYMBOL invocations for the copy_page & clear_page functions to be
alongside their definitions.

With this change there are no longer any symbols exported from
mips_ksyms.c so remove the file.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14515/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/Makefile
arch/mips/kernel/mips_ksyms.c [deleted file]
arch/mips/mm/page-funcs.S
arch/mips/mm/page.c

index 904a9c48553a62335be906cc0fc61716fa06f6fd..9a0e37b92ce0743c7fe9c3cb29b5a0b1d8ec73d6 100644 (file)
@@ -30,7 +30,7 @@ obj-$(CONFIG_SYNC_R4K)                += sync-r4k.o
 
 obj-$(CONFIG_DEBUG_FS)         += segment.o
 obj-$(CONFIG_STACKTRACE)       += stacktrace.o
-obj-$(CONFIG_MODULES)          += mips_ksyms.o module.o
+obj-$(CONFIG_MODULES)          += module.o
 obj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o
 
 obj-$(CONFIG_FTRACE_SYSCALLS)  += ftrace.o
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
deleted file mode 100644 (file)
index f01838f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Export MIPS-specific functions needed for loadable modules.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 97, 98, 99, 2000, 01, 03, 04, 05, 12 by Ralf Baechle
- * Copyright (C) 1999, 2000, 01 Silicon Graphics, Inc.
- */
-#include <linux/interrupt.h>
-#include <linux/export.h>
-#include <asm/checksum.h>
-#include <linux/mm.h>
-#include <linux/uaccess.h>
-#include <asm/ftrace.h>
-#include <asm/fpu.h>
-#include <asm/msa.h>
-
-/*
- * Functions that operate on entire pages.  Mostly used by memory management.
- */
-EXPORT_SYMBOL(clear_page);
-EXPORT_SYMBOL(copy_page);
index 48a6b38ff13e0a6e5cd7523d431f31b07c9e55d7..43181ac0a1afc6ccf4e7e2d972979da7fce79a0e 100644 (file)
@@ -9,6 +9,7 @@
  * Copyright (C) 2012  Ralf Baechle <ralf@linux-mips.org>
  */
 #include <asm/asm.h>
+#include <asm/export.h>
 #include <asm/regdef.h>
 
 #ifdef CONFIG_SIBYTE_DMA_PAGEOPS
@@ -29,6 +30,7 @@
  */
 EXPORT(__clear_page_start)
 LEAF(cpu_clear_page_function_name)
+EXPORT_SYMBOL(cpu_clear_page_function_name)
 1:     j       1b              /* Dummy, will be replaced. */
        .space 288
 END(cpu_clear_page_function_name)
@@ -44,6 +46,7 @@ EXPORT(__clear_page_end)
  */
 EXPORT(__copy_page_start)
 LEAF(cpu_copy_page_function_name)
+EXPORT_SYMBOL(cpu_copy_page_function_name)
 1:     j       1b              /* Dummy, will be replaced. */
        .space 1344
 END(cpu_copy_page_function_name)
index 6f804f5960abeff77cdbcd2cecf48a1acf989e7c..d5d02993aa21ba99bdd66e2212e9484ed8d8892b 100644 (file)
@@ -661,6 +661,7 @@ void clear_page(void *page)
                ;
        __raw_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 }
+EXPORT_SYMBOL(clear_page);
 
 void copy_page(void *to, void *from)
 {
@@ -687,5 +688,6 @@ void copy_page(void *to, void *from)
                ;
        __raw_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 }
+EXPORT_SYMBOL(copy_page);
 
 #endif /* CONFIG_SIBYTE_DMA_PAGEOPS */