arch/um/kernel/mem.c: remove arch_validate()
authorWANG Cong <xiyou.wangcong@gmail.com>
Thu, 24 Jul 2008 04:28:49 +0000 (21:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:24 +0000 (10:47 -0700)
- Remove arch_validate(), because no one uses it.

- Remove useless macro HAVE_ARCH_VALIDATE.

- Make the variable 'empty_bad_page' static.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
include/asm-um/page.h

index ccc02a616c22d071d8bb9a0bae0331aa4b002e80..836fc9b9470717dcbe81bc8cabe0e1261892dd7b 100644 (file)
@@ -18,7 +18,6 @@ EXPORT_SYMBOL(get_signals);
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(sys_waitpid);
 EXPORT_SYMBOL(flush_tlb_range);
-EXPORT_SYMBOL(arch_validate);
 
 EXPORT_SYMBOL(high_physmem);
 EXPORT_SYMBOL(empty_zero_page);
index b0ee64622ff70a91bc3a44d52965b402dfaa81c1..e2274ef3155d4b8f320fe11854876e39cc543e10 100644 (file)
@@ -21,7 +21,7 @@
 /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
 unsigned long *empty_zero_page = NULL;
 /* allocated in paging_init and unchanged thereafter */
-unsigned long *empty_bad_page = NULL;
+static unsigned long *empty_bad_page = NULL;
 
 /*
  * Initialized during boot, and readonly for initializing page tables
@@ -240,37 +240,6 @@ void __init paging_init(void)
 #endif
 }
 
-struct page *arch_validate(struct page *page, gfp_t mask, int order)
-{
-       unsigned long addr, zero = 0;
-       int i;
-
- again:
-       if (page == NULL)
-               return page;
-       if (PageHighMem(page))
-               return page;
-
-       addr = (unsigned long) page_address(page);
-       for (i = 0; i < (1 << order); i++) {
-               current->thread.fault_addr = (void *) addr;
-               if (__do_copy_to_user((void __user *) addr, &zero,
-                                    sizeof(zero),
-                                    &current->thread.fault_addr,
-                                    &current->thread.fault_catcher)) {
-                       if (!(mask & __GFP_WAIT))
-                               return NULL;
-                       else break;
-               }
-               addr += PAGE_SIZE;
-       }
-
-       if (i == (1 << order))
-               return page;
-       page = alloc_pages(mask, order);
-       goto again;
-}
-
 /*
  * This can't do anything because nothing in the kernel image can be freed
  * since it's not in kernel physical memory.
index 335c57383c021d65cd0d5459dc4ffa64a8fcfd21..a6df1f13d732ddaf7d487fdcb5eabf20a14f6c93 100644 (file)
@@ -115,9 +115,6 @@ extern unsigned long uml_physmem;
 #define pfn_valid(pfn) ((pfn) < max_mapnr)
 #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v)))
 
-extern struct page *arch_validate(struct page *page, gfp_t mask, int order);
-#define HAVE_ARCH_VALIDATE
-
 #include <asm-generic/memory_model.h>
 #include <asm-generic/page.h>