diff options
| author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 14:31:08 -0500 |
|---|---|---|
| committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 15:31:50 -0500 |
| commit | 3f6cbef1d7f474d16f3a824c6d2910d930778fbd (patch) | |
| tree | 6c49be281129cdbf46ae4b7669fa7faf247bbd5f | |
| parent | 3fbc2444f465710cdf0c832461a6a14338437453 (diff) | |
x86: unify pud_large
Impact: cleanup
Unify and demacro pud_large.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
| -rw-r--r-- | arch/x86/include/asm/pgtable.h | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable_32.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable_64.h | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index c61b37af1f28..0c734e2a90ca 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
| @@ -540,6 +540,12 @@ static inline unsigned long pmd_pfn(pmd_t pmd) | |||
| 540 | { | 540 | { |
| 541 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; | 541 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; |
| 542 | } | 542 | } |
| 543 | |||
| 544 | static inline int pud_large(pud_t pud) | ||
| 545 | { | ||
| 546 | return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == | ||
| 547 | (_PAGE_PSE | _PAGE_PRESENT); | ||
| 548 | } | ||
| 543 | #endif /* PAGETABLE_LEVELS > 2 */ | 549 | #endif /* PAGETABLE_LEVELS > 2 */ |
| 544 | 550 | ||
| 545 | #if PAGETABLE_LEVELS > 3 | 551 | #if PAGETABLE_LEVELS > 3 |
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h index 133fc4e4529a..ad7830bdc9ac 100644 --- a/arch/x86/include/asm/pgtable_32.h +++ b/arch/x86/include/asm/pgtable_32.h | |||
| @@ -95,8 +95,6 @@ extern unsigned long pg0[]; | |||
| 95 | # include <asm/pgtable-2level.h> | 95 | # include <asm/pgtable-2level.h> |
| 96 | #endif | 96 | #endif |
| 97 | 97 | ||
| 98 | static inline int pud_large(pud_t pud) { return 0; } | ||
| 99 | |||
| 100 | #if defined(CONFIG_HIGHPTE) | 98 | #if defined(CONFIG_HIGHPTE) |
| 101 | #define pte_offset_map(dir, address) \ | 99 | #define pte_offset_map(dir, address) \ |
| 102 | ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ | 100 | ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index a8bfb75c76ab..a85ac14df35d 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
| @@ -184,12 +184,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; } | |||
| 184 | 184 | ||
| 185 | /* PUD - Level3 access */ | 185 | /* PUD - Level3 access */ |
| 186 | 186 | ||
| 187 | static inline int pud_large(pud_t pte) | ||
| 188 | { | ||
| 189 | return (pud_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | ||
| 190 | (_PAGE_PSE | _PAGE_PRESENT); | ||
| 191 | } | ||
| 192 | |||
| 193 | /* PMD - Level 2 access */ | 187 | /* PMD - Level 2 access */ |
| 194 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) | 188 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) |
| 195 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ | 189 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ |
