diff options
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_32.h | 7 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_64.h | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 532144c2f1cc..49b5cff78c28 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -489,6 +489,15 @@ static inline unsigned pmd_index(unsigned long address) | |||
489 | return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); | 489 | return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); |
490 | } | 490 | } |
491 | 491 | ||
492 | /* | ||
493 | * Conversion functions: convert a page and protection to a page entry, | ||
494 | * and a page entry and page directory to the page they refer to. | ||
495 | * | ||
496 | * (Currently stuck as a macro because of indirect forward reference | ||
497 | * to linux/mm.h:page_to_nid()) | ||
498 | */ | ||
499 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | ||
500 | |||
492 | #if PAGETABLE_LEVELS > 2 | 501 | #if PAGETABLE_LEVELS > 2 |
493 | static inline int pud_present(pud_t pud) | 502 | static inline int pud_present(pud_t pud) |
494 | { | 503 | { |
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h index 40b066215bb8..6335be843c16 100644 --- a/arch/x86/include/asm/pgtable_32.h +++ b/arch/x86/include/asm/pgtable_32.h | |||
@@ -95,13 +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 | /* | ||
99 | * Conversion functions: convert a page and protection to a page entry, | ||
100 | * and a page entry and page directory to the page they refer to. | ||
101 | */ | ||
102 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | ||
103 | |||
104 | |||
105 | static inline int pud_large(pud_t pud) { return 0; } | 98 | static inline int pud_large(pud_t pud) { return 0; } |
106 | 99 | ||
107 | /* | 100 | /* |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 279ddc6a4eb8..adce05628a01 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -198,9 +198,6 @@ static inline int pud_large(pud_t pte) | |||
198 | 198 | ||
199 | /* PTE - Level 1 access. */ | 199 | /* PTE - Level 1 access. */ |
200 | 200 | ||
201 | /* page, protection -> pte */ | ||
202 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn((page)), (pgprot)) | ||
203 | |||
204 | #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 201 | #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
205 | #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \ | 202 | #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \ |
206 | pte_index((address))) | 203 | pte_index((address))) |