[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <49099C71.76E4.0078.0@novell.com>
Date: Thu, 30 Oct 2008 10:37:21 +0000
From: "Jan Beulich" <jbeulich@...ell.com>
To: <mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc: <linux-kernel@...r.kernel.org>
Subject: [PATCH] i386/PAE: fix pud_page()
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@...ell.com>
---
arch/x86/include/asm/pgtable-3level.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.28-rc2/arch/x86/include/asm/pgtable-3level.h 2008-10-30 11:03:18.000000000 +0100
+++ 2.6.28-rc2-i386-pae-pud_page/arch/x86/include/asm/pgtable-3level.h 2008-10-29 11:35:24.000000000 +0100
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists