Messages in this thread Patch in this message | | | From | Al Viro <> | Subject | [POC][PATCH 43/83] arm64 vdso: get rid of pointless casts | Date | Mon, 21 Dec 2015 23:47:16 +0000 |
| |
From: Al Viro <viro@zeniv.linux.org.uk>
... with two added to cope with flush_icache_range() calling conventions
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> --- arch/arm64/kernel/vdso.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 07e4d14..f49e158 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -62,22 +62,21 @@ static int alloc_vectors_page(void) int kuser_sz = __kuser_helper_end - __kuser_helper_start; int sigret_sz = __aarch32_sigret_code_end - __aarch32_sigret_code_start; - unsigned long vpage; - - vpage = (unsigned long)get_zeroed_page(GFP_ATOMIC); + void *vpage = get_zeroed_page(GFP_ATOMIC); if (!vpage) return -ENOMEM; /* kuser helpers */ - memcpy((void *)vpage + 0x1000 - kuser_sz, __kuser_helper_start, + memcpy(vpage + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz); /* sigreturn code */ - memcpy((void *)vpage + AARCH32_KERN_SIGRET_CODE_OFFSET, + memcpy(vpage + AARCH32_KERN_SIGRET_CODE_OFFSET, __aarch32_sigret_code_start, sigret_sz); - flush_icache_range(vpage, vpage + PAGE_SIZE); + flush_icache_range((unsigned long)vpage, + (unsigned long)vpage + PAGE_SIZE); vectors_page[0] = virt_to_page(vpage); return 0; -- 2.1.4
| |