diff options
-rw-r--r-- | sys/arch/mvmeppc/dev/bugtty.c | 3 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/clock.c | 9 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/cpu.c | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/mainbus.c | 5 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/mem.c | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/openpic.c | 21 | ||||
-rw-r--r-- | sys/arch/mvmeppc/dev/raven.c | 5 | ||||
-rw-r--r-- | sys/arch/mvmeppc/include/cpu.h | 14 | ||||
-rw-r--r-- | sys/arch/mvmeppc/include/disklabel.h | 3 | ||||
-rw-r--r-- | sys/arch/mvmeppc/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 55 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/mvmeppc/pci/mpcpcibr.c | 18 | ||||
-rw-r--r-- | sys/arch/mvmeppc/pci/pchb.c | 4 |
15 files changed, 67 insertions, 97 deletions
diff --git a/sys/arch/mvmeppc/dev/bugtty.c b/sys/arch/mvmeppc/dev/bugtty.c index fc38b8f9127..0b919b28a54 100644 --- a/sys/arch/mvmeppc/dev/bugtty.c +++ b/sys/arch/mvmeppc/dev/bugtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugtty.c,v 1.1 2001/06/26 21:57:40 smurph Exp $ */ +/* $OpenBSD: bugtty.c,v 1.2 2001/11/06 22:45:54 miod Exp $ */ /* Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. * All rights reserved. @@ -102,7 +102,6 @@ bugttymatch(parent, self, aux) void *self; void *aux; { - struct confargs *ca = aux; return (1); } diff --git a/sys/arch/mvmeppc/dev/clock.c b/sys/arch/mvmeppc/dev/clock.c index 1d3434d0ed9..604912e9dd4 100644 --- a/sys/arch/mvmeppc/dev/clock.c +++ b/sys/arch/mvmeppc/dev/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.2 2001/07/06 05:14:29 smurph Exp $ */ +/* $OpenBSD: clock.c,v 1.3 2001/11/06 22:45:54 miod Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -34,6 +34,7 @@ #include <sys/param.h> #include <sys/kernel.h> +#include <sys/systm.h> #include <machine/pio.h> #include <machine/intr.h> @@ -245,7 +246,9 @@ resettodr() } } +#if 0 static unsigned cnt = 1001; +#endif void decr_intr(frame) struct clockframe *frame; @@ -264,7 +267,7 @@ struct clockframe *frame; #if 0 cnt++; if (cnt > 1000) { - printf("derc int\n"); + printf("decr int\n"); cnt = 0; } #endif @@ -329,8 +332,6 @@ cpu_initclocks() void calc_delayconst() { - int qhandle, phandle; - char name[32]; int msr, scratch; ticks_per_sec = ppc_tps(); diff --git a/sys/arch/mvmeppc/dev/cpu.c b/sys/arch/mvmeppc/dev/cpu.c index 9ab192427bd..01b1d10690e 100644 --- a/sys/arch/mvmeppc/dev/cpu.c +++ b/sys/arch/mvmeppc/dev/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.2 2001/09/02 19:40:45 miod Exp $ */ +/* $OpenBSD: cpu.c,v 1.3 2001/11/06 22:45:54 miod Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -78,9 +78,11 @@ cpuattach(parent, dev, aux) void *aux; { int cpu, pvr; +#ifdef OFW char name[32]; int qhandle, phandle; unsigned int clock_freq = 0; +#endif __asm__ ("mfpvr %0" : "=r"(pvr)); cpu = pvr >> 16; diff --git a/sys/arch/mvmeppc/dev/mainbus.c b/sys/arch/mvmeppc/dev/mainbus.c index 968d1cd5a78..53c8bb892a2 100644 --- a/sys/arch/mvmeppc/dev/mainbus.c +++ b/sys/arch/mvmeppc/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.1 2001/06/26 21:57:41 smurph Exp $ */ +/* $OpenBSD: mainbus.c,v 1.2 2001/11/06 22:45:54 miod Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -64,8 +64,6 @@ mbmatch(parent, cfdata, aux) void *cfdata; void *aux; { - struct cfdata *cf = cfdata; - /* * That one mainbus is always here. */ @@ -84,7 +82,6 @@ mbattach(parent, self, aux) { struct mainbus_softc *sc = (struct mainbus_softc *)self; struct confargs nca; - extern int system_type; printf("\n"); diff --git a/sys/arch/mvmeppc/dev/mem.c b/sys/arch/mvmeppc/dev/mem.c index 08402622c05..9a8d4b7a583 100644 --- a/sys/arch/mvmeppc/dev/mem.c +++ b/sys/arch/mvmeppc/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.4 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.5 2001/11/06 22:45:54 miod Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -89,7 +89,7 @@ mmrw(dev, uio, flags) struct uio *uio; int flags; { - vm_offset_t o, v; + vm_offset_t v; u_int c; struct iovec *iov; int error = 0; diff --git a/sys/arch/mvmeppc/dev/openpic.c b/sys/arch/mvmeppc/dev/openpic.c index b4597a53ff6..50130548f12 100644 --- a/sys/arch/mvmeppc/dev/openpic.c +++ b/sys/arch/mvmeppc/dev/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.5 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: openpic.c,v 1.6 2001/11/06 22:45:54 miod Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -90,7 +90,6 @@ static char *intr_typename(int type); static void intr_calculatemasks(); static __inline int cntlzw(int x); static int mapirq(int irq); -static int read_irq(); void openpic_enable_irq_mask(int irq_mask); static struct raven_reg *ravenp = (struct raven_reg *)NULL; @@ -138,11 +137,11 @@ struct pci_route { int pci; int openpic; } pci_routes[] = { - 10, 2, - 11, 4, - 14, 3, - 15, 5, - 0, 0, + { 10, 2 }, + { 11, 4 }, + { 14, 3 }, + { 15, 5 }, + { 0, 0 } }; static int isaintrs = 0; @@ -153,8 +152,6 @@ struct device *parent; void *cf; void *aux; { - struct confargs *ca = aux; - /* We must be a child of the raven device */ if (strcmp(parent->dv_cfdata->cf_driver->cd_name, "raven") != 0) return (0); @@ -192,8 +189,6 @@ openpic_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct confargs *ca = aux; - struct openpic_softc *sc = (void *)self; extern intr_establish_t *intr_establish_func; extern intr_disestablish_t *intr_disestablish_func; #if 0 @@ -847,9 +842,9 @@ int irq, type; } else { icu2_val &= ~(1 << (irq - 8)); if (type == IST_LEVEL) { - elcr2_val |= (1 << irq - 8); + elcr2_val |= (1 << (irq - 8)); } else { - elcr2_val &= ~(1 << irq - 8); + elcr2_val &= ~(1 << (irq - 8)); } } i8259_set_irq_mask(); diff --git a/sys/arch/mvmeppc/dev/raven.c b/sys/arch/mvmeppc/dev/raven.c index d6d16d81887..c6139eeb5bc 100644 --- a/sys/arch/mvmeppc/dev/raven.c +++ b/sys/arch/mvmeppc/dev/raven.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raven.c,v 1.2 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: raven.c,v 1.3 2001/11/06 22:45:54 miod Exp $ */ /* * Copyright (c) 2001 Steve Murphree, Jr. @@ -65,7 +65,6 @@ raven_match(parent, match, aux) struct device *parent; void *match, *aux; { - struct confargs *ca = aux; unsigned *reg = (unsigned *)RAVEN_REG; /* check for a live address */ @@ -84,8 +83,6 @@ raven_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct raven_softc *sc = (struct raven_softc *)self; - struct confargs *ca = aux; struct mpic_feature *feature = (struct mpic_feature *)MPCIC_FEATURE; /* set system type */ diff --git a/sys/arch/mvmeppc/include/cpu.h b/sys/arch/mvmeppc/include/cpu.h index e51c1708603..278051c2110 100644 --- a/sys/arch/mvmeppc/include/cpu.h +++ b/sys/arch/mvmeppc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.2 2001/09/02 19:40:24 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.3 2001/11/06 22:45:57 miod Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -38,10 +38,8 @@ #define CACHELINESIZE 32 /* For now XXX */ -extern __inline void -syncicache(from, len) - void *from; - int len; +static __inline void +syncicache(void *from, int len) { int l = len; char *p = from; @@ -60,10 +58,8 @@ syncicache(from, len) __asm__ __volatile__ ("isync"); } -extern __inline void -invdcache(from, len) - void *from; - int len; +static __inline void +invdcache(void *from, int len) { int l = len; char *p = from; diff --git a/sys/arch/mvmeppc/include/disklabel.h b/sys/arch/mvmeppc/include/disklabel.h index 61ccca25afe..44a54eae871 100644 --- a/sys/arch/mvmeppc/include/disklabel.h +++ b/sys/arch/mvmeppc/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.1 2001/06/26 21:57:44 smurph Exp $ */ +/* $OpenBSD: disklabel.h,v 1.2 2001/11/06 22:45:57 miod Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -100,7 +100,6 @@ get_le(p) void *p; #endif { - u_int32_t c; u_int8_t *_p = (u_int8_t *)p; int x; x = _p[0]; diff --git a/sys/arch/mvmeppc/include/vmparam.h b/sys/arch/mvmeppc/include/vmparam.h index 418d3cda2da..c036d1c2392 100644 --- a/sys/arch/mvmeppc/include/vmparam.h +++ b/sys/arch/mvmeppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.5 2001/09/22 18:00:10 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.6 2001/11/06 22:45:57 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -96,7 +96,7 @@ extern vm_offset_t ppc_kvm_size; #define VM_KERN_ADDRESS_SIZE (ppc_kvm_size) #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)((KERNEL_SR << ADDR_SR_SHFT) \ - + VM_KERN_ADDRESS_SIZE)) + + SEGMENT_LENGTH)) #define VM_KMEM_SIZE (NKMEMCLUSTERS * PAGE_SIZE) #define VM_MBUF_SIZE (NMBCLUSTERS * PAGE_SIZE) diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c index 12e899e43fd..797709db486 100644 --- a/sys/arch/mvmeppc/mvmeppc/disksubr.c +++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.1 2001/06/26 21:57:53 smurph Exp $ */ +/* $OpenBSD: disksubr.c,v 1.2 2001/11/06 22:46:00 miod Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -337,8 +337,8 @@ setdisklabel(olp, nlp, openmask, osdep) u_long openmask; struct cpu_disklabel *osdep; { - register i; - register struct partition *opp, *npp; + int i; + struct partition *opp, *npp; /* sanity clause */ if (nlp->d_secpercyl == 0 || nlp->d_secsize == 0 || diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 6c96354353f..1e8d8c5b3a1 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.11 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.12 2001/11/06 22:46:00 miod Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -31,7 +31,9 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* #include "machine/ipkdb.h" +*/ #include <sys/param.h> #include <sys/buf.h> @@ -175,27 +177,23 @@ initppc(startkernel, endkernel, args) u_int startkernel, endkernel; char *args; { - int phandle, qhandle; - char name[32]; - struct machvec *mp; - extern trapcode, trapsize; - extern dsitrap, dsisize; - extern isitrap, isisize; - extern alitrap, alisize; - extern decrint, decrsize; - extern tlbimiss, tlbimsize; - extern tlbdlmiss, tlbdlmsize; - extern tlbdsmiss, tlbdsmsize; + extern caddr_t trapcode, trapsize; + extern caddr_t dsitrap, dsisize; + extern caddr_t isitrap, isisize; + extern caddr_t alitrap, alisize; + extern caddr_t decrint, decrsize; + extern caddr_t tlbimiss, tlbimsize; + extern caddr_t tlbdlmiss, tlbdlmsize; + extern caddr_t tlbdsmiss, tlbdsmsize; #ifdef DDB - extern ddblow, ddbsize; + extern caddr_t ddblow, ddbsize; #endif #if NIPKDB > 0 - extern ipkdblow, ipkdbsize; + extern caddr_t ipkdblow, ipkdbsize; #endif extern void consinit __P((void)); extern void callback __P((void *)); int exc, scratch; - u_int32_t msr; proc0.p_addr = proc0paddr; bzero(proc0.p_addr, sizeof *proc0.p_addr); @@ -471,7 +469,7 @@ void install_extint(handler) void (*handler) __P((void)); { - extern extint, extsize; + extern caddr_t extint, extsize; extern u_long extint_call; u_long offset = (u_long)handler - (u_long)&extint_call; int omsr, msr; @@ -709,7 +707,9 @@ sendsig(catcher, sig, mask, code, type, val) struct sigframe *fp, frame; struct sigacts *psp = p->p_sigacts; int oldonstack; +#if WHEN_WE_ONLY_FLUSH_DATA_WHEN_DOING_PMAP_ENTER int pa; +#endif frame.sf_signum = sig; @@ -774,7 +774,7 @@ sys_sigreturn(p, v, retval) struct trapframe *tf; int error; - if (error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) + if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) != 0) return error; tf = trapframe(p); if ((sc.sc_frame.srr1 & PSL_USERSTATIC) != (tf->srr1 & PSL_USERSTATIC)) @@ -891,7 +891,7 @@ boot(howto) { static int syncing; static char str[256]; - char *ap = str, *ap1 = ap; + char *ap = str; boothowto = howto; if (!cold && !(howto & RB_NOSYNC) && !syncing) { @@ -1202,12 +1202,9 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) bpa, size, *bshp, spa); #endif for (; len > 0; len -= NBPG) { -#if 0 - pmap_enter(vm_map_pmap(phys_map), vaddr, spa, -#else - pmap_enter(pmap_kernel(), vaddr, spa, -#endif - VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED /* XXX */); + pmap_kenter_cache(vaddr, spa, + VM_PROT_READ | VM_PROT_WRITE, + cacheable ? PMAP_CACHE_WT : PMAP_CACHE_DEFAULT); spa += NBPG; vaddr += NBPG; } @@ -1240,12 +1237,8 @@ mapiodev(pa, len) return NULL; for (; size > 0; size -= NBPG) { -#if 0 - pmap_enter(vm_map_pmap(phys_map), vaddr, spa, -#else - pmap_enter(pmap_kernel(), vaddr, spa, -#endif - VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED/* XXX */); + pmap_kenter_cache(vaddr, spa, + VM_PROT_READ | VM_PROT_WRITE, PMAP_CACHE_DEFAULT); spa += NBPG; vaddr += NBPG; } @@ -1407,7 +1400,7 @@ kcopy(from, to, size) register void *oldh = curproc->p_addr->u_pcb.pcb_onfault; if (setfault(env)) { - curpcb->pcb_onfault = 0; + curproc->p_addr->u_pcb.pcb_onfault = oldh; return EFAULT; } bcopy(from, to, size); diff --git a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c index 6ebc0816507..29c786e462c 100644 --- a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppc1_machdep.c,v 1.3 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: ppc1_machdep.c,v 1.4 2001/11/06 22:46:00 miod Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -102,7 +102,11 @@ size_memory(void) volatile unsigned int *look; unsigned int *max; extern char *end; - vm_offset_t local_mem, total_mem; + vm_offset_t total_mem; +#ifdef USE_BUG + vm_offset_t local_mem; +#endif + #ifdef USE_BUG bugenvrd(); /* read the bug environment */ local_mem = (vm_offset_t)bug_localmemsize(); @@ -161,7 +165,6 @@ void PPC1_mem_regions(memp, availp) struct mem_region **memp, **availp; { - int phandle, i, j, cnt; extern int avail_start; bzero(&PPC1mem[0], sizeof(struct mem_region) * PPC1_REGIONS); diff --git a/sys/arch/mvmeppc/pci/mpcpcibr.c b/sys/arch/mvmeppc/pci/mpcpcibr.c index 63bbb46a26c..6a075a6b785 100644 --- a/sys/arch/mvmeppc/pci/mpcpcibr.c +++ b/sys/arch/mvmeppc/pci/mpcpcibr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibr.c,v 1.6 2001/11/06 19:53:15 miod Exp $ */ +/* $OpenBSD: mpcpcibr.c,v 1.7 2001/11/06 22:46:00 miod Exp $ */ /* * Copyright (c) 2001 Steve Murphree, Jr. @@ -134,9 +134,6 @@ mpcpcibrmatch(parent, match, aux) struct device *parent; void *match, *aux; { - struct confargs *ca = aux; - int found = 0; - /* We must be a child of the raven device */ if (strcmp(parent->dv_cfdata->cf_driver->cd_name, "raven") != 0) return (0); @@ -154,12 +151,9 @@ struct device *parent, *self; void *aux; { struct pcibr_softc *sc = (struct pcibr_softc *)self; - struct confargs *ca = aux; struct pcibr_config *lcp; struct pcibus_attach_args pba; - int map, node; char *bridge; - int of_node = 0; lcp = sc->sc_pcibr = &mpc_config; @@ -397,7 +391,7 @@ int offset; } } else { - /* config mechanism #2, type 0 + /* config mechanism #2, type 0 */ /* standard cf8/cfc config */ reg = 0x80000000 | tag | offset; @@ -416,9 +410,7 @@ int offset; pcireg_t data; u_int32_t reg; - int device; int s; - int handle; int daddr = 0; if (offset & 3 || offset < 0 || offset >= 0x100) { @@ -469,7 +461,6 @@ pcireg_t data; struct pcibr_config *cp = cpv; u_int32_t reg; int s; - int handle; int daddr = 0; reg = mpc_gen_config_reg(cpv, tag, offset); @@ -511,12 +502,7 @@ pcitag_t bustag; int buspin, line; pci_intr_handle_t *ihp; { - struct pcibr_config *lcp = lcv; - pci_chipset_tag_t pc = &lcp->lc_pc; int error = 0; - int route; - int lvl; - int device; *ihp = -1; if (buspin == 0) { diff --git a/sys/arch/mvmeppc/pci/pchb.c b/sys/arch/mvmeppc/pci/pchb.c index 44de308f550..0fa85f3183f 100644 --- a/sys/arch/mvmeppc/pci/pchb.c +++ b/sys/arch/mvmeppc/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.2 2001/07/04 08:31:33 niklas Exp $ */ +/* $OpenBSD: pchb.c,v 1.3 2001/11/06 22:46:00 miod Exp $ */ /* $NetBSD: pchb.c,v 1.4 2000/01/25 07:19:11 tsubai Exp $ */ /*- @@ -88,8 +88,10 @@ pchbattach(parent, self, aux) struct device *parent, *self; void *aux; { + /* struct pci_attach_args *pa = aux; char devinfo[256]; + */ printf("\n"); |