Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/hpc Apply workaround introduced in r1.32 to hpcmips.
details: https://anonhg.NetBSD.org/src/rev/181e29fb1f9a
branches: trunk
changeset: 433513:181e29fb1f9a
user: rin <rin%NetBSD.org@localhost>
date: Tue Sep 18 02:58:10 2018 +0000
description:
Apply workaround introduced in r1.32 to hpcmips.
Fix kernel crash when console is attached. Now, my MC/R550 boots multiuser.
Thanks Masahiko Ito for encouraging me to do bisection to find this out.
XXX pullup-8, pullup-7
diffstat:
sys/dev/hpc/hpckbd.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 196dd0a5033d -r 181e29fb1f9a sys/dev/hpc/hpckbd.c
--- a/sys/dev/hpc/hpckbd.c Tue Sep 18 02:00:06 2018 +0000
+++ b/sys/dev/hpc/hpckbd.c Tue Sep 18 02:58:10 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hpckbd.c,v 1.32 2017/08/07 23:57:40 uwe Exp $ */
+/* $NetBSD: hpckbd.c,v 1.33 2018/09/18 02:58:10 rin 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.32 2017/08/07 23:57:40 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.33 2018/09/18 02:58:10 rin 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,10 @@
* 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.
+ * is directly mapped. For mips, read-only data is mapped
+ * read/write at the moment.
*/
desc = (struct wscons_keydesc *)__UNCONST(hpckbd_keymapdata.keydesc);
for (i = 0; desc[i].name != 0; i++) {
Home |
Main Index |
Thread Index |
Old Index