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>
This commit is contained in:

committed by
Russell King

parent
410f14837a
commit
29a38193c1
@@ -76,7 +76,8 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
|
||||
|
||||
printk(KERN_ALERT "pgd = %p\n", mm->pgd);
|
||||
pgd = pgd_offset(mm, addr);
|
||||
printk(KERN_ALERT "[%08lx] *pgd=%08lx", addr, pgd_val(*pgd));
|
||||
printk(KERN_ALERT "[%08lx] *pgd=%08llx",
|
||||
addr, (long long)pgd_val(*pgd));
|
||||
|
||||
do {
|
||||
pmd_t *pmd;
|
||||
@@ -92,7 +93,7 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
|
||||
|
||||
pmd = pmd_offset(pgd, addr);
|
||||
if (PTRS_PER_PMD != 1)
|
||||
printk(", *pmd=%08lx", pmd_val(*pmd));
|
||||
printk(", *pmd=%08llx", (long long)pmd_val(*pmd));
|
||||
|
||||
if (pmd_none(*pmd))
|
||||
break;
|
||||
@@ -107,8 +108,9 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
|
||||
break;
|
||||
|
||||
pte = pte_offset_map(pmd, addr);
|
||||
printk(", *pte=%08lx", pte_val(*pte));
|
||||
printk(", *ppte=%08lx", pte_val(pte[PTE_HWTABLE_PTRS]));
|
||||
printk(", *pte=%08llx", (long long)pte_val(*pte));
|
||||
printk(", *ppte=%08llx",
|
||||
(long long)pte_val(pte[PTE_HWTABLE_PTRS]));
|
||||
pte_unmap(pte);
|
||||
} while(0);
|
||||
|
||||
|
Reference in New Issue
Block a user