Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev/hpc Pull up the following revisions(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/a196cfae762b
branches:  netbsd-7
changeset: 445463:a196cfae762b
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Tue Oct 30 09:56:41 2018 +0000

description:
Pull up the following revisions(s) (requested by rin in ticket #1638):
        sys/dev/hpc/hpckbd.c:   revision 1.33-1.35

Fix kernel crash on hpcmips when console is attached.

diffstat:

 sys/dev/hpc/hpckbd.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r fe43664453fa -r a196cfae762b sys/dev/hpc/hpckbd.c
--- a/sys/dev/hpc/hpckbd.c      Tue Oct 30 08:36:19 2018 +0000
+++ b/sys/dev/hpc/hpckbd.c      Tue Oct 30 09:56:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpckbd.c,v 1.30.12.2 2017/08/09 06:48:57 snj Exp $ */
+/*     $NetBSD: hpckbd.c,v 1.30.12.3 2018/10/30 09:56:41 sborrill Exp $ */
 
 /*-
  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30.12.2 2017/08/09 06:48:57 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30.12.3 2018/10/30 09:56:41 sborrill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -261,10 +261,11 @@
 }
 
 
-#ifdef hpcsh
+#if defined(hpcsh) || defined(hpcmips)
 /*
- * XXX: Use the old wrong code for now as hpcsh attaches console very
- * early and it's convenient to be able to do early DDB on wscons.
+ * XXX: Use the old wrong code for now as hpcsh and hpcmips attach
+ * console very early when malloc(9) is not yet available.  It is
+ * convenient to be able to do early DDB on wscons.
  */
 void
 hpckbd_keymap_setup(struct hpckbd_core *hc,
@@ -278,8 +279,9 @@
         * XXX The way this is done is really wrong.  The __UNCONST()
         * is a hint as to what is wrong.  This actually ends up modifying
         * initialized data which is marked "const".
-        * The reason we get away with it here is that on sh3 kernel
-        * is directly mapped.
+        *
+        * The reason we get away with it here is that on sh3 and mips
+        * the kernel is directly mapped.
         */
        desc = (struct wscons_keydesc *)__UNCONST(hpckbd_keymapdata.keydesc);
        for (i = 0; desc[i].name != 0; i++) {



Home | Main Index | Thread Index | Old Index