From 6dad45362cb849d1faf16949d44ed2fd4b2c2ee1 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Sun, 4 Sep 2011 21:04:42 +0000 Subject: [PATCH] if pmap_page_activate fails, print the returned and expected addresses --- sys/arch/usermode/usermode/pmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/arch/usermode/usermode/pmap.c b/sys/arch/usermode/usermode/pmap.c index b4df7b67c4d6..b48f8047ade2 100644 --- a/sys/arch/usermode/usermode/pmap.c +++ b/sys/arch/usermode/usermode/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.53 2011/09/03 18:42:13 jmcneill Exp $ */ +/* $NetBSD: pmap.c,v 1.54 2011/09/04 21:04:42 jmcneill Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2011/09/03 18:42:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2011/09/04 21:04:42 jmcneill Exp $"); #include "opt_memsize.h" #include "opt_kmempages.h" @@ -550,7 +550,8 @@ pmap_page_activate(struct pv_entry *pv) aprint_debug("page_activate: (va %p, pa %p, ppl %d) -> %p\n", (void *) va, (void *) pa, pv->pv_mmap_ppl, (void *) addr); if (addr != (void *) va) - panic("pmap_page_activate: mmap failed"); + panic("pmap_page_activate: mmap failed (expected %p got %p): %d", + (void *)va, addr, thunk_geterrno()); } static void