aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2017-08-31 03:30:19 -0400
committerIngo Molnar <mingo@kernel.org>2017-08-31 05:01:58 -0400
commit39e48d9b128abbd2ea9b8403bb1e2693323db2f4 (patch)
tree18cb6ebe7ca77c3ebb4a3a59e402143485eabcb2
parent6e0b52d406f64d2bd65731968a072387b91b44d2 (diff)
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: Jan Beulich <jbeulich@suse.com> Acked-by: Thomas 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.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/mm/fault.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 2a1fa10c6a98..0cdf14cf3270 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -396,14 +396,18 @@ static void dump_pagetable(unsigned long address)
396 pte_t *pte; 396 pte_t *pte;
397 397
398#ifdef CONFIG_X86_PAE 398#ifdef CONFIG_X86_PAE
399 printk("*pdpt = %016Lx ", pgd_val(*pgd)); 399 pr_info("*pdpt = %016Lx ", pgd_val(*pgd));
400 if (!low_pfn(pgd_val(*pgd) >> PAGE_SHIFT) || !pgd_present(*pgd)) 400 if (!low_pfn(pgd_val(*pgd) >> PAGE_SHIFT) || !pgd_present(*pgd))
401 goto out; 401 goto out;
402#define pr_pde pr_cont
403#else
404#define pr_pde pr_info
402#endif 405#endif
403 p4d = p4d_offset(pgd, address); 406 p4d = p4d_offset(pgd, address);
404 pud = pud_offset(p4d, address); 407 pud = pud_offset(p4d, address);
405 pmd = pmd_offset(pud, address); 408 pmd = pmd_offset(pud, address);
406 printk(KERN_CONT "*pde = %0*Lx ", sizeof(*pmd) * 2, (u64)pmd_val(*pmd)); 409 pr_pde("*pde = %0*Lx ", sizeof(*pmd) * 2, (u64)pmd_val(*pmd));
410#undef pr_pde
407 411
408 /* 412 /*
409 * We must not directly access the pte in the highpte 413 * We must not directly access the pte in the highpte
@@ -415,9 +419,9 @@ static void dump_pagetable(unsigned long address)
415 goto out; 419 goto out;
416 420
417 pte = pte_offset_kernel(pmd, address); 421 pte = pte_offset_kernel(pmd, address);
418 printk("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte)); 422 pr_cont("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
419out: 423out:
420 printk("\n"); 424 pr_cont("\n");
421} 425}
422 426
423#else /* CONFIG_X86_64: */ 427#else /* CONFIG_X86_64: */
@@ -565,7 +569,7 @@ static void dump_pagetable(unsigned long address)
565 if (bad_address(pgd)) 569 if (bad_address(pgd))
566 goto bad; 570 goto bad;
567 571
568 printk("PGD %lx ", pgd_val(*pgd)); 572 pr_info("PGD %lx ", pgd_val(*pgd));
569 573
570 if (!pgd_present(*pgd)) 574 if (!pgd_present(*pgd))
571 goto out; 575 goto out;
@@ -574,7 +578,7 @@ static void dump_pagetable(unsigned long address)
574 if (bad_address(p4d)) 578 if (bad_address(p4d))
575 goto bad; 579 goto bad;
576 580
577 printk("P4D %lx ", p4d_val(*p4d)); 581 pr_cont("P4D %lx ", p4d_val(*p4d));
578 if (!p4d_present(*p4d) || p4d_large(*p4d)) 582 if (!p4d_present(*p4d) || p4d_large(*p4d))
579 goto out; 583 goto out;
580 584
@@ -582,7 +586,7 @@ static void dump_pagetable(unsigned long address)
582 if (bad_address(pud)) 586 if (bad_address(pud))
583 goto bad; 587 goto bad;
584 588
585 printk("PUD %lx ", pud_val(*pud)); 589 pr_cont("PUD %lx ", pud_val(*pud));
586 if (!pud_present(*pud) || pud_large(*pud)) 590 if (!pud_present(*pud) || pud_large(*pud))
587 goto out; 591 goto out;
588 592
@@ -590,7 +594,7 @@ static void dump_pagetable(unsigned long address)
590 if (bad_address(pmd)) 594 if (bad_address(pmd))
591 goto bad; 595 goto bad;
592 596
593 printk("PMD %lx ", pmd_val(*pmd)); 597 pr_cont("PMD %lx ", pmd_val(*pmd));
594 if (!pmd_present(*pmd) || pmd_large(*pmd)) 598 if (!pmd_present(*pmd) || pmd_large(*pmd))
595 goto out; 599 goto out;
596 600
@@ -598,12 +602,12 @@ static void dump_pagetable(unsigned long address)
598 if (bad_address(pte)) 602 if (bad_address(pte))
599 goto bad; 603 goto bad;
600 604
601 printk("PTE %lx", pte_val(*pte)); 605 pr_cont("PTE %lx", pte_val(*pte));
602out: 606out:
603 printk("\n"); 607 pr_cont("\n");
604 return; 608 return;
605bad: 609bad:
606 printk("BAD\n"); 610 pr_info("BAD\n");
607} 611}
608 612
609#endif /* CONFIG_X86_64 */ 613#endif /* CONFIG_X86_64 */