Skip to content

Commit

Permalink
i386/PAE: fix pud_page()
Browse files Browse the repository at this point in the history
Impact: cleanup

To the unsuspecting user it is quite annoying that this broken and
inconsistent with x86-64 definition still exists.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Oct 30, 2008
1 parent fe8b868 commit ab00fee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/pgtable-3level.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ static inline void pud_clear(pud_t *pudp)
write_cr3(pgd);
}

#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)

#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))


/* Find an entry in the second-level page table.. */
#define pmd_offset(pud, address) ((pmd_t *)pud_page(*(pud)) + \
#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \
pmd_index(address))

#ifdef CONFIG_SMP
Expand Down

0 comments on commit ab00fee

Please sign in to comment.