diff options
author | wollman <wollman@FreeBSD.org> | 1993-11-25 01:38:01 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1993-11-25 01:38:01 +0000 |
commit | 8e24073a9b2dcc5fd2bcd719dd679f029d4818cb (patch) | |
tree | 5f254571daeb319e5d462e9932f7aff4e6b7ee40 /sys/amd64/isa | |
parent | 5465ba6a252350e2c96e04cb61af6d77a3d8d66e (diff) | |
download | FreeBSD-src-8e24073a9b2dcc5fd2bcd719dd679f029d4818cb.zip FreeBSD-src-8e24073a9b2dcc5fd2bcd719dd679f029d4818cb.tar.gz |
Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and
add same (sans -Werror) to Makefile for future compilations.
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r-- | sys/amd64/isa/clock.c | 19 | ||||
-rw-r--r-- | sys/amd64/isa/isa.c | 59 |
2 files changed, 55 insertions, 23 deletions
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 133f2d1..836bff0 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ + * $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $ */ /* @@ -56,7 +56,11 @@ #define TIMER_FREQ 1193182 /* XXX - should be in isa.h */ #endif -startrtclock() { +static void findcpuspeed(void); + +void +startrtclock() +{ int s; findcpuspeed(); /* use the clock (while it's free) @@ -84,6 +88,7 @@ startrtclock() { unsigned int delaycount; /* calibrated loop variable (1 millisecond) */ #define FIRST_GUESS 0x2000 +static void findcpuspeed() { unsigned char low; @@ -107,8 +112,9 @@ findcpuspeed() /* convert 2 digit BCD number */ +int bcd(i) -int i; + int i; { return ((i/16)*10 + (i%16)); } @@ -157,6 +163,7 @@ int m,leap; * Initialize the time of day register, based on the time base which is, e.g. * from a filesystem. */ +void inittodr(base) time_t base; { @@ -217,6 +224,7 @@ test_inittodr(base) /* * Restart the clock. */ +void resettodr() { } @@ -226,7 +234,10 @@ resettodr() */ #define V(s) __CONCAT(V, s) extern V(clk)(); -enablertclock() { + +void +enablertclock() +{ setidt(ICU_OFFSET+0, &V(clk), SDT_SYS386IGT, SEL_KPL); INTREN(IRQ0); } diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 7a16d42..b40ce6e 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.8 1993/11/14 23:53:32 ache Exp $ + * $Id: isa.c,v 1.9 1993/11/17 00:21:03 ache Exp $ */ /* @@ -48,7 +48,8 @@ */ #include "param.h" -#include "systm.h" +#include "systm.h" /* isn't it a joy */ +#include "kernel.h" /* to have three of these */ #include "conf.h" #include "file.h" #include "buf.h" @@ -80,7 +81,7 @@ #define DMA2_MODE (IO_DMA2 + 2*11) /* mode register */ #define DMA2_FFC (IO_DMA2 + 2*12) /* clear first/last FF */ -int config_isadev __P((struct isa_device *, u_int *)); +void config_isadev __P((struct isa_device *, u_int *)); /* * print a conflict message @@ -250,6 +251,7 @@ isa_configure() { /* * Configure an ISA device. */ +void config_isadev(isdp, mp) struct isa_device *isdp; u_int *mp; @@ -338,7 +340,9 @@ extern IDTVEC(intrdefault); * Fill in default interrupt table (in case of spuruious interrupt * during configuration of kernel, setup interrupt control unit */ -isa_defaultirq() { +void +isa_defaultirq() +{ int i; /* icu vectors */ @@ -505,6 +509,7 @@ void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan) * Return true if special handling needed. */ +int isa_dmarangecheck(caddr_t va, unsigned length, unsigned chan) { vm_offset_t phys, priorpage = 0, endva; u_int dma_pgmsk = (chan & 4) ? ~(128*1024-1) : ~(64*1024-1); @@ -548,7 +553,7 @@ isa_allocphysmem(caddr_t va, unsigned length, void (*func)()) { isaphysmemunblock = func; while (isaphysmemflag & B_BUSY) { isaphysmemflag |= B_WANTED; - tsleep(&isaphysmemflag, PRIBIO, "isaphys", 0); + tsleep((caddr_t)&isaphysmemflag, PRIBIO, "isaphys", 0); } isaphysmemflag |= B_BUSY; @@ -565,7 +570,7 @@ isa_freephysmem(caddr_t va, unsigned length) { isaphysmemflag &= ~B_BUSY; if (isaphysmemflag & B_WANTED) { isaphysmemflag &= B_WANTED; - wakeup(&isaphysmemflag); + wakeup((caddr_t)&isaphysmemflag); if (isaphysmemunblock) (*isaphysmemunblock)(); } @@ -575,7 +580,10 @@ isa_freephysmem(caddr_t va, unsigned length) { * Handle a NMI, possibly a machine check. * return true to panic system, false to ignore. */ -isa_nmi(cd) { +int +isa_nmi(cd) + int cd; +{ log(LOG_CRIT, "\nNMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); return(0); @@ -584,7 +592,10 @@ isa_nmi(cd) { /* * Caught a stray interrupt, notify */ -isa_strayintr(d) { +void +isa_strayintr(d) + int d; +{ /* DON'T BOTHER FOR NOW! */ /* for some reason, we get bursts of intr #7, even if not enabled! */ @@ -616,9 +627,8 @@ isa_strayintr(d) { #define CF (1 * TIMER_FREQ) #define TIMER_FREQ 1193182 /* XXX - should be elsewhere */ -extern int hz; /* XXX - should be elsewhere */ - -int DELAY(n) +void +DELAY(n) int n; { int counter_limit; @@ -683,7 +693,11 @@ int DELAY(n) #endif } -getit(unit, timer) { +int +getit(unit, timer) + int unit; + int timer; +{ int high; int low; @@ -710,19 +724,23 @@ getit(unit, timer) { return ((high << 8) | low); } -static beeping; -static -sysbeepstop(f) +static int beeping; + +static void +sysbeepstop(f, dummy) + caddr_t f; + int dummy; { /* disable counter 2 */ outb(0x61, inb(0x61) & 0xFC); if (f) - timeout(sysbeepstop, 0, f); + timeout(sysbeepstop, (caddr_t)0, (int)f); else beeping = 0; } -void sysbeep(int pitch, int period) +void +sysbeep(int pitch, int period) { outb(0x61, inb(0x61) | 3); /* enable counter 2 */ @@ -739,14 +757,17 @@ void sysbeep(int pitch, int period) if (!beeping) { beeping = period; - timeout(sysbeepstop, period/2, period); + timeout(sysbeepstop, (caddr_t)(period/2), period); } } /* * Pass command to keyboard controller (8042) */ -unsigned kbc_8042cmd(val) { +unsigned +kbc_8042cmd(val) + int val; +{ while (inb(KBSTATP)&KBS_IBF); if (val) outb(KBCMDP, val); |