Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105374
b: refs/heads/master
c: 4a56758
h: refs/heads/master
v: v3
  • Loading branch information
WANG Cong authored and Linus Torvalds committed Jul 24, 2008
1 parent 6c12de8 commit 4dcebe2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c182ae7810f3fe444e666f3f78c209a7c116fdf
refs/heads/master: 4a5675820436e4ad738dd442c1cc8a165101509b
1 change: 0 additions & 1 deletion trunk/arch/um/kernel/ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
33 changes: 1 addition & 32 deletions trunk/arch/um/kernel/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/asm-um/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 4dcebe2

Please sign in to comment.