diff options
author | Andi Kleen <ak@suse.de> | 2008-02-04 15:48:09 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-04 15:48:09 (GMT) |
commit | 61e19a347ad4bcdda615ef77ef9c3e656e254f3d (patch) | |
tree | 483fe902525b3a9aeab3689434eabb659d4de738 /include/asm-x86/pgtable_64.h | |
parent | fbff3c21aff29ffdfa46b50946696689d3e70a48 (diff) | |
download | linux-fsl-qoriq-61e19a347ad4bcdda615ef77ef9c3e656e254f3d.tar.xz |
x86: add pgtable accessor functions for gbpages
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/pgtable_64.h')
-rw-r--r-- | include/asm-x86/pgtable_64.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 5c86cff..bd4740a 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h @@ -198,6 +198,12 @@ static inline unsigned long pmd_bad(pmd_t pmd) #define pud_offset(pgd, address) ((pud_t *) pgd_page_vaddr(*(pgd)) + pud_index(address)) #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) +static inline int pud_large(pud_t pte) +{ + return (pud_val(pte) & (_PAGE_PSE|_PAGE_PRESENT)) == + (_PAGE_PSE|_PAGE_PRESENT); +} + /* PMD - Level 2 access */ #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK)) #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) |