Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm When panicing due a non-power of 2 pagesize, include...



details:   https://anonhg.NetBSD.org/src/rev/2b6d8d3adf35
branches:  trunk
changeset: 759507:2b6d8d3adf35
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Dec 11 22:34:03 2010 +0000

description:
When panicing due a non-power of 2 pagesize, include the pagesize in the
panic message.

diffstat:

 sys/uvm/uvm_page.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 63d39ca730d9 -r 2b6d8d3adf35 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Sat Dec 11 22:32:13 2010 +0000
+++ b/sys/uvm/uvm_page.c        Sat Dec 11 22:34:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.c,v 1.167 2010/11/25 04:45:30 uebayasi Exp $  */
+/*     $NetBSD: uvm_page.c,v 1.168 2010/12/11 22:34:03 matt Exp $      */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.167 2010/11/25 04:45:30 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.168 2010/12/11 22:34:03 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -542,7 +542,8 @@
        }
        uvmexp.pagemask = uvmexp.pagesize - 1;
        if ((uvmexp.pagemask & uvmexp.pagesize) != 0)
-               panic("uvm_setpagesize: page size not a power of two");
+               panic("uvm_setpagesize: page size %u (%#x) not a power of two",
+                   uvmexp.pagesize, uvmexp.pagesize);
        for (uvmexp.pageshift = 0; ; uvmexp.pageshift++)
                if ((1 << uvmexp.pageshift) == uvmexp.pagesize)
                        break;



Home | Main Index | Thread Index | Old Index