diff options
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/dkcsum.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 20 | ||||
-rw-r--r-- | sys/arch/i386/i386/trap.c | 48 | ||||
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_drv.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.h | 4 |
8 files changed, 56 insertions, 43 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index de3e3d7d5fb..9ca69a58faa 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.31 1998/02/19 20:36:40 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.32 1998/02/22 21:35:25 niklas Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -328,7 +328,7 @@ setdisklabel(olp, nlp, openmask, osdep) u_long openmask; struct cpu_disklabel *osdep; { - register i; + register int i; register struct partition *opp, *npp; /* sanity clause */ diff --git a/sys/arch/i386/i386/dkcsum.c b/sys/arch/i386/i386/dkcsum.c index 45cf556fc55..34966196de1 100644 --- a/sys/arch/i386/i386/dkcsum.c +++ b/sys/arch/i386/i386/dkcsum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkcsum.c,v 1.6 1998/01/09 12:14:53 niklas Exp $ */ +/* $OpenBSD: dkcsum.c,v 1.7 1998/02/22 21:35:26 niklas Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -140,7 +140,7 @@ dkcsumattach() "attempting to match with BIOS drive %x csum %x\n", bdi->bios_number, bdi->checksum); #endif - if (bdi->checksum == csum) + if (bdi->checksum == csum) { if (!hit && !(bdi->flags & BDI_PICKED)) hit = bdi; else { @@ -148,6 +148,7 @@ dkcsumattach() printf("dkcsum: warning: " "dup BSD->BIOS disk mapping\n"); } + } } /* diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index f7e20176394..e48879205e0 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.80 1998/02/18 21:13:48 marc Exp $ */ +/* $OpenBSD: machdep.c,v 1.81 1998/02/22 21:35:27 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -215,7 +215,7 @@ static long ioport_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)]; static long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)]; struct extent *ioport_ex; struct extent *iomem_ex; -static ioport_malloc_safe; +static int ioport_malloc_safe; caddr_t allocsys __P((caddr_t)); void setup_buffers __P((vm_offset_t *)); @@ -435,12 +435,13 @@ allocsys(v) * buffers. We allocate 1/2 as many swap buffer headers as file * i/o buffers. */ - if (bufpages == 0) + if (bufpages == 0) { if (physmem < btoc(2 * 1024 * 1024)) bufpages = physmem / (10 * CLSIZE); else bufpages = (btoc(2 * 1024 * 1024) + physmem) / ((100/BUFCACHEPERCENT) * CLSIZE); + } if (nbuf == 0) { nbuf = bufpages; if (nbuf < 16) @@ -1483,15 +1484,14 @@ setsegment(sd, base, limit, type, dpl, def32, gran) } #define IDTVEC(name) __CONCAT(X, name) -extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), - IDTVEC(ofl), IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), - IDTVEC(dble), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), - IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(rsvd), - IDTVEC(fpu), IDTVEC(align), - IDTVEC(syscall), IDTVEC(osyscall); +extern int IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl), + IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(dble), IDTVEC(fpusegm), + IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), + IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), IDTVEC(syscall), + IDTVEC(osyscall); #if defined(I586_CPU) -extern IDTVEC(f00f_redirect); +extern int IDTVEC(f00f_redirect); pt_entry_t *pmap_pte __P((pmap_t, vm_offset_t)); int cpu_f00f_bug = 0; diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 721e3ba9406..9444e32f3ef 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.25 1997/09/08 22:51:36 downsj Exp $ */ +/* $OpenBSD: trap.c,v 1.26 1998/02/22 21:35:28 niklas Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ #undef DEBUG @@ -191,6 +191,7 @@ trap(frame) struct trapframe *vframe; int resume; vm_prot_t vftype, ftype; + union sigval sv; cnt.v_trap++; @@ -293,27 +294,29 @@ trap(frame) goto out; } #endif - trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, (caddr_t)rcr2()); + sv.sival_int = rcr2(); + trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv); goto out; case T_SEGNPFLT|T_USER: - trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, frame.tf_eip); - goto out; - case T_STKFLT|T_USER: - trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv); goto out; case T_ALIGNFLT|T_USER: - trapsignal(p, SIGBUS, vftype, BUS_ADRALN, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGBUS, vftype, BUS_ADRALN, sv); goto out; case T_PRIVINFLT|T_USER: /* privileged instruction fault */ - trapsignal(p, SIGILL, type &~ T_USER, ILL_PRVOPC, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGILL, type &~ T_USER, ILL_PRVOPC, sv); goto out; case T_FPOPFLT|T_USER: /* coprocessor operand fault */ - trapsignal(p, SIGILL, type &~ T_USER, ILL_COPROC, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGILL, type &~ T_USER, ILL_COPROC, sv); goto out; case T_ASTFLT|T_USER: /* Allow process switch */ @@ -332,28 +335,34 @@ trap(frame) goto trace; return; } - trapsignal(p, rv, type &~ T_USER, FPE_FLTINV, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, rv, type &~ T_USER, FPE_FLTINV, sv); goto out; #else printf("pid %d killed due to lack of floating point\n", p->p_pid); - trapsignal(p, SIGKILL, type &~ T_USER, FPE_FLTINV, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGKILL, type &~ T_USER, FPE_FLTINV, sv); goto out; #endif } case T_BOUND|T_USER: - trapsignal(p, SIGFPE, type &~ T_USER, FPE_FLTSUB, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGFPE, type &~ T_USER, FPE_FLTSUB, sv); goto out; case T_OFLOW|T_USER: - trapsignal(p, SIGFPE, type &~ T_USER, FPE_INTOVF, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGFPE, type &~ T_USER, FPE_INTOVF, sv); goto out; case T_DIVIDE|T_USER: - trapsignal(p, SIGFPE, type &~ T_USER, FPE_INTDIV, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGFPE, type &~ T_USER, FPE_INTDIV, sv); goto out; case T_ARITHTRAP|T_USER: - trapsignal(p, SIGFPE, frame.tf_err, FPE_INTOVF, frame.tf_eip); + sv.sival_int = frame.tf_eip; + trapsignal(p, SIGFPE, frame.tf_err, FPE_INTOVF, sv); goto out; case T_PAGEFLT: /* allow page faults in kernel mode */ @@ -441,7 +450,8 @@ trap(frame) map, va, ftype, rv); goto we_re_toast; } - trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, (caddr_t)rcr2()); + sv.sival_int = rcr2(); + trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv); break; } @@ -453,13 +463,15 @@ trap(frame) #endif case T_BPTFLT|T_USER: /* bpt instruction fault */ - trapsignal(p, SIGTRAP, type &~ T_USER, TRAP_BRKPT, (caddr_t)rcr2()); + sv.sival_int = rcr2(); + trapsignal(p, SIGTRAP, type &~ T_USER, TRAP_BRKPT, sv); break; case T_TRCTRAP|T_USER: /* trace trap */ #if defined(MATH_EMULATE) || defined(GPL_MATH_EMULATE) trace: #endif - trapsignal(p, SIGTRAP, type &~ T_USER, TRAP_TRACE, (caddr_t)rcr2()); + sv.sival_int = rcr2(); + trapsignal(p, SIGTRAP, type &~ T_USER, TRAP_TRACE, sv); break; #include "isa.h" diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index c907f63e7d5..fd641539bb1 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.27 1998/01/20 18:40:20 niklas Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.28 1998/02/22 21:35:30 niklas Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ #define ISA_DMA_STATS @@ -151,7 +151,7 @@ extern vm_offset_t avail_end; #define IDTVEC(name) __CONCAT(X,name) /* default interrupt vector table entries */ -typedef (*vector) __P((void)); +typedef int (*vector) __P((void)); extern vector IDTVEC(intr)[], IDTVEC(fast)[]; void isa_strayintr __P((int)); void intr_calculatemasks __P((void)); diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index c315ad126aa..16ca8bd7b61 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.20 1998/02/05 16:48:28 deraadt Exp $ */ +/* $OpenBSD: pccom.c,v 1.21 1998/02/22 21:35:31 niklas Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -651,15 +651,15 @@ comattach(parent, self, aux) FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_14); delay(100); if (ISSET(bus_space_read_1(iot, ioh, com_iir), IIR_FIFO_MASK) == - IIR_FIFO_MASK) - if (ISSET(bus_space_read_1(iot, ioh, com_fifo), FIFO_TRIGGER_14) == - FIFO_TRIGGER_14) { + IIR_FIFO_MASK) { + if (ISSET(bus_space_read_1(iot, ioh, com_fifo), + FIFO_TRIGGER_14) == FIFO_TRIGGER_14) { SET(sc->sc_hwflags, COM_HW_FIFO); printf(": ns16550a, working fifo\n"); sc->sc_fifolen = 16; } else printf(": ns16550, broken fifo\n"); - else + } else printf(": ns8250 or ns16450, no fifo\n"); bus_space_write_1(iot, ioh, com_fifo, 0); #ifdef COM_HAYESP diff --git a/sys/arch/i386/isa/pcvt/pcvt_drv.c b/sys/arch/i386/isa/pcvt/pcvt_drv.c index 2aa1cf54640..2f76c9c6d5a 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_drv.c +++ b/sys/arch/i386/isa/pcvt/pcvt_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_drv.c,v 1.18 1998/01/04 12:11:37 deraadt Exp $ */ +/* $OpenBSD: pcvt_drv.c,v 1.19 1998/02/22 21:35:33 niklas Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -631,7 +631,7 @@ pctty(Dev_t dev) int pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) { - register error; + register int error; register struct tty *tp; if((tp = get_pccons(dev)) == NULL) diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.h b/sys/arch/i386/isa/pcvt/pcvt_kbd.h index c95375e8fa0..cd552a4d225 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.h +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.h,v 1.4 1996/08/01 23:23:27 deraadt Exp $ */ +/* $OpenBSD: pcvt_kbd.h,v 1.5 1998/02/22 21:35:34 niklas Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -110,7 +110,7 @@ typedef struct static Ovl_tbl *ovltbl; /* the table itself */ -static ovlinitflag = 0; /* the init flag for the table */ +static int ovlinitflag = 0; /* the init flag for the table */ /* * key codes >= 128 denote "virtual" shift/control |