aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault.c
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2011-02-15 08:31:37 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-15 09:20:22 -0500
commit29a38193c15bd72ba96c57a805443ef46ea6a6ac (patch)
treeb4367269a4bfb5b75537605c5191fe4828b62437 /arch/arm/mm/fault.c
parent410f14837a92177242a403c20d0a0906fe357019 (diff)
ARM: 6674/1: LPAE: use long long format when printing physical addresses and ptes
For the Kernel to support 2 level and 3 level page tables, physical addresses (and also page table entries) need to be 32 or 64-bits depending upon the configuration. This patch uses the %08llx conversion specifier for physical addresses and page table entries, ensuring that they are cast to (long long) so that common code can be used regardless of the datatype widths. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r--arch/arm/mm/fault.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index f10f9bac2206..ef0e24f578ef 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -76,7 +76,8 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
76 76
77 printk(KERN_ALERT "pgd = %p\n", mm->pgd); 77 printk(KERN_ALERT "pgd = %p\n", mm->pgd);
78 pgd = pgd_offset(mm, addr); 78 pgd = pgd_offset(mm, addr);
79 printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd)); 79 printk(KERN_ALERT "[%08lx] *pgd=%08llx",
80 addr, (long long)pgd_val(*pgd));
80 81
81 do { 82 do {
82 pmd_t *pmd; 83 pmd_t *pmd;
@@ -92,7 +93,7 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
92 93
93 pmd = pmd_offset(pgd, addr); 94 pmd = pmd_offset(pgd, addr);
94 if (PTRS_PER_PMD != 1) 95 if (PTRS_PER_PMD != 1)
95 printk(", *pmd=%08lx", pmd_val(*pmd)); 96 printk(", *pmd=%08llx", (long long)pmd_val(*pmd));
96 97
97 if (pmd_none(*pmd)) 98 if (pmd_none(*pmd))
98 break; 99 break;
@@ -107,8 +108,9 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
107 break; 108 break;
108 109
109 pte = pte_offset_map(pmd, addr); 110 pte = pte_offset_map(pmd, addr);
110 printk(", *pte=%08lx", pte_val(*pte)); 111 printk(", *pte=%08llx", (long long)pte_val(*pte));
111 printk(", *ppte=%08lx", pte_val(pte[PTE_HWTABLE_PTRS])); 112 printk(", *ppte=%08llx",
113 (long long)pte_val(pte[PTE_HWTABLE_PTRS]));
112 pte_unmap(pte); 114 pte_unmap(pte);
113 } while(0); 115 } while(0);
114 116