Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/sh3 Redo a part of rev 1.89:



details:   https://anonhg.NetBSD.org/src/rev/73dd607a402d
branches:  trunk
changeset: 1023453:73dd607a402d
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Sep 08 07:25:55 2021 +0000

description:
Redo a part of rev 1.89:
- Improve uniformity of panic messages. Also, use __func__ instead of
  hard-coded function names.

diffstat:

 sys/arch/sh3/sh3/pmap.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r bbba4d164f3d -r 73dd607a402d sys/arch/sh3/sh3/pmap.c
--- a/sys/arch/sh3/sh3/pmap.c   Wed Sep 08 07:22:56 2021 +0000
+++ b/sys/arch/sh3/sh3/pmap.c   Wed Sep 08 07:25:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.91 2021/09/08 07:22:56 rin Exp $    */
+/*     $NetBSD: pmap.c,v 1.92 2021/09/08 07:25:55 rin Exp $    */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.91 2021/09/08 07:22:56 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2021/09/08 07:25:55 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -192,7 +192,7 @@
 
        return __pmap_kve;
  error:
-       panic("pmap_growkernel: out of memory.");
+       panic("%s: out of memory", __func__);
        /* NOTREACHED */
 }
 
@@ -368,7 +368,7 @@
                if (__pmap_pv_enter(pmap, pg, va)) {
                        if (flags & PMAP_CANFAIL)
                                return ENOMEM;
-                       panic("%s: __pmap_pv_enter failed", __func__);
+                       panic("%s: cannot allocate pv", __func__);
                }
        } else {        /* bus-space (always uncached map) */
                if (kva)
@@ -392,7 +392,7 @@
                                        __pmap_pv_remove(pmap, pg, va);
                                return ENOMEM;
                        }
-                       panic("%s: __pmap_pte_alloc failed", __func__);
+                       panic("%s: cannot allocate pte", __func__);
                }
        }
 
@@ -666,7 +666,7 @@
 
        switch (prot) {
        default:
-               panic("pmap_protect: invalid protection mode %x", prot);
+               panic("%s: invalid protection mode %x", __func__, prot);
                /* NOTREACHED */
        case VM_PROT_READ:
        case VM_PROT_READ | VM_PROT_EXECUTE:
@@ -1096,7 +1096,7 @@
                }
        }
 
-       panic("No ASID allocated.");
+       panic("%s: no ASID allocated", __func__);
        /* NOTREACHED */
 }
 



Home | Main Index | Thread Index | Old Index