]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify pmd_pfn
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:31:05 +0000 (11:31 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 20:31:50 +0000 (12:31 -0800)
Impact: cleanup

Unify pmd_pfn.  Unfortunately it can't be demacroed because it has a
cyclic dependency on linux/mm.h:page_to_nid().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_32.h
arch/x86/include/asm/pgtable_64.h

index 532144c2f1cce314b7eb8d553f5075452f986037..49b5cff78c285a14fbd47a44097b8b09a5ac3d60 100644 (file)
@@ -489,6 +489,15 @@ static inline unsigned pmd_index(unsigned long address)
        return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
 }
 
+/*
+ * Conversion functions: convert a page and protection to a page entry,
+ * and a page entry and page directory to the page they refer to.
+ *
+ * (Currently stuck as a macro because of indirect forward reference
+ * to linux/mm.h:page_to_nid())
+ */
+#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
+
 #if PAGETABLE_LEVELS > 2
 static inline int pud_present(pud_t pud)
 {
index 40b066215bb8a8911401ad576440aac68fd4dd91..6335be843c16e4b245b4079ea489e621025df984 100644 (file)
@@ -95,13 +95,6 @@ extern unsigned long pg0[];
 # include <asm/pgtable-2level.h>
 #endif
 
-/*
- * Conversion functions: convert a page and protection to a page entry,
- * and a page entry and page directory to the page they refer to.
- */
-#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
-
-
 static inline int pud_large(pud_t pud) { return 0; }
 
 /*
index 279ddc6a4eb879aad9da902e1b5e4d105a8fa73c..adce05628a01167208fd61392dbc26d7f918a58e 100644 (file)
@@ -198,9 +198,6 @@ static inline int pud_large(pud_t pte)
 
 /* PTE - Level 1 access. */
 
-/* page, protection -> pte */
-#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn((page)), (pgprot))
-
 #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \
                                         pte_index((address)))