Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/news68k/news68k - use cpu_{g,s}etmodel



details:   https://anonhg.NetBSD.org/src/rev/4eff55dd0c4c
branches:  trunk
changeset: 328045:4eff55dd0c4c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 24 19:54:28 2014 +0000

description:
- use cpu_{g,s}etmodel
- fix unused

diffstat:

 sys/arch/news68k/news68k/autoconf.c  |   7 +++----
 sys/arch/news68k/news68k/bus_space.c |   6 +++---
 sys/arch/news68k/news68k/machdep.c   |  18 ++++++++----------
 3 files changed, 14 insertions(+), 17 deletions(-)

diffs (141 lines):

diff -r e9dc2e6fd8d1 -r 4eff55dd0c4c sys/arch/news68k/news68k/autoconf.c
--- a/sys/arch/news68k/news68k/autoconf.c       Mon Mar 24 19:52:27 2014 +0000
+++ b/sys/arch/news68k/news68k/autoconf.c       Mon Mar 24 19:54:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $    */
+/*     $NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $");
 
 #include "scsibus.h"
 
@@ -124,14 +124,13 @@
 findroot(void)
 {
 #if NSCSIBUS > 0
-       int ctlr, unit, part, type;
+       int ctlr, part, type;
        device_t dv;
 
        if (BOOTDEV_MAG(bootdev) != 5)  /* NEWS-OS's B_DEVMAGIC */
                return;
 
        ctlr = BOOTDEV_CTLR(bootdev);   /* SCSI ID */
-       unit = BOOTDEV_UNIT(bootdev);
        part = BOOTDEV_PART(bootdev);   /* LUN */
        type = BOOTDEV_TYPE(bootdev);
 
diff -r e9dc2e6fd8d1 -r 4eff55dd0c4c sys/arch/news68k/news68k/bus_space.c
--- a/sys/arch/news68k/news68k/bus_space.c      Mon Mar 24 19:52:27 2014 +0000
+++ b/sys/arch/news68k/news68k/bus_space.c      Mon Mar 24 19:54:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $   */
+/*     $NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -151,7 +151,7 @@
                panic("bus_space_probe: unupported data size %d", sz);
                /* NOTREACHED */
        }
-
+       __USE(i);
        nofault = NULL;
        return 1;
 }
diff -r e9dc2e6fd8d1 -r 4eff55dd0c4c sys/arch/news68k/news68k/machdep.c
--- a/sys/arch/news68k/news68k/machdep.c        Mon Mar 24 19:52:27 2014 +0000
+++ b/sys/arch/news68k/news68k/machdep.c        Mon Mar 24 19:54:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $    */
+/*     $NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -64,6 +64,7 @@
 #include <sys/kcore.h>
 #include <sys/ksyms.h>
 #include <sys/module.h>
+#include <sys/cpu.h>
 
 #ifdef DDB
 #include <machine/db_machdep.h>
@@ -245,18 +246,13 @@
        initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char cpu_model[124];
-
 int news_machine_id;
 
 static void
 identifycpu(void)
 {
 
-       printf("SONY NET WORK STATION, Model %s, ", cpu_model);
+       printf("SONY NET WORK STATION, Model %s, ", cpu_getmodel());
        printf("Machine ID #%d\n", news_machine_id);
 
        delay_divisor = (20480 / cpuspeed + 5) / 10; /* XXX */
@@ -645,6 +641,7 @@
        default:
                panic("badaddr: bad request");
        }
+       __USE(i);
        nofault = (int *) 0;
        return 0;
 }
@@ -661,6 +658,7 @@
                return 1;
        }
        i = *(volatile char *)addr;
+       __USE(i);
        nofault = (int *) 0;
        return 0;
 }
@@ -808,7 +806,7 @@
        if (t == NULL)
                panic("unexpected system model.");
 
-       strcat(cpu_model, t);
+       cpu_setmodel("%s", t);
        news_machine_id = (idrom.id_serial[0] << 8) + idrom.id_serial[1];
 
        ctrl_parity     = (uint8_t *)(0xe1080000);
@@ -890,7 +888,7 @@
        for (i = 0; i < sizeof(idrom); i++, p += 2)
                *q++ = ((*p & 0x0f) << 4) | (*(p + 1) & 0x0f);
 
-       strcat(cpu_model, idrom.id_model);
+       cpu_setmodel("%s", idrom.id_model);
        news_machine_id = idrom.id_serial;
 
        cpuspeed = 25;



Home | Main Index | Thread Index | Old Index