powerpc: print both base and actual page size on hash failure

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Aneesh Kumar K.V 2013-04-28 09:37:37 +00:00 committed by Benjamin Herrenschmidt
parent 7e74c3921a
commit d8139ebf85
3 changed files with 10 additions and 7 deletions

View File

@ -342,7 +342,8 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
unsigned int shift, unsigned int mmu_psize); unsigned int shift, unsigned int mmu_psize);
extern void hash_failure_debug(unsigned long ea, unsigned long access, extern void hash_failure_debug(unsigned long ea, unsigned long access,
unsigned long vsid, unsigned long trap, unsigned long vsid, unsigned long trap,
int ssize, int psize, unsigned long pte); int ssize, int psize, int lpsize,
unsigned long pte);
extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
unsigned long pstart, unsigned long prot, unsigned long pstart, unsigned long prot,
int psize, int ssize); int psize, int ssize);

View File

@ -936,14 +936,14 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea)
void hash_failure_debug(unsigned long ea, unsigned long access, void hash_failure_debug(unsigned long ea, unsigned long access,
unsigned long vsid, unsigned long trap, unsigned long vsid, unsigned long trap,
int ssize, int psize, unsigned long pte) int ssize, int psize, int lpsize, unsigned long pte)
{ {
if (!printk_ratelimit()) if (!printk_ratelimit())
return; return;
pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n", pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n",
ea, access, current->comm); ea, access, current->comm);
pr_info(" trap=0x%lx vsid=0x%lx ssize=%d psize=%d pte=0x%lx\n", pr_info(" trap=0x%lx vsid=0x%lx ssize=%d base psize=%d psize %d pte=0x%lx\n",
trap, vsid, ssize, psize, pte); trap, vsid, ssize, psize, lpsize, pte);
} }
/* Result code is: /* Result code is:
@ -1116,7 +1116,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
*/ */
if (rc == -1) if (rc == -1)
hash_failure_debug(ea, access, vsid, trap, ssize, psize, hash_failure_debug(ea, access, vsid, trap, ssize, psize,
pte_val(*ptep)); psize, pte_val(*ptep));
#ifndef CONFIG_PPC_64K_PAGES #ifndef CONFIG_PPC_64K_PAGES
DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep));
#else #else
@ -1194,7 +1194,9 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
*/ */
if (rc == -1) if (rc == -1)
hash_failure_debug(ea, access, vsid, trap, ssize, hash_failure_debug(ea, access, vsid, trap, ssize,
mm->context.user_psize, pte_val(*ptep)); mm->context.user_psize,
mm->context.user_psize,
pte_val(*ptep));
local_irq_restore(flags); local_irq_restore(flags);
} }

View File

@ -110,7 +110,7 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
if (unlikely(slot == -2)) { if (unlikely(slot == -2)) {
*ptep = __pte(old_pte); *ptep = __pte(old_pte);
hash_failure_debug(ea, access, vsid, trap, ssize, hash_failure_debug(ea, access, vsid, trap, ssize,
mmu_psize, old_pte); mmu_psize, mmu_psize, old_pte);
return -1; return -1;
} }