Module Name: src Committed By: tsutsui Date: Sat Oct 9 20:00:42 UTC 2021
Modified Files: src/sys/arch/atari/atari: machdep.c src/sys/arch/cesfic/cesfic: machdep.c src/sys/arch/hp300/hp300: machdep.c src/sys/arch/luna68k/luna68k: machdep.c src/sys/arch/mac68k/mac68k: machdep.c src/sys/arch/mvme68k/mvme68k: machdep.c src/sys/arch/news68k/news68k: machdep.c src/sys/arch/next68k/next68k: machdep.c src/sys/arch/x68k/x68k: machdep.c Log Message: Call cnpollc(9) before cngetc(9) as the cons(9) man page says. Currently most ports do nothing in cnpollc(9), but this is required to handle wskbd(9) .set_leds op in cngetc(9) properly, at least on luna68k. To generate a diff of this commit: cvs rdiff -u -r1.184 -r1.185 src/sys/arch/atari/atari/machdep.c cvs rdiff -u -r1.71 -r1.72 src/sys/arch/cesfic/cesfic/machdep.c cvs rdiff -u -r1.235 -r1.236 src/sys/arch/hp300/hp300/machdep.c cvs rdiff -u -r1.107 -r1.108 src/sys/arch/luna68k/luna68k/machdep.c cvs rdiff -u -r1.362 -r1.363 src/sys/arch/mac68k/mac68k/machdep.c cvs rdiff -u -r1.158 -r1.159 src/sys/arch/mvme68k/mvme68k/machdep.c cvs rdiff -u -r1.109 -r1.110 src/sys/arch/news68k/news68k/machdep.c cvs rdiff -u -r1.115 -r1.116 src/sys/arch/next68k/next68k/machdep.c cvs rdiff -u -r1.206 -r1.207 src/sys/arch/x68k/x68k/machdep.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/arch/atari/atari/machdep.c diff -u src/sys/arch/atari/atari/machdep.c:1.184 src/sys/arch/atari/atari/machdep.c:1.185 --- src/sys/arch/atari/atari/machdep.c:1.184 Sun Jan 3 17:42:10 2021 +++ src/sys/arch/atari/atari/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.184 2021/01/03 17:42:10 thorpej Exp $ */ +/* $NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.184 2021/01/03 17:42:10 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -440,7 +440,10 @@ dumpsys(void) #if defined(DDB) || defined(PANICWAIT) printf("Do you want to dump memory? [y]"); - cnputc(i = cngetc()); + cnpollc(1); + i = cngetc(); + cnpollc(0); + cnputc(i); switch (i) { case 'n': case 'N': Index: src/sys/arch/cesfic/cesfic/machdep.c diff -u src/sys/arch/cesfic/cesfic/machdep.c:1.71 src/sys/arch/cesfic/cesfic/machdep.c:1.72 --- src/sys/arch/cesfic/cesfic/machdep.c:1.71 Thu Jun 11 19:20:43 2020 +++ src/sys/arch/cesfic/cesfic/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.71 2020/06/11 19:20:43 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.72 2021/10/09 20:00:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.71 2020/06/11 19:20:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.72 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_bufcache.h" #include "opt_ddb.h" @@ -337,7 +337,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif @@ -345,7 +347,9 @@ cpu_reboot(int howto, char *bootstr) /* Finally, halt/reboot the system. */ if (howto & RB_HALT) { printf("System halted. Hit any key to reboot.\n\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); } printf("rebooting...\n"); Index: src/sys/arch/hp300/hp300/machdep.c diff -u src/sys/arch/hp300/hp300/machdep.c:1.235 src/sys/arch/hp300/hp300/machdep.c:1.236 --- src/sys/arch/hp300/hp300/machdep.c:1.235 Fri Aug 6 05:22:21 2021 +++ src/sys/arch/hp300/hp300/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.235 2021/08/06 05:22:21 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.236 2021/10/09 20:00:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.235 2021/08/06 05:22:21 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.236 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -612,7 +612,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif @@ -620,7 +622,9 @@ cpu_reboot(int howto, char *bootstr) /* Finally, halt/reboot the system. */ if (howto & RB_HALT) { printf("System halted. Hit any key to reboot.\n\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); } printf("rebooting...\n"); Index: src/sys/arch/luna68k/luna68k/machdep.c diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.107 src/sys/arch/luna68k/luna68k/machdep.c:1.108 --- src/sys/arch/luna68k/luna68k/machdep.c:1.107 Sat Sep 25 15:18:38 2021 +++ src/sys/arch/luna68k/luna68k/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.107 2021/09/25 15:18:38 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2021/09/25 15:18:38 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -472,7 +472,9 @@ haltsys: } if (howto & RB_HALT) { printf("System halted. Hit any key to reboot.\n\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); } printf("rebooting...\n"); Index: src/sys/arch/mac68k/mac68k/machdep.c diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.362 src/sys/arch/mac68k/mac68k/machdep.c:1.363 --- src/sys/arch/mac68k/mac68k/machdep.c:1.362 Wed Apr 28 02:28:05 2021 +++ src/sys/arch/mac68k/mac68k/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.362 2021/04/28 02:28:05 rin Exp $ */ +/* $NetBSD: machdep.c,v 1.363 2021/10/09 20:00:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.362 2021/04/28 02:28:05 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.363 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_adb.h" #include "opt_compat_netbsd.h" @@ -500,7 +500,9 @@ cpu_reboot(int howto, char *bootstr) printf("\n"); printf("The operating system has halted.\n"); printf("Please press any key to reboot.\n\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); } /* Map the last physical page VA = PA for doboot() */ Index: src/sys/arch/mvme68k/mvme68k/machdep.c diff -u src/sys/arch/mvme68k/mvme68k/machdep.c:1.158 src/sys/arch/mvme68k/mvme68k/machdep.c:1.159 --- src/sys/arch/mvme68k/mvme68k/machdep.c:1.158 Thu Jun 11 19:20:44 2020 +++ src/sys/arch/mvme68k/mvme68k/machdep.c Sat Oct 9 20:00:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.158 2020/06/11 19:20:44 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.159 2021/10/09 20:00:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.158 2020/06/11 19:20:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.159 2021/10/09 20:00:41 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_m060sp.h" @@ -654,7 +654,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif Index: src/sys/arch/news68k/news68k/machdep.c diff -u src/sys/arch/news68k/news68k/machdep.c:1.109 src/sys/arch/news68k/news68k/machdep.c:1.110 --- src/sys/arch/news68k/news68k/machdep.c:1.109 Fri Aug 6 05:53:50 2021 +++ src/sys/arch/news68k/news68k/machdep.c Sat Oct 9 20:00:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_compat_netbsd.h" @@ -321,7 +321,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif Index: src/sys/arch/next68k/next68k/machdep.c diff -u src/sys/arch/next68k/next68k/machdep.c:1.115 src/sys/arch/next68k/next68k/machdep.c:1.116 --- src/sys/arch/next68k/next68k/machdep.c:1.115 Thu Jun 11 19:20:44 2020 +++ src/sys/arch/next68k/next68k/machdep.c Sat Oct 9 20:00:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.115 2020/06/11 19:20:44 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.116 2021/10/09 20:00:42 tsutsui Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2020/06/11 19:20:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2021/10/09 20:00:42 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -469,7 +469,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif Index: src/sys/arch/x68k/x68k/machdep.c diff -u src/sys/arch/x68k/x68k/machdep.c:1.206 src/sys/arch/x68k/x68k/machdep.c:1.207 --- src/sys/arch/x68k/x68k/machdep.c:1.206 Fri Aug 6 04:21:56 2021 +++ src/sys/arch/x68k/x68k/machdep.c Sat Oct 9 20:00:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.206 2021/08/06 04:21:56 isaki Exp $ */ +/* $NetBSD: machdep.c,v 1.207 2021/10/09 20:00:42 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.206 2021/08/06 04:21:56 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.207 2021/10/09 20:00:42 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -518,7 +518,9 @@ cpu_reboot(int howto, char *bootstr) #if defined(PANICWAIT) && !defined(DDB) if ((howto & RB_HALT) == 0 && panicstr) { printf("hit any key to reboot...\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); printf("\n"); } #endif @@ -551,7 +553,9 @@ cpu_reboot(int howto, char *bootstr) /* PASSTHROUGH even if came back */ } else if ((howto & RB_HALT) == RB_HALT) { printf("System halted. Hit any key to reboot.\n\n"); + cnpollc(1); (void)cngetc(); + cnpollc(0); } printf("rebooting...\n");