Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Another general cleanup:
details: https://anonhg.NetBSD.org/src/rev/014dd639a74c
branches: trunk
changeset: 473559:014dd639a74c
user: eeh <eeh%NetBSD.org@localhost>
date: Mon Jun 07 05:28:03 1999 +0000
description:
Another general cleanup:
Remove the entire idea of fasttrap interrupts since V9 traps are really cheap,
the CPUs are really fast, and the completely different trap frames would make
these handlers really difficult to implement.
pmap_changeprot() was only used by the clock and one other place; deprecate it.
probeget() and probeset() now take 64-bit addresses even in 32-bit mode so we
can probe IO locations by physical addresses.
Some pmap cleanup.
Some more copyright cleanup.
diffstat:
sys/arch/sparc64/conf/NONPLUS | 4 +-
sys/arch/sparc64/dev/bwtwo.c | 4 +-
sys/arch/sparc64/dev/ebus_bus.c | 7 +--
sys/arch/sparc64/dev/fd.c | 7 +--
sys/arch/sparc64/dev/psycho_bus.c | 7 +--
sys/arch/sparc64/dev/sbus.c | 31 ++++++++++++--
sys/arch/sparc64/dev/sbusreg.h | 37 ++--------------
sys/arch/sparc64/dev/upa.c | 7 +--
sys/arch/sparc64/include/bus.h | 4 +-
sys/arch/sparc64/include/cpu.h | 11 +----
sys/arch/sparc64/include/param.h | 29 ++++++++++++-
sys/arch/sparc64/include/pmap.h | 5 +-
sys/arch/sparc64/include/trap.h | 32 ++------------
sys/arch/sparc64/sparc64/clock.c | 17 +++++--
sys/arch/sparc64/sparc64/intr.c | 50 +-----------------------
sys/arch/sparc64/sparc64/machdep.c | 7 +--
sys/arch/sparc64/sparc64/pmap.c | 80 ++++++++++++++++++++-----------------
17 files changed, 137 insertions(+), 202 deletions(-)
diffs (truncated from 747 to 300 lines):
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/conf/NONPLUS
--- a/sys/arch/sparc64/conf/NONPLUS Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/conf/NONPLUS Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NONPLUS,v 1.14 1999/06/05 20:38:24 eeh Exp $
+# $NetBSD: NONPLUS,v 1.15 1999/06/07 05:28:03 eeh Exp $
include "arch/sparc64/conf/std.sparc64"
@@ -134,7 +134,7 @@
options EXEC_ELF32 # Exec module for SunOS 5.x binaries.
#options EXEC_ELF64 # Exec module for SunOS 5.x binaries.
options SYSCALL_DEBUG
-options COMPAT_AOUT # NetBSD/sparc compat support
+#options COMPAT_AOUT # NetBSD/sparc compat support
options EXEC_AOUT # execve(2) support for a.out binaries
## File systems. You probably need at least one of FFS or NFS.
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/bwtwo.c
--- a/sys/arch/sparc64/dev/bwtwo.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/bwtwo.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwtwo.c,v 1.7 1999/06/05 05:05:11 mrg Exp $ */
+/* $NetBSD: bwtwo.c,v 1.8 1999/06/07 05:28:03 eeh Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@@ -157,7 +157,7 @@
/*
* Make sure there's hardware there.
*/
- if (probeget(ASI_PRIMARY, ra->ra_vaddr, 4) == -1)
+ if (probeget(ra->ra_vaddr, ASI_PRIMARY, 4) == -1)
return (0);
#if defined(SUN4)
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/ebus_bus.c
--- a/sys/arch/sparc64/dev/ebus_bus.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/ebus_bus.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ebus_bus.c,v 1.1 1999/06/04 13:29:13 mrg Exp $ */
+/* $NetBSD: ebus_bus.c,v 1.2 1999/06/07 05:28:03 eeh Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -394,10 +394,7 @@
ih->ih_number = ino;
ih->ih_pil = ino_to_ipl_table[ino];
DPRINTF(EDB_INTR, ("; installing handler %p with ino %u pil %u\n", handler, (u_int)ino, (u_int)ih->ih_pil));
- if ((flags & BUS_INTR_ESTABLISH_FASTTRAP) != 0)
- intr_fasttrap(ih->ih_pil, (void (*)__P((void)))handler);
- else
- intr_establish(ih->ih_pil, ih);
+ intr_establish(ih->ih_pil, ih);
return (ih);
#else
return (0);
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/fd.c
--- a/sys/arch/sparc64/dev/fd.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/fd.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.7 1999/06/05 21:58:17 eeh Exp $ */
+/* $NetBSD: fd.c,v 1.8 1999/06/07 05:28:03 eeh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@@ -393,14 +393,9 @@
TAILQ_INIT(&fdc->sc_drives);
pri = ca->ca_ra.ra_intr[0].int_pri;
-#ifdef FDC_C_HANDLER
fdc->sc_hih.ih_fun = (void *)fdchwintr;
fdc->sc_hih.ih_arg = fdc;
intr_establish(pri, &fdc->sc_hih);
-#else
- fdciop = &fdc->sc_io;
- intr_fasttrap(pri, fdchwintr);
-#endif
fdc->sc_sih.ih_fun = (void *)fdcswintr;
fdc->sc_sih.ih_arg = fdc;
intr_establish(PIL_FDSOFT, &fdc->sc_sih);
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/psycho_bus.c
--- a/sys/arch/sparc64/dev/psycho_bus.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/psycho_bus.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psycho_bus.c,v 1.1 1999/06/04 13:42:14 mrg Exp $ */
+/* $NetBSD: psycho_bus.c,v 1.2 1999/06/07 05:28:03 eeh Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -501,10 +501,7 @@
ih->ih_number = ino;
ih->ih_pil = ino_to_ipl_table[ino];
DPRINTF(PDB_INTR, ("; installing handler %p with ino %u pil %u\n", handler, (u_int)ino, (u_int)ih->ih_pil));
- if ((flags & BUS_INTR_ESTABLISH_FASTTRAP) != 0)
- intr_fasttrap(ih->ih_pil, (void (*)__P((void)))handler);
- else
- intr_establish(ih->ih_pil, ih);
+ intr_establish(ih->ih_pil, ih);
return (ih);
}
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/sbus.c
--- a/sys/arch/sparc64/dev/sbus.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/sbus.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbus.c,v 1.17 1999/06/05 05:30:43 mrg Exp $ */
+/* $NetBSD: sbus.c,v 1.18 1999/06/07 05:28:03 eeh Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -81,6 +81,30 @@
*/
/*
+ * Copyright (c) 1999 Eduardo Horvath
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+
+/*
* Sbus stuff.
*/
#include "opt_ddb.h"
@@ -862,10 +886,7 @@
ih->ih_arg = arg;
ih->ih_number = vec;
ih->ih_pil = (1<<ipl);
- if ((flags & BUS_INTR_ESTABLISH_FASTTRAP) != 0)
- intr_fasttrap(ipl, (void (*)__P((void)))handler);
- else
- intr_establish(ipl, ih);
+ intr_establish(ipl, ih);
return (ih);
}
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/sbusreg.h
--- a/sys/arch/sparc64/dev/sbusreg.h Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/sbusreg.h Mon Jun 07 05:28:03 1999 +0000
@@ -1,38 +1,18 @@
-/* $NetBSD: sbusreg.h,v 1.6 1999/05/24 00:25:31 mrg Exp $ */
+/* $NetBSD: sbusreg.h,v 1.7 1999/06/07 05:28:03 eeh Exp $ */
/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
+ * Copyright (c) 1996-1999 Eduardo Horvath
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -41,15 +21,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)sbusreg.h 8.1 (Berkeley) 6/11/93
*/
+
/*
- * Sun-4c S-bus definitions. (Should be made generic!)
- *
- * Sbus slot 0 is not a separate slot; it talks to the onboard I/O devices.
- * It is, however, addressed just like any `real' Sbus.
- *
* Sbus device addresses are obtained from the FORTH PROMs. They come
* in `absolute' and `relative' address flavors, so we have to handle both.
* Relative addresses do *not* include the slot number.
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/dev/upa.c
--- a/sys/arch/sparc64/dev/upa.c Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/dev/upa.c Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: upa.c,v 1.4 1998/09/05 23:57:25 eeh Exp $ */
+/* $NetBSD: upa.c,v 1.5 1999/06/07 05:28:04 eeh Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -810,10 +810,7 @@
ih->ih_fun = handler;
ih->ih_arg = arg;
- if ((flags & BUS_INTR_ESTABLISH_FASTTRAP) != 0)
- intr_fasttrap(ipl, (void (*)__P((void)))handler);
- else
- intr_establish(ipl, ih);
+ intr_establish(ipl, ih);
return (ih);
}
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/include/bus.h
--- a/sys/arch/sparc64/include/bus.h Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/include/bus.h Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.12 1999/06/05 20:38:25 eeh Exp $ */
+/* $NetBSD: bus.h,v 1.13 1999/06/07 05:28:04 eeh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
/*
- * Copyright (c) 1997, 1998 Eduardo E. Horvath. All rights reserved.
+ * Copyright (c) 1997-1999 Eduardo E. Horvath. All rights reserved.
* Copyright (c) 1996 Charles M. Hannum. All rights reserved.
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
*
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/include/cpu.h
--- a/sys/arch/sparc64/include/cpu.h Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/include/cpu.h Mon Jun 07 05:28:03 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.9 1999/06/05 21:58:18 eeh Exp $ */
+/* $NetBSD: cpu.h,v 1.10 1999/06/07 05:28:04 eeh Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -155,15 +155,6 @@
void intr_establish __P((int level, struct intrhand *));
-/*
- * intr_fasttrap() is a lot like intr_establish, but is used for ``fast''
- * interrupt vectors (vectors that are not shared and are handled in the
- * trap window). Such functions must be written in assembly.
- *
- * This should be removed for sun4u.
- */
-void intr_fasttrap __P((int level, void (*vec)(void)));
-
/* disksubr.c */
struct dkbad;
int isbad __P((struct dkbad *bt, int, int, int));
diff -r b6bb7ef5e710 -r 014dd639a74c sys/arch/sparc64/include/param.h
--- a/sys/arch/sparc64/include/param.h Mon Jun 07 05:08:25 1999 +0000
+++ b/sys/arch/sparc64/include/param.h Mon Jun 07 05:28:03 1999 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: param.h,v 1.10 1999/06/05 21:58:18 eeh Exp $ */
+/* $NetBSD: param.h,v 1.11 1999/06/07 05:28:04 eeh Exp $ */
/*
- * Copyright (c) 1992-1999
+ * Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This software was developed by the Computer Systems Engineering group
@@ -44,6 +44,31 @@
* @(#)param.h 8.1 (Berkeley) 6/11/93
*/
+/*
Home |
Main Index |
Thread Index |
Old Index