Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha be more consistent about use of 'cputype'. e...
details: https://anonhg.NetBSD.org/src/rev/a2c795acd6c3
branches: trunk
changeset: 471745:a2c795acd6c3
user: cgd <cgd%NetBSD.org@localhost>
date: Sat Apr 10 01:21:36 1999 +0000
description:
be more consistent about use of 'cputype'. e.g. it's in a header, don't
bother 'externing' it everywhere!
diffstat:
sys/arch/alpha/a12/if_ade.c | 4 +---
sys/arch/alpha/alpha/cpuconf.c | 4 +---
sys/arch/alpha/alpha/machdep.c | 12 ++++++++++--
sys/arch/alpha/alpha/pmap.c | 5 ++---
sys/arch/alpha/mcbus/mcbus.c | 5 ++---
sys/arch/alpha/pci/apecs.c | 6 +++---
sys/arch/alpha/pci/cia.c | 12 ++++++------
sys/arch/alpha/pci/lca.c | 6 +++---
sys/arch/alpha/tc/ioasic.c | 6 ++----
sys/arch/alpha/tc/scc.c | 5 ++---
sys/arch/alpha/tc/tcasic.c | 6 ++----
sys/arch/alpha/tc/tcds.c | 7 ++-----
sys/arch/alpha/tlsb/gbus.c | 6 ++----
sys/arch/alpha/tlsb/tlsb.c | 6 ++----
14 files changed, 40 insertions(+), 50 deletions(-)
diffs (truncated from 392 to 300 lines):
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/a12/if_ade.c
--- a/sys/arch/alpha/a12/if_ade.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/a12/if_ade.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ade.c,v 1.1 1998/09/24 05:36:05 ross Exp $ */
+/* $NetBSD: if_ade.c,v 1.2 1999/04/10 01:21:36 cgd Exp $ */
/*
* NOTE: this version of if_de was modified for bounce buffers prior
@@ -208,8 +208,6 @@
* the DEC 21140 PCI Fast Ethernet Controller.
*/
-extern int cputype; /* lcldma on a12 */
-
static void tulip_mii_autonegotiate(tulip_softc_t * const sc, const unsigned phyaddr);
static tulip_intrfunc_t tulip_intr_shared(void *arg);
static tulip_intrfunc_t tulip_intr_normal(void *arg);
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/alpha/cpuconf.c
--- a/sys/arch/alpha/alpha/cpuconf.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/alpha/cpuconf.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuconf.c,v 1.20 1999/03/17 19:00:01 drochner Exp $ */
+/* $NetBSD: cpuconf.c,v 1.21 1999/04/10 01:21:37 cgd Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -177,7 +177,6 @@
void
platform_not_configured()
{
- extern int cputype;
printf("\n");
printf("Support for system type %d is not present in this kernel.\n",
@@ -191,7 +190,6 @@
void
platform_not_supported()
{
- extern int cputype;
const char *typestr;
if (cputype >= ncpuinit)
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/alpha/machdep.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.166 1999/04/01 00:17:45 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.167 1999/04/10 01:21:37 cgd Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.166 1999/04/01 00:17:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.167 1999/04/10 01:21:37 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -425,6 +425,14 @@
* Find out what hardware we're on, and do basic initialization.
*/
cputype = hwrpb->rpb_type;
+ if (cputype < 0) {
+ /*
+ * At least some white-box systems have SRM which
+ * reports a systype that's the negative of their
+ * blue-box counterpart.
+ */
+ cputype = -cputype;
+ }
if (cputype >= ncpuinit) {
platform_not_supported();
/* NOTREACHED */
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.89 1999/04/09 00:38:10 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.90 1999/04/10 01:21:37 cgd Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.89 1999/04/09 00:38:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.90 1999/04/10 01:21:37 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -959,7 +959,6 @@
int
pmap_uses_prom_console()
{
- extern int cputype;
#if defined(NEW_SCC_DRIVER)
return (cputype == ST_DEC_21000 || cputype == ST_DEC_4100);
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/mcbus/mcbus.c
--- a/sys/arch/alpha/mcbus/mcbus.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/mcbus/mcbus.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcbus.c,v 1.4 1998/07/08 00:56:39 mjacob Exp $ */
+/* $NetBSD: mcbus.c,v 1.5 1999/04/10 01:21:38 cgd Exp $ */
/*
* Copyright (c) 1998 by Matthew Jacob
@@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.4 1998/07/08 00:56:39 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.5 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,7 +56,6 @@
#define KV(_addr) ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))
extern struct cfdriver mcbus_cd;
-extern int cputype;
struct mcbus_cpu_busdep mcbus_primary;
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/pci/apecs.c
--- a/sys/arch/alpha/pci/apecs.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/pci/apecs.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apecs.c,v 1.34 1998/06/26 21:45:56 ross Exp $ */
+/* $NetBSD: apecs.c,v 1.35 1999/04/10 01:21:38 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.34 1998/06/26 21:45:56 ross Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.35 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -161,7 +161,7 @@
if (!acp->ac_epic_pass2)
printf("WARNING: 21071-DA NOT PASS2... NO BETS...\n");
- switch (hwrpb->rpb_type) {
+ switch (cputype) {
#ifdef DEC_2100_A50
case ST_DEC_2100_A50:
pci_2100_a50_pickintr(acp);
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/pci/cia.c
--- a/sys/arch/alpha/pci/cia.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/pci/cia.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cia.c,v 1.46 1998/07/29 01:28:44 thorpej Exp $ */
+/* $NetBSD: cia.c,v 1.47 1999/04/10 01:21:38 cgd Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.46 1998/07/29 01:28:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.47 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -179,9 +179,9 @@
* have this: the EB164 systype (AlphaPC164LX and AlphaPC164SX)
* and the DEC_550 systype (Miata).
*/
- if ((hwrpb->rpb_type == ST_EB164 &&
+ if ((cputype == ST_EB164 &&
(hwrpb->rpb_variation & SV_ST_MASK) >= SV_ST_ALPHAPC164LX_400) ||
- hwrpb->rpb_type == ST_DEC_550)
+ cputype == ST_DEC_550)
ccp->cc_flags |= CCF_ISPYXIS;
/*
@@ -298,7 +298,7 @@
printf("%s: using BWX for %s access\n", self->dv_xname, name);
#ifdef DEC_550
- if (hwrpb->rpb_type == ST_DEC_550 &&
+ if (cputype == ST_DEC_550 &&
(hwrpb->rpb_variation & SV_ST_MASK) < SV_ST_MIATA_1_5) {
/*
* Miata 1 systems have a bug: DMA cannot cross
@@ -334,7 +334,7 @@
cia_dma_init(ccp);
- switch (hwrpb->rpb_type) {
+ switch (cputype) {
#ifdef DEC_KN20AA
case ST_DEC_KN20AA:
pci_kn20aa_pickintr(ccp);
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/pci/lca.c
--- a/sys/arch/alpha/pci/lca.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/pci/lca.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lca.c,v 1.32 1998/06/27 10:10:52 thorpej Exp $ */
+/* $NetBSD: lca.c,v 1.33 1999/04/10 01:21:38 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.32 1998/06/27 10:10:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.33 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -175,7 +175,7 @@
lca_dma_init(lcp);
- switch (hwrpb->rpb_type) {
+ switch (cputype) {
#ifdef DEC_AXPPCI_33
case ST_DEC_AXPPCI_33:
pci_axppci_33_pickintr(lcp);
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/tc/ioasic.c
--- a/sys/arch/alpha/tc/ioasic.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/tc/ioasic.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioasic.c,v 1.23 1999/03/17 18:28:11 ross Exp $ */
+/* $NetBSD: ioasic.c,v 1.24 1999/04/10 01:21:38 cgd Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.23 1999/03/17 18:28:11 ross Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.24 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -134,8 +134,6 @@
/* There can be only one. */
int ioasicfound;
-extern int cputype;
-
/*
* DMA area for IOASIC LANCE.
* XXX Should be done differently, but this is better than it used to be.
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/tc/scc.c
--- a/sys/arch/alpha/tc/scc.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/tc/scc.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scc.c,v 1.43 1999/04/06 20:09:18 pk Exp $ */
+/* $NetBSD: scc.c,v 1.44 1999/04/10 01:21:38 cgd Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.43 1999/04/06 20:09:18 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.44 1999/04/10 01:21:38 cgd Exp $");
#include "opt_ddb.h"
#ifdef alpha
@@ -421,7 +421,6 @@
struct termios cterm;
struct tty ctty;
int s;
- extern int cputype;
int unit;
unit = sc->sc_dv.dv_unit;
diff -r bcb2a73e5f28 -r a2c795acd6c3 sys/arch/alpha/tc/tcasic.c
--- a/sys/arch/alpha/tc/tcasic.c Fri Apr 09 23:19:27 1999 +0000
+++ b/sys/arch/alpha/tc/tcasic.c Sat Apr 10 01:21:36 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcasic.c,v 1.25 1998/11/19 02:53:47 ross Exp $ */
+/* $NetBSD: tcasic.c,v 1.26 1999/04/10 01:21:38 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.25 1998/11/19 02:53:47 ross Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.26 1999/04/10 01:21:38 cgd Exp $");
#include <sys/param.h>
Home |
Main Index |
Thread Index |
Old Index