Skip to contentSkip to conversation

ia64: export copy_page() to modules

PATCH In review [email protected] 2 participants 3 messages Nov 13, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: export copy_page() to modules

From: Andrew Morton <[email protected]>

With the unionfs patch applied I get

ERROR: "copy_page" [fs/unionfs/unionfs.ko] undefined!

the other architectures (some, at least) export copy_page() so I guess ia64 should also do so.

To do this we need to move the copy_page() functions out of lib.a and into built-in.a, and create a silly little C file to add the EXPORT_SYMBOL().

Maybe there are better ways...

Cc Sam Ravnborg <[email protected]>
Cc "Luck, Tony" <[email protected]>

---

 arch/ia64/lib/Makefile           |    6 +++---
 arch/ia64/lib/copy_page-export.c |    4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)
arch/ia64/lib/copy_page-export.c new file +4 -0
diff -puN /dev/null arch/ia64/lib/copy_page-export.c
@@ -0,0 +1,4 @@
+#include <asm/page.h>
+#include <linux/module.h>
+
+EXPORT_SYMBOL(copy_page);
arch/ia64/lib/Makefile renamed from arch/ia64/lib/Makefile~ia64-export-copy_page-to-modules +3 -3
diff -puN arch/ia64/lib/Makefile~ia64-export-copy_page-to-modules arch/ia64/lib/Makefile
@@ -2,7 +2,7 @@
 # Makefile for ia64-specific library routines..
 #
 
-obj-y := io.o
+obj-y := io.o copy_page-export.o
 
 lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o			\
 	__divdi3.o __udivdi3.o __moddi3.o __umoddi3.o			\
@@ -11,8 +11,8 @@ lib-y := __divsi3.o __udivsi3.o __modsi3
 	flush.o ip_fast_csum.o do_csum.o				\
 	memset.o strlen.o xor.o
 
-lib-$(CONFIG_ITANIUM)	+= copy_page.o copy_user.o memcpy.o
-lib-$(CONFIG_MCKINLEY)	+= copy_page_mck.o memcpy_mck.o
+obj-$(CONFIG_ITANIUM)	+= copy_page.o copy_user.o memcpy.o
+obj-$(CONFIG_MCKINLEY)	+= copy_page_mck.o memcpy_mck.o
 lib-$(CONFIG_PERFMON)	+= carta_random.o
 
 AFLAGS___divdi3.o	_
#1 lore raw
Quoted 3 lines · On Tue, Nov 13, 2007 at 01:22:51AM -0800, [email protected] wrote:

To do this we need to move the copy_page() functions out of lib.a and into built-in.a, and create a silly little C file to add the EXPORT_SYMBOL().

The usual thing to do for an export for an assembly file is to put it into $arch_ksyms.c

Cheers,
Kyle

Quoted 5 lines

Maybe there are better ways...

Cc Sam Ravnborg <[email protected]>
Cc "Luck, Tony" <[email protected]>
#2 lore raw
In reply to [email protected]
Quoted 8 lines · On Tue, 13 Nov 2007 10:20:49 -0500 Kyle McMartin <[email protected]> wrote:
Quoted 3 lines · On Tue, Nov 13, 2007 at 01:22:51AM -0800, [email protected] wrote:

To do this we need to move the copy_page() functions out of lib.a and into built-in.a, and create a silly little C file to add the EXPORT_SYMBOL().

The usual thing to do for an export for an assembly file is to put it into $arch_ksyms.c

Yes. I was a bit worried what would happen if CONFIG_ITANIUM=n and CONFIG_MCKINLEY=n, but I guess that isn't a valid combination.

arch/ia64/kernel/ia64_ksyms.c renamed from arch/ia64/kernel/ia64_ksyms.c~ia64-export-copy_page-to-modules-fix +3 -0
diff -puN arch/ia64/kernel/ia64_ksyms.c~ia64-export-copy_page-to-modules-fix arch/ia64/kernel/ia64_ksyms.c
@@ -63,6 +63,9 @@ EXPORT_SYMBOL(__udivdi3);
 EXPORT_SYMBOL(__moddi3);
 EXPORT_SYMBOL(__umoddi3);
 
+#include <asm/page.h>
+EXPORT_SYMBOL(copy_page);
+
 #if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE)
 extern void xor_ia64_2(void);
 extern void xor_ia64_3(void);
arch/ia64/lib/copy_page-export.c deleted +0 -4
diff -puN arch/ia64/lib/copy_page-export.c~ia64-export-copy_page-to-modules-fix /dev/null
@@ -1,4 +0,0 @@
-#include <asm/page.h>
-#include <linux/module.h>
-
-EXPORT_SYMBOL(copy_page);

_