summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <florian.schmaus@codasip.com>2026-01-25 21:09:52 -0700
committerPaul Walmsley <pjw@kernel.org>2026-01-25 21:09:52 -0700
commit9f77b4c5c38c5734c45fe6223d57e48715dbffb8 (patch)
tree1967d5ace4a025673e81d662c3ad680934fa1f0d
parent28a12ef366ecb118db19b92120a07b0491c1958e (diff)
downloadlinux-next-9f77b4c5c38c5734c45fe6223d57e48715dbffb8.tar.gz
linux-next-9f77b4c5c38c5734c45fe6223d57e48715dbffb8.zip
riscv: mm: define copy_user_page() as copy_page()
Currently, the implementation of copy_user_page() is identical to copy_page(). Align riscv with other architectures (alpha, arc, arm64, hexagon, longarch, m68k, openrisc, s390, um, xtensa) and map copy_user_page() to copy_page() given that their implementation is identical. In addition to following a common pattern, this centralizes the implementation. Any changes to the underlying page copy logic (e.g., for CHERI) will now automatically propagate to copy_user_page(). Signed-off-by: Florian Schmaus <florian.schmaus@codasip.com> Link: https://patch.msgid.link/20260113134025.905627-1-florian.schmaus@codasip.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
-rw-r--r--arch/riscv/include/asm/page.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
index ffe213ad65a4..3c517bc9eac5 100644
--- a/arch/riscv/include/asm/page.h
+++ b/arch/riscv/include/asm/page.h
@@ -51,8 +51,7 @@ void clear_page(void *page);
#define copy_page(to, from) memcpy((to), (from), PAGE_SIZE)
#define clear_user_page(pgaddr, vaddr, page) clear_page(pgaddr)
-#define copy_user_page(vto, vfrom, vaddr, topg) \
- memcpy((vto), (vfrom), PAGE_SIZE)
+#define copy_user_page(vto, vfrom, vaddr, topg) copy_page(vto, vfrom)
/*
* Use struct definitions to apply C type checking