diff options
Diffstat (limited to 'arch/arm/include/asm/page.h')
-rw-r--r-- | arch/arm/include/asm/page.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index bed1c0a00368..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -108,32 +108,38 @@ | |||
108 | #error Unknown user operations model | 108 | #error Unknown user operations model |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct page; | ||
112 | |||
111 | struct cpu_user_fns { | 113 | struct cpu_user_fns { |
112 | void (*cpu_clear_user_page)(void *p, unsigned long user); | 114 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); |
113 | void (*cpu_copy_user_page)(void *to, const void *from, | 115 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, |
114 | unsigned long user); | 116 | unsigned long vaddr); |
115 | }; | 117 | }; |
116 | 118 | ||
117 | #ifdef MULTI_USER | 119 | #ifdef MULTI_USER |
118 | extern struct cpu_user_fns cpu_user; | 120 | extern struct cpu_user_fns cpu_user; |
119 | 121 | ||
120 | #define __cpu_clear_user_page cpu_user.cpu_clear_user_page | 122 | #define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage |
121 | #define __cpu_copy_user_page cpu_user.cpu_copy_user_page | 123 | #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage |
122 | 124 | ||
123 | #else | 125 | #else |
124 | 126 | ||
125 | #define __cpu_clear_user_page __glue(_USER,_clear_user_page) | 127 | #define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage) |
126 | #define __cpu_copy_user_page __glue(_USER,_copy_user_page) | 128 | #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage) |
127 | 129 | ||
128 | extern void __cpu_clear_user_page(void *p, unsigned long user); | 130 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); |
129 | extern void __cpu_copy_user_page(void *to, const void *from, | 131 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, |
130 | unsigned long user); | 132 | unsigned long vaddr); |
131 | #endif | 133 | #endif |
132 | 134 | ||
133 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) | 135 | #define clear_user_highpage(page,vaddr) \ |
134 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) | 136 | __cpu_clear_user_highpage(page, vaddr) |
137 | |||
138 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | ||
139 | #define copy_user_highpage(to,from,vaddr,vma) \ | ||
140 | __cpu_copy_user_highpage(to, from, vaddr) | ||
135 | 141 | ||
136 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
137 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
138 | 144 | ||
139 | #undef STRICT_MM_TYPECHECKS | 145 | #undef STRICT_MM_TYPECHECKS |