Module Name:    src
Committed By:   sborrill
Date:           Tue Oct 30 09:56:41 UTC 2018

Modified Files:
        src/sys/dev/hpc [netbsd-7]: hpckbd.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.30.12.2 -r1.30.12.3 src/sys/dev/hpc/hpckbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/hpc/hpckbd.c
diff -u src/sys/dev/hpc/hpckbd.c:1.30.12.2 src/sys/dev/hpc/hpckbd.c:1.30.12.3
--- src/sys/dev/hpc/hpckbd.c:1.30.12.2	Wed Aug  9 06:48:57 2017
+++ src/sys/dev/hpc/hpckbd.c	Tue Oct 30 09:56:41 2018
@@ -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 @@ hpckbd_getevent(struct hpckbd_core* hc, 
 }
 
 
-#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 @@ hpckbd_keymap_setup(struct hpckbd_core *
 	 * 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++) {

Reply via email to