The present pud_offset_k implementation runs the value read through
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 23 Jan 2006 15:27:00 +0000 (16:27 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 23 Jan 2006 15:27:00 +0000 (16:27 +0100)
the m2p translation process twice. With that removed, it can then
also be simplified.

Signed-off-by: Jan Beulich <JBeulich@novell.com>
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h

index 0e00baf30e1cd9149e3a96c710f1f45f1f1c2e2e..010044c62353bd1474e3a6f1680570cd57bc10b9 100644 (file)
@@ -417,12 +417,7 @@ static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address)
    Other CPUs get synced lazily via the page fault handler. */
 static inline pud_t *pud_offset_k(unsigned long address)
 {
-       unsigned long addr;
-
-       addr = pgd_val(init_level4_pgt[pud_index(address)]);
-       addr &= PHYSICAL_PAGE_MASK; /* machine physical */
-        addr = machine_to_phys(addr);
-       return __pud_offset_k((pud_t *)__va(addr), address);
+       return pud_offset(pgd_offset_k(address), address);
 }
 
 /* PMD  - Level 2 access */