Skip to contentSkip to conversation

sh: add copy_user_page() alias for __copy_user()

PATCH In review Ross Zwisler 2 participants 3 messages Sep 22, 2015 – Oct 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: add copy_user_page() alias for __copy_user()

copy_user_page() is needed by DAX. Without this we get a compile error for DAX on SH:

fs/dax.c:280:2: error: implicit declaration of function ‘copy_user_page’ [-Werror=implicit-function-declaration]

  copy_user_page(vto, (void __force *)vfrom, vaddr, to);
    ^

This was done with a random config that happened to include DAX support.

This patch has only been compile tested.

---
Apologies for the resend, I wanted to add some more recipients.

---
 arch/sh/include/asm/page.h | 1 +
 1 file changed, 1 insertion(+)
arch/sh/include/asm/page.h +1 -0
index fe20d14..ceb5201 100644
@@ -59,6 +59,7 @@ pages_do_alias(unsigned long addr1, unsigned long addr2)
 
 #define clear_page(page)	memset((void *)(page), 0, PAGE_SIZE)
 extern void copy_page(void *to, void *from);
+#define copy_user_page(to, from, vaddr, pg)  __copy_user(to, from, PAGE_SIZE)
 
 struct page;
 struct vm_area_struct;
Signature · 1 line
2.1.0
#1 lore raw
Quoted 25 lines · Ross Zwisler

copy_user_page() is needed by DAX. Without this we get a compile error for DAX on SH:

fs/dax.c:280:2: error: implicit declaration of function ‘copy_user_page’ [-Werror=implicit-function-declaration]

  copy_user_page(vto, (void __force *)vfrom, vaddr, to);
    ^

This was done with a random config that happened to include DAX support.

This patch has only been compile tested.

---
Apologies for the resend, I wanted to add some more recipients.

---
 arch/sh/include/asm/page.h | 1 +
 1 file changed, 1 insertion(+)
arch/sh/include/asm/page.h +0 -0
index fe20d14..ceb5201 100644

arch/sh/include/asm/page.h pages_do_alias(unsigned long addr1, unsigned long addr2) · line 65

Quoted 7 lines
arch/sh/include/asm/page.h +1 -0
@@ -59,6 +59,7 @@ pages_do_alias(unsigned long addr1, unsigned long addr2)
 
 #define clear_page(page)	memset((void *)(page), 0, PAGE_SIZE)
 extern void copy_page(void *to, void *from);
+#define copy_user_page(to, from, vaddr, pg)  __copy_user(to, from, PAGE_SIZE)
 
 struct page;
 struct vm_area_struct;

Ping?

#2 lore raw
Quoted 27 lines · Ross Zwisler
Quoted 26 lines · Ross Zwisler

copy_user_page() is needed by DAX. Without this we get a compile error for DAX on SH:

fs/dax.c:280:2: error: implicit declaration of function ‘copy_user_page’ [-Werror=implicit-function-declaration]

  copy_user_page(vto, (void __force *)vfrom, vaddr, to);
    ^

This was done with a random config that happened to include DAX support.

This patch has only been compile tested.

---
Apologies for the resend, I wanted to add some more recipients.

---
 arch/sh/include/asm/page.h | 1 +
 1 file changed, 1 insertion(+)
arch/sh/include/asm/page.h +0 -0
index fe20d14..ceb5201 100644
@@ -59,6 +59,7 @@ pages_do_alias(unsigned long addr1, unsigned long addr2)
 
Quoted 8 lines

arch/sh/include/asm/page.h pages_do_alias(unsigned long addr1, unsigned long addr2) · line 65

Quoted 6 lines
arch/sh/include/asm/page.h +1 -0
 #define clear_page(page)	memset((void *)(page), 0, PAGE_SIZE)
 extern void copy_page(void *to, void *from);
+#define copy_user_page(to, from, vaddr, pg)  __copy_user(to, from, PAGE_SIZE)
 
 struct page;
 struct vm_area_struct;

Ping?

Your best bet is probably to Cc Andrew (now Cc'd).

Andrew, original patch is here,

https://lkml.kernel.org/r/[email protected]

Signature · 1 line
Matt Fleming, Intel Open Source Technology Center