summaryrefslogtreecommitdiffstats
path: root/include/asm-um/page.h
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-04 22:30:55 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 09:44:28 -0800
commit655e4ed0c521dcfdbf1c5a79da971560e6733527 (patch)
tree8b0cf794410c9e632b9ee65b8e0750621d9c96ce /include/asm-um/page.h
parenta5a678c80beac4d163babda243a27eeb9c89bd89 (diff)
downloadlinux-655e4ed0c521dcfdbf1c5a79da971560e6733527.tar.bz2
uml: fix page table data sizes
Get the sizes of various pieces of data right when using three-level page tables. pgd and pmd entries remain at 32 bits in a 32-bit compilation because page tables will remain in low memory. So, PGDIR_SHIFT, the PTRS_PER_* values, set_pud, set_pmd are conditional on 64BIT. More use of phys_t is made when there are physical memory addresses floating around. ObCheckpatchViolationJustification - the new typedef is an alternate definition of pmd_t, which I can't really live without. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um/page.h')
-rw-r--r--include/asm-um/page.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 4b424c75fca5..fe2374d705d1 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -30,7 +30,7 @@ struct page;
#if defined(CONFIG_3_LEVEL_PGTABLES) && !defined(CONFIG_64BIT)
typedef struct { unsigned long pte_low, pte_high; } pte_t;
-typedef struct { unsigned long long pmd; } pmd_t;
+typedef struct { unsigned long pmd; } pmd_t;
typedef struct { unsigned long pgd; } pgd_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long) (x).pte_high << 32))
@@ -106,8 +106,8 @@ extern unsigned long uml_physmem;
#define __pa(virt) to_phys((void *) (unsigned long) (virt))
#define __va(phys) to_virt((unsigned long) (phys))
-#define phys_to_pfn(p) ((p) >> PAGE_SHIFT)
-#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
+#define phys_to_pfn(p) ((pfn_t) ((p) >> PAGE_SHIFT))
+#define pfn_to_phys(pfn) ((phys_t) ((pfn) << PAGE_SHIFT))
#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v)))