diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:43 -0500 |
commit | f0646e43acb18f0e00b00085dc88bc3f403e7930 (patch) | |
tree | c47968a44ac541854929f03d22cf2fb76d76cb55 /arch/x86/xen | |
parent | a5a5dc31794c3271c066835ad2c90c58a3805569 (diff) |
x86: return the page table level in lookup_address()
based on this patch from Andi Kleen:
| Subject: CPA: Return the page table level in lookup_address()
| From: Andi Kleen <ak@suse.de>
|
| Needed for the next change.
|
| And change all the callers.
and ported it to x86.git.
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/mmu.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index e6184735545f..45aa771e73a9 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -58,7 +58,8 @@ | |||
58 | 58 | ||
59 | xmaddr_t arbitrary_virt_to_machine(unsigned long address) | 59 | xmaddr_t arbitrary_virt_to_machine(unsigned long address) |
60 | { | 60 | { |
61 | pte_t *pte = lookup_address(address); | 61 | int level; |
62 | pte_t *pte = lookup_address(address, &level); | ||
62 | unsigned offset = address & PAGE_MASK; | 63 | unsigned offset = address & PAGE_MASK; |
63 | 64 | ||
64 | BUG_ON(pte == NULL); | 65 | BUG_ON(pte == NULL); |
@@ -70,8 +71,9 @@ void make_lowmem_page_readonly(void *vaddr) | |||
70 | { | 71 | { |
71 | pte_t *pte, ptev; | 72 | pte_t *pte, ptev; |
72 | unsigned long address = (unsigned long)vaddr; | 73 | unsigned long address = (unsigned long)vaddr; |
74 | int level; | ||
73 | 75 | ||
74 | pte = lookup_address(address); | 76 | pte = lookup_address(address, &level); |
75 | BUG_ON(pte == NULL); | 77 | BUG_ON(pte == NULL); |
76 | 78 | ||
77 | ptev = pte_wrprotect(*pte); | 79 | ptev = pte_wrprotect(*pte); |
@@ -84,8 +86,9 @@ void make_lowmem_page_readwrite(void *vaddr) | |||
84 | { | 86 | { |
85 | pte_t *pte, ptev; | 87 | pte_t *pte, ptev; |
86 | unsigned long address = (unsigned long)vaddr; | 88 | unsigned long address = (unsigned long)vaddr; |
89 | int level; | ||
87 | 90 | ||
88 | pte = lookup_address(address); | 91 | pte = lookup_address(address, &level); |
89 | BUG_ON(pte == NULL); | 92 | BUG_ON(pte == NULL); |
90 | 93 | ||
91 | ptev = pte_mkwrite(*pte); | 94 | ptev = pte_mkwrite(*pte); |