powerpc: Use pr_devel() in arch/powerpc/mm/gup.c

pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.

With CONFIG_DYNAMIC_DEBUG=y:

size before:
   text    data     bss     dec     hex filename
   3252     384       0    3636     e34 arch/powerpc/mm/gup.o

size after:
   text    data     bss     dec     hex filename
   2576      96       0    2672     a70 arch/powerpc/mm/gup.o

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Michael Ellerman 2009-06-17 18:13:51 +00:00 committed by Benjamin Herrenschmidt
parent 651e2dd2a1
commit 29e5fa59e5

View File

@ -159,7 +159,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
int psize; int psize;
#endif #endif
pr_debug("%s(%lx,%x,%s)\n", __func__, start, nr_pages, write ? "write" : "read"); pr_devel("%s(%lx,%x,%s)\n", __func__, start, nr_pages, write ? "write" : "read");
start &= PAGE_MASK; start &= PAGE_MASK;
addr = start; addr = start;
@ -170,7 +170,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
start, len))) start, len)))
goto slow_irqon; goto slow_irqon;
pr_debug(" aligned: %lx .. %lx\n", start, end); pr_devel(" aligned: %lx .. %lx\n", start, end);
#ifdef CONFIG_HUGETLB_PAGE #ifdef CONFIG_HUGETLB_PAGE
/* We bail out on slice boundary crossing when hugetlb is /* We bail out on slice boundary crossing when hugetlb is
@ -234,7 +234,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
do { do {
VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, a)].shift); VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, a)].shift);
ptep = huge_pte_offset(mm, a); ptep = huge_pte_offset(mm, a);
pr_debug(" %016lx: huge ptep %p\n", a, ptep); pr_devel(" %016lx: huge ptep %p\n", a, ptep);
if (!ptep || !gup_huge_pte(ptep, hstate, &a, end, write, pages, if (!ptep || !gup_huge_pte(ptep, hstate, &a, end, write, pages,
&nr)) &nr))
goto slow; goto slow;
@ -249,7 +249,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, addr)].shift); VM_BUG_ON(shift != mmu_psize_defs[get_slice_psize(mm, addr)].shift);
#endif #endif
pr_debug(" %016lx: normal pgd %p\n", addr, pr_devel(" %016lx: normal pgd %p\n", addr,
(void *)pgd_val(pgd)); (void *)pgd_val(pgd));
next = pgd_addr_end(addr, end); next = pgd_addr_end(addr, end);
if (pgd_none(pgd)) if (pgd_none(pgd))
@ -269,7 +269,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
slow: slow:
local_irq_enable(); local_irq_enable();
slow_irqon: slow_irqon:
pr_debug(" slow path ! nr = %d\n", nr); pr_devel(" slow path ! nr = %d\n", nr);
/* Try to get the remaining pages with get_user_pages */ /* Try to get the remaining pages with get_user_pages */
start += nr << PAGE_SHIFT; start += nr << PAGE_SHIFT;