[PATCH] [6/12] GBPAGES: Add gbpages support to lookup_address

From: Andi Kleen
Date: Fri Feb 01 2008 - 04:55:16 EST



Signed-off-by: Andi Kleen <ak@xxxxxxx>

---
arch/x86/mm/pageattr.c | 5 +++++
1 file changed, 5 insertions(+)

Index: linux/arch/x86/mm/pageattr.c
===================================================================
--- linux.orig/arch/x86/mm/pageattr.c
+++ linux/arch/x86/mm/pageattr.c
@@ -155,6 +155,11 @@ pte_t *lookup_address(unsigned long addr
pud = pud_offset(pgd, address);
if (pud_none(*pud))
return NULL;
+
+ *level = PG_LEVEL_1G;
+ if (pud_large(*pud))
+ return (pte_t *)pud;
+
pmd = pmd_offset(pud, address);
if (pmd_none(*pmd))
return NULL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/