diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/string.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 2 | ||||
-rw-r--r-- | arch/arm/lib/memset.S | 2 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/pgd.c | 2 |
8 files changed, 8 insertions, 15 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 65ce8fff29db..3fc08413fff0 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -86,6 +86,8 @@ static void putstr(const char *ptr) | |||
86 | 86 | ||
87 | #define __ptr_t void * | 87 | #define __ptr_t void * |
88 | 88 | ||
89 | #define memzero(s,n) __memzero(s,n) | ||
90 | |||
89 | /* | 91 | /* |
90 | * Optimised C version of memzero for the ARM. | 92 | * Optimised C version of memzero for the ARM. |
91 | */ | 93 | */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index bed1c0a00368..5fee45e23038 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -133,7 +133,7 @@ extern void __cpu_copy_user_page(void *to, const void *from, | |||
133 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) | 133 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) |
134 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) | 134 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) |
135 | 135 | ||
136 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 136 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
137 | extern void copy_page(void *to, const void *from); | 137 | extern void copy_page(void *to, const void *from); |
138 | 138 | ||
139 | #undef STRICT_MM_TYPECHECKS | 139 | #undef STRICT_MM_TYPECHECKS |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 517a4d6ffc74..2320508443a5 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -64,7 +64,7 @@ struct thread_struct { | |||
64 | ({ \ | 64 | ({ \ |
65 | unsigned long *stack = (unsigned long *)sp; \ | 65 | unsigned long *stack = (unsigned long *)sp; \ |
66 | set_fs(USER_DS); \ | 66 | set_fs(USER_DS); \ |
67 | memzero(regs->uregs, sizeof(regs->uregs)); \ | 67 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
68 | if (current->personality & ADDR_LIMIT_32BIT) \ | 68 | if (current->personality & ADDR_LIMIT_32BIT) \ |
69 | regs->ARM_cpsr = USR_MODE; \ | 69 | regs->ARM_cpsr = USR_MODE; \ |
70 | else \ | 70 | else \ |
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index e50c4a39b699..cf4f3aad0fc1 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h | |||
@@ -21,7 +21,6 @@ extern void * memmove(void *, const void *, __kernel_size_t); | |||
21 | #define __HAVE_ARCH_MEMCHR | 21 | #define __HAVE_ARCH_MEMCHR |
22 | extern void * memchr(const void *, int, __kernel_size_t); | 22 | extern void * memchr(const void *, int, __kernel_size_t); |
23 | 23 | ||
24 | #define __HAVE_ARCH_MEMZERO | ||
25 | #define __HAVE_ARCH_MEMSET | 24 | #define __HAVE_ARCH_MEMSET |
26 | extern void * memset(void *, int, __kernel_size_t); | 25 | extern void * memset(void *, int, __kernel_size_t); |
27 | 26 | ||
@@ -39,12 +38,4 @@ extern void __memzero(void *ptr, __kernel_size_t n); | |||
39 | (__p); \ | 38 | (__p); \ |
40 | }) | 39 | }) |
41 | 40 | ||
42 | #define memzero(p,n) \ | ||
43 | ({ \ | ||
44 | void *__p = (p); size_t __n = n; \ | ||
45 | if ((__n) != 0) \ | ||
46 | __memzero((__p),(__n)); \ | ||
47 | (__p); \ | ||
48 | }) | ||
49 | |||
50 | #endif | 41 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index e98ec60b3400..cbb7a37e2978 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -400,7 +400,7 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u | |||
400 | if (access_ok(VERIFY_READ, from, n)) | 400 | if (access_ok(VERIFY_READ, from, n)) |
401 | n = __copy_from_user(to, from, n); | 401 | n = __copy_from_user(to, from, n); |
402 | else /* security hole - plug it */ | 402 | else /* security hole - plug it */ |
403 | memzero(to, n); | 403 | memset(to, 0, n); |
404 | return n; | 404 | return n; |
405 | } | 405 | } |
406 | 406 | ||
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 761eefa76243..650d5923ab83 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S | |||
@@ -25,7 +25,7 @@ | |||
25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) | 25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) |
26 | /* | 26 | /* |
27 | * The pointer is now aligned and the length is adjusted. Try doing the | 27 | * The pointer is now aligned and the length is adjusted. Try doing the |
28 | * memzero again. | 28 | * memset again. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | ENTRY(memset) | 31 | ENTRY(memset) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 7f36c825718d..f24803c1fb0b 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -896,7 +896,7 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
896 | * allocate the zero page. Note that we count on this going ok. | 896 | * allocate the zero page. Note that we count on this going ok. |
897 | */ | 897 | */ |
898 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); | 898 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); |
899 | memzero(zero_page, PAGE_SIZE); | 899 | memset(zero_page, 0, PAGE_SIZE); |
900 | empty_zero_page = virt_to_page(zero_page); | 900 | empty_zero_page = virt_to_page(zero_page); |
901 | flush_dcache_page(empty_zero_page); | 901 | flush_dcache_page(empty_zero_page); |
902 | } | 902 | } |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index e0f19ab91163..2690146161ba 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -31,7 +31,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
31 | if (!new_pgd) | 31 | if (!new_pgd) |
32 | goto no_pgd; | 32 | goto no_pgd; |
33 | 33 | ||
34 | memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); | 34 | memset(new_pgd, 0, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Copy over the kernel and IO PGD entries | 37 | * Copy over the kernel and IO PGD entries |