Commit 39e48d9b authored by Jan Beulich's avatar Jan Beulich Committed by Ingo Molnar

x86/mm: Use pr_cont() in dump_pagetable()

The lack of newlines in preceding format strings is a clear indication
that these were meant to be continuations of one another, and indeed
output ends up quite a bit more compact (and readable) that way.

Switch other plain printk()-s in the function instances to pr_info(),
as requested.
Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/59A7D72B0200007800175E4E@prv-mh.provo.novell.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6e0b52d4
...@@ -396,14 +396,18 @@ static void dump_pagetable(unsigned long address) ...@@ -396,14 +396,18 @@ static void dump_pagetable(unsigned long address)
pte_t *pte; pte_t *pte;
#ifdef CONFIG_X86_PAE #ifdef CONFIG_X86_PAE
printk("*pdpt = %016Lx ", pgd_val(*pgd)); pr_info("*pdpt = %016Lx ", pgd_val(*pgd));
if (!low_pfn(pgd_val(*pgd) >> PAGE_SHIFT) || !pgd_present(*pgd)) if (!low_pfn(pgd_val(*pgd) >> PAGE_SHIFT) || !pgd_present(*pgd))
goto out; goto out;
#define pr_pde pr_cont
#else
#define pr_pde pr_info
#endif #endif
p4d = p4d_offset(pgd, address); p4d = p4d_offset(pgd, address);
pud = pud_offset(p4d, address); pud = pud_offset(p4d, address);
pmd = pmd_offset(pud, address); pmd = pmd_offset(pud, address);
printk(KERN_CONT "*pde = %0*Lx ", sizeof(*pmd) * 2, (u64)pmd_val(*pmd)); pr_pde("*pde = %0*Lx ", sizeof(*pmd) * 2, (u64)pmd_val(*pmd));
#undef pr_pde
/* /*
* We must not directly access the pte in the highpte * We must not directly access the pte in the highpte
...@@ -415,9 +419,9 @@ static void dump_pagetable(unsigned long address) ...@@ -415,9 +419,9 @@ static void dump_pagetable(unsigned long address)
goto out; goto out;
pte = pte_offset_kernel(pmd, address); pte = pte_offset_kernel(pmd, address);
printk("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte)); pr_cont("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
out: out:
printk("\n"); pr_cont("\n");
} }
#else /* CONFIG_X86_64: */ #else /* CONFIG_X86_64: */
...@@ -565,7 +569,7 @@ static void dump_pagetable(unsigned long address) ...@@ -565,7 +569,7 @@ static void dump_pagetable(unsigned long address)
if (bad_address(pgd)) if (bad_address(pgd))
goto bad; goto bad;
printk("PGD %lx ", pgd_val(*pgd)); pr_info("PGD %lx ", pgd_val(*pgd));
if (!pgd_present(*pgd)) if (!pgd_present(*pgd))
goto out; goto out;
...@@ -574,7 +578,7 @@ static void dump_pagetable(unsigned long address) ...@@ -574,7 +578,7 @@ static void dump_pagetable(unsigned long address)
if (bad_address(p4d)) if (bad_address(p4d))
goto bad; goto bad;
printk("P4D %lx ", p4d_val(*p4d)); pr_cont("P4D %lx ", p4d_val(*p4d));
if (!p4d_present(*p4d) || p4d_large(*p4d)) if (!p4d_present(*p4d) || p4d_large(*p4d))
goto out; goto out;
...@@ -582,7 +586,7 @@ static void dump_pagetable(unsigned long address) ...@@ -582,7 +586,7 @@ static void dump_pagetable(unsigned long address)
if (bad_address(pud)) if (bad_address(pud))
goto bad; goto bad;
printk("PUD %lx ", pud_val(*pud)); pr_cont("PUD %lx ", pud_val(*pud));
if (!pud_present(*pud) || pud_large(*pud)) if (!pud_present(*pud) || pud_large(*pud))
goto out; goto out;
...@@ -590,7 +594,7 @@ static void dump_pagetable(unsigned long address) ...@@ -590,7 +594,7 @@ static void dump_pagetable(unsigned long address)
if (bad_address(pmd)) if (bad_address(pmd))
goto bad; goto bad;
printk("PMD %lx ", pmd_val(*pmd)); pr_cont("PMD %lx ", pmd_val(*pmd));
if (!pmd_present(*pmd) || pmd_large(*pmd)) if (!pmd_present(*pmd) || pmd_large(*pmd))
goto out; goto out;
...@@ -598,12 +602,12 @@ static void dump_pagetable(unsigned long address) ...@@ -598,12 +602,12 @@ static void dump_pagetable(unsigned long address)
if (bad_address(pte)) if (bad_address(pte))
goto bad; goto bad;
printk("PTE %lx", pte_val(*pte)); pr_cont("PTE %lx", pte_val(*pte));
out: out:
printk("\n"); pr_cont("\n");
return; return;
bad: bad:
printk("BAD\n"); pr_info("BAD\n");
} }
#endif /* CONFIG_X86_64 */ #endif /* CONFIG_X86_64 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment