Module Name: src Committed By: christos Date: Mon Mar 24 19:10:34 UTC 2014
Modified Files: src/sys/arch/sgimips/dev: scn.c zs.c src/sys/arch/sgimips/sgimips: machdep.c Log Message: - use cpu_{g,s}etmodel - fix unused To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/dev/scn.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sgimips/dev/zs.c cvs rdiff -u -r1.139 -r1.140 src/sys/arch/sgimips/sgimips/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/sgimips/dev/scn.c diff -u src/sys/arch/sgimips/dev/scn.c:1.5 src/sys/arch/sgimips/dev/scn.c:1.6 --- src/sys/arch/sgimips/dev/scn.c:1.5 Sun Mar 16 01:20:25 2014 +++ src/sys/arch/sgimips/dev/scn.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $ */ +/* $NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $ */ /* * Resurrected from the old pc532 port 1/18/2009. @@ -92,7 +92,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -517,6 +517,7 @@ scn_setchip(struct scn_softc *sc) u_char temp; /* start C/T running */ temp = dp->base[DU_CSTRT]; + __USE(temp); } dp->ocounter = dp->counter; } @@ -806,7 +807,7 @@ scn_attach(device_t parent, device_t sel int channel; int speed; int s; - int maj; + int maj __diagused; u_char unit; u_char duartno; u_char delim = ':'; @@ -1080,7 +1081,6 @@ scnopen(dev_t dev, int flags, int mode, int unit = DEV_UNIT(dev); struct scn_softc *sc; int error = 0; - int hwset = 0; if (unit >= scn_cd.cd_ndevs) return ENXIO; @@ -1130,7 +1130,6 @@ scnopen(dev_t dev, int flags, int mode, /* enable receiver interrupts */ scn_rxenable(sc); - hwset = 1; /* set carrier state; */ if ((sc->sc_swflags & SCN_SW_SOFTCAR) || /* check ttyflags */ @@ -1670,15 +1669,10 @@ scnioctl(dev_t dev, u_long cmd, void *da case TIOCMGET: { int bits; - unsigned char ip, op; + unsigned char ip; /* s = spltty(); */ ip = sc->sc_duart->base[DU_IP]; - /* - * XXX sigh; cannot get op current state!! even if - * maintained in private, RTS is done in h/w!! - */ - op = 0; /* splx(s); */ bits = 0; @@ -1688,6 +1682,11 @@ scnioctl(dev_t dev, u_long cmd, void *da bits |= TIOCM_CTS; #if 0 + /* + * XXX sigh; cannot get op current state!! even if + * maintained in private, RTS is done in h/w!! + */ + unsigned char op = 0; if (op & sc->sc_op_dtr) bits |= TIOCM_DTR; if (op & sc->sc_op_rts) Index: src/sys/arch/sgimips/dev/zs.c diff -u src/sys/arch/sgimips/dev/zs.c:1.37 src/sys/arch/sgimips/dev/zs.c:1.38 --- src/sys/arch/sgimips/dev/zs.c:1.37 Sun Feb 20 02:59:50 2011 +++ src/sys/arch/sgimips/dev/zs.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -444,7 +444,7 @@ zs_get_speed(struct zs_chanstate *cs) int zs_set_speed(struct zs_chanstate *cs, int bps) { - int tconst, real_bps; + int tconst; #if 0 while (!(zs_read_csr(cs) & ZSRR0_TX_READY)) @@ -464,11 +464,11 @@ zs_set_speed(struct zs_chanstate *cs, in if (tconst < 0) return (EINVAL); +#if 0 /* Convert back to make sure we can do it. */ - real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst); + int real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst); /* XXX - Allow some tolerance here? */ -#if 0 if (real_bps != bps) return (EINVAL); #endif Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.139 src/sys/arch/sgimips/sgimips/machdep.c:1.140 --- src/sys/arch/sgimips/sgimips/machdep.c:1.139 Mon Dec 16 10:45:29 2013 +++ src/sys/arch/sgimips/sgimips/machdep.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -63,6 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include <sys/kcore.h> #include <sys/boot_flag.h> #include <sys/ksyms.h> +#include <sys/cpu.h> #include <uvm/uvm_extern.h> @@ -285,7 +286,7 @@ mach_init(int argc, int32_t argv32[], ui #endif } - strcpy(cpu_model, arcbios_system_identifier); + cpu_setmodel("%s", arcbios_system_identifier); uvm_setpagesize();