From 2af5fde181ae0e3dd871130b06a8dcde8936f3b6 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 22 Nov 2015 18:44:25 +0000 Subject: [PATCH] Remove \n from set_cpumodel(), and explicitly print \n during boot instead. Fixes dmesg on NetBSD/dreamcast 7.0 (and probably NetBSD/hpcsh 7.0): --- NetBSD 7.0 (GENERIC.201509250726Z) SEGA Dreamcasttotal memory = 16384 KB avail memory = 13668 KB --- which was mangled when cpu_getmode() and cpu_setmodel() were introduced: http://mail-index.netbsd.org/source-changes/2014/03/24/msg053273.html Should be pulled up to netbsd-7 and netbsd-7-0. --- sys/arch/landisk/landisk/machdep.c | 6 +++--- sys/arch/sh3/sh3/sh3_machdep.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index cfc10b748122..8a210fe8020d 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.17 2014/03/24 20:06:32 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.18 2015/11/22 18:44:25 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2014/03/24 20:06:32 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2015/11/22 18:44:25 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -147,7 +147,7 @@ cpu_startup(void) { /* XXX: show model (LANDISK/USL-5P) */ - cpu_setmodel("Model: I-O DATA LANDISK\n"); + cpu_setmodel("Model: I-O DATA LANDISK"); sh_startup(); } diff --git a/sys/arch/sh3/sh3/sh3_machdep.c b/sys/arch/sh3/sh3/sh3_machdep.c index cdc62ba86c58..224a438a4102 100644 --- a/sys/arch/sh3/sh3/sh3_machdep.c +++ b/sys/arch/sh3/sh3/sh3_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: sh3_machdep.c,v 1.102 2014/03/24 20:06:32 christos Exp $ */ +/* $NetBSD: sh3_machdep.c,v 1.103 2015/11/22 18:44:25 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.102 2014/03/24 20:06:32 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.103 2015/11/22 18:44:25 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -277,7 +277,7 @@ sh_startup(void) printf("%s%s", copyright, version); if (*model != '\0') - printf("%s", model); + printf("%s\n", model); #ifdef DEBUG printf("general exception handler:\t%d byte\n", sh_vector_generic_end - sh_vector_generic);