diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/ksyms.c | 1 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 33 |
2 files changed, 1 insertions, 33 deletions
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index ccc02a616c22..836fc9b94707 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -18,7 +18,6 @@ EXPORT_SYMBOL(get_signals); | |||
18 | EXPORT_SYMBOL(kernel_thread); | 18 | EXPORT_SYMBOL(kernel_thread); |
19 | EXPORT_SYMBOL(sys_waitpid); | 19 | EXPORT_SYMBOL(sys_waitpid); |
20 | EXPORT_SYMBOL(flush_tlb_range); | 20 | EXPORT_SYMBOL(flush_tlb_range); |
21 | EXPORT_SYMBOL(arch_validate); | ||
22 | 21 | ||
23 | EXPORT_SYMBOL(high_physmem); | 22 | EXPORT_SYMBOL(high_physmem); |
24 | EXPORT_SYMBOL(empty_zero_page); | 23 | EXPORT_SYMBOL(empty_zero_page); |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index b0ee64622ff7..e2274ef3155d 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -21,7 +21,7 @@ | |||
21 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ | 21 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ |
22 | unsigned long *empty_zero_page = NULL; | 22 | unsigned long *empty_zero_page = NULL; |
23 | /* allocated in paging_init and unchanged thereafter */ | 23 | /* allocated in paging_init and unchanged thereafter */ |
24 | unsigned long *empty_bad_page = NULL; | 24 | static unsigned long *empty_bad_page = NULL; |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Initialized during boot, and readonly for initializing page tables | 27 | * Initialized during boot, and readonly for initializing page tables |
@@ -240,37 +240,6 @@ void __init paging_init(void) | |||
240 | #endif | 240 | #endif |
241 | } | 241 | } |
242 | 242 | ||
243 | struct page *arch_validate(struct page *page, gfp_t mask, int order) | ||
244 | { | ||
245 | unsigned long addr, zero = 0; | ||
246 | int i; | ||
247 | |||
248 | again: | ||
249 | if (page == NULL) | ||
250 | return page; | ||
251 | if (PageHighMem(page)) | ||
252 | return page; | ||
253 | |||
254 | addr = (unsigned long) page_address(page); | ||
255 | for (i = 0; i < (1 << order); i++) { | ||
256 | current->thread.fault_addr = (void *) addr; | ||
257 | if (__do_copy_to_user((void __user *) addr, &zero, | ||
258 | sizeof(zero), | ||
259 | ¤t->thread.fault_addr, | ||
260 | ¤t->thread.fault_catcher)) { | ||
261 | if (!(mask & __GFP_WAIT)) | ||
262 | return NULL; | ||
263 | else break; | ||
264 | } | ||
265 | addr += PAGE_SIZE; | ||
266 | } | ||
267 | |||
268 | if (i == (1 << order)) | ||
269 | return page; | ||
270 | page = alloc_pages(mask, order); | ||
271 | goto again; | ||
272 | } | ||
273 | |||
274 | /* | 243 | /* |
275 | * This can't do anything because nothing in the kernel image can be freed | 244 | * This can't do anything because nothing in the kernel image can be freed |
276 | * since it's not in kernel physical memory. | 245 | * since it's not in kernel physical memory. |