From 78bd894529b37033d296474bf0d827db1e2bf830 Mon Sep 17 00:00:00 2001 From: chopps Date: Mon, 9 Oct 1995 15:19:58 +0000 Subject: [PATCH] add prototypes for isr stuff fixes pr# 1284 and 1569 --- sys/arch/amiga/amiga/isr.h | 11 ++++++++++- sys/arch/amiga/conf/GENERIC | 4 ++-- sys/arch/amiga/conf/Makefile.amiga | 4 ++-- sys/arch/amiga/dev/if_bah.c | 6 +++--- sys/arch/amiga/dev/ite.c | 15 +++++++++++++-- sys/arch/amiga/dev/mfc.c | 10 +++++----- sys/arch/amiga/dev/mgnsc.c | 4 ++-- sys/arch/amiga/dev/zssc.c | 4 ++-- sys/dev/ic/smc90cx6.c | 6 +++--- 9 files changed, 42 insertions(+), 22 deletions(-) diff --git a/sys/arch/amiga/amiga/isr.h b/sys/arch/amiga/amiga/isr.h index 502138cfc87a..f07f43db08eb 100644 --- a/sys/arch/amiga/amiga/isr.h +++ b/sys/arch/amiga/amiga/isr.h @@ -1,4 +1,4 @@ -/* $NetBSD: isr.h,v 1.6 1995/02/12 19:18:38 chopps Exp $ */ +/* $NetBSD: isr.h,v 1.7 1995/10/09 15:19:58 chopps Exp $ */ /* * Copyright (c) 1982 Regents of the University of California. @@ -45,3 +45,12 @@ struct isr { #define NISR 3 #define ISRIPL(x) ((x) - 3) + +#ifdef _KERNEL +void add_isr __P((struct isr *)); +void remove_isr __P((struct isr *)); +typedef void (*sifunc_t) __P((void *, void *)); +void alloc_sicallback __P((void)); +void add_sicallback __P((sifunc_t, void *, void *)); +void rem_sicallback __P((sifunc_t)); +#endif diff --git a/sys/arch/amiga/conf/GENERIC b/sys/arch/amiga/conf/GENERIC index b843feea5350..1fba5c8f9f43 100644 --- a/sys/arch/amiga/conf/GENERIC +++ b/sys/arch/amiga/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.46 1995/10/09 02:08:37 chopps Exp $ +# $NetBSD: GENERIC,v 1.47 1995/10/09 15:20:10 chopps Exp $ # # GENERIC AMIGA @@ -66,7 +66,7 @@ options "CD9660" # ISO 9660 file system, with Rock Ridge options "COMPAT_10" # compatability with older NetBSD release options "COMPAT_09" # compatability with older NetBSD release options "COMPAT_43" # 4.3 BSD compatible system calls -options COMPAT_SUNOS # Support to run Sun (m68k) executables +#options COMPAT_SUNOS # Support to run Sun (m68k) executables options "TCP_COMPAT_42" # Use 4.2 BSD style TCP options "COMPAT_NOMID" # allow nonvalid machine id executables #options COMPAT_HPUX # HP300 compatability diff --git a/sys/arch/amiga/conf/Makefile.amiga b/sys/arch/amiga/conf/Makefile.amiga index 5bcdac86f3af..df03a9993dbb 100644 --- a/sys/arch/amiga/conf/Makefile.amiga +++ b/sys/arch/amiga/conf/Makefile.amiga @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amiga,v 1.26 1995/10/09 00:12:54 chopps Exp $ +# $NetBSD: Makefile.amiga,v 1.27 1995/10/09 15:20:14 chopps Exp $ # @(#)Makefile.hp300 7.10 (Berkeley) 6/27/91 # @@ -35,7 +35,7 @@ AMIGA= ../.. INCLUDES= -I. -I$S/arch -I$S -I$S/sys COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Damiga -CFLAGS= -O -Werror -fno-builtin -mc68020 -m68881 ${COPTS} +CFLAGS= -O -Wall -Werror -fno-builtin -mc68020 -m68881 ${COPTS} ### find out what to use for libkern .include "$S/lib/libkern/Makefile.inc" diff --git a/sys/arch/amiga/dev/if_bah.c b/sys/arch/amiga/dev/if_bah.c index 5675ed52db37..13065835d530 100644 --- a/sys/arch/amiga/dev/if_bah.c +++ b/sys/arch/amiga/dev/if_bah.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bah.c,v 1.11 1995/10/09 14:05:24 chopps Exp $ */ +/* $NetBSD: if_bah.c,v 1.12 1995/10/09 15:20:25 chopps Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -1010,7 +1010,7 @@ bah_tint(sc) #ifdef BAHSOFTCOPY /* schedule soft int to fill a new buffer for us */ - add_sicallback(callstart, sc, NULL); + add_sicallback((sifunc_t)callstart, sc, NULL); #else /* call it directly */ callstart(sc, NULL); @@ -1122,7 +1122,7 @@ bahintr(sc) #ifdef BAHSOFTCOPY /* this one starts a soft int to copy out of the hw */ - add_sicallback(bah_srint, sc,NULL); + add_sicallback((sifunc_t)bah_srint, sc,NULL); #else /* this one does the copy here */ bah_srint(sc,NULL); diff --git a/sys/arch/amiga/dev/ite.c b/sys/arch/amiga/dev/ite.c index f37952d8739c..a85b3864cc86 100644 --- a/sys/arch/amiga/dev/ite.c +++ b/sys/arch/amiga/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.31 1995/09/16 16:11:20 chopps Exp $ */ +/* $NetBSD: ite.c,v 1.32 1995/10/09 15:20:30 chopps Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -62,6 +62,7 @@ #include #include /* DEBUG */ #include +#include #include #include #include @@ -112,6 +113,7 @@ static char sample[20] = { static char *index __P((const char *, char)); static int inline atoi __P((const char *)); +static void ite_sifilter __P((void *, void *)); void iteputchar __P((int c, struct ite_softc *ip)); void ite_putstr __P((const char * s, int len, dev_t dev)); void iteattach __P((struct device *, struct device *, void *)); @@ -824,6 +826,14 @@ ite_cnfilter(c, caller) static u_char last_char; static u_char tout_pending; + +static void +ite_sifilter(void *arg1, void *arg2) +{ + ite_filter((u_char)arg1, (enum caller)arg2); +} + + /*ARGSUSED*/ static void repeat_handler(arg) @@ -831,7 +841,8 @@ repeat_handler(arg) { tout_pending = 0; if (last_char) - add_sicallback(ite_filter, last_char, ITEFILT_REPEATER); + add_sicallback(ite_sifilter, (void *)last_char, + (void *)ITEFILT_REPEATER); } void diff --git a/sys/arch/amiga/dev/mfc.c b/sys/arch/amiga/dev/mfc.c index b777d1555370..f639beaeb81c 100644 --- a/sys/arch/amiga/dev/mfc.c +++ b/sys/arch/amiga/dev/mfc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfc.c,v 1.7 1995/09/29 13:51:57 chopps Exp $ */ +/* $NetBSD: mfc.c,v 1.8 1995/10/09 15:20:33 chopps Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -993,8 +993,8 @@ mfcintr (scc) scc->imask &= ~0x01; regs->du_imr = scc->imask; add_sicallback (tp->t_line ? - linesw[tp->t_line].l_start : mfcsstart, - tp, NULL); + (sifunc_t)linesw[tp->t_line].l_start + : (sifunc_t)mfcsstart, tp, NULL); } else @@ -1008,8 +1008,8 @@ mfcintr (scc) scc->imask &= ~0x10; regs->du_imr = scc->imask; add_sicallback (tp->t_line ? - linesw[tp->t_line].l_start : mfcsstart, - tp, NULL); + (sifunc_t)linesw[tp->t_line].l_start + : (sifunc_t)mfcsstart, tp, NULL); } else regs->du_tbb = *sc->ptr++; diff --git a/sys/arch/amiga/dev/mgnsc.c b/sys/arch/amiga/dev/mgnsc.c index 62ff7f08d582..a41f58f6fa3e 100644 --- a/sys/arch/amiga/dev/mgnsc.c +++ b/sys/arch/amiga/dev/mgnsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mgnsc.c,v 1.14 1995/09/16 16:11:22 chopps Exp $ */ +/* $NetBSD: mgnsc.c,v 1.15 1995/10/09 15:20:36 chopps Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -185,7 +185,7 @@ mgnsc_dmaintr(sc) rp->siop_sien = 0; rp->siop_dien = 0; sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF; - add_sicallback (siopintr, sc, NULL); + add_sicallback((sifunc_t)siopintr, sc, NULL); return (1); } diff --git a/sys/arch/amiga/dev/zssc.c b/sys/arch/amiga/dev/zssc.c index d39b1ef348d4..735581ce75b2 100644 --- a/sys/arch/amiga/dev/zssc.c +++ b/sys/arch/amiga/dev/zssc.c @@ -1,4 +1,4 @@ -/* $NetBSD: zssc.c,v 1.12 1995/09/16 16:11:34 chopps Exp $ */ +/* $NetBSD: zssc.c,v 1.13 1995/10/09 15:20:38 chopps Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -187,7 +187,7 @@ zssc_dmaintr(sc) rp->siop_sien = 0; rp->siop_dien = 0; sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF; - add_sicallback (siopintr, sc, NULL); + add_sicallback((sifunc_t)siopintr, sc, NULL); return(1); } diff --git a/sys/dev/ic/smc90cx6.c b/sys/dev/ic/smc90cx6.c index e64c4b59f6ed..649bfa819fb9 100644 --- a/sys/dev/ic/smc90cx6.c +++ b/sys/dev/ic/smc90cx6.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc90cx6.c,v 1.11 1995/10/09 14:05:24 chopps Exp $ */ +/* $NetBSD: smc90cx6.c,v 1.12 1995/10/09 15:20:25 chopps Exp $ */ /* * Copyright (c) 1994, 1995 Ignatios Souvatzis @@ -1010,7 +1010,7 @@ bah_tint(sc) #ifdef BAHSOFTCOPY /* schedule soft int to fill a new buffer for us */ - add_sicallback(callstart, sc, NULL); + add_sicallback((sifunc_t)callstart, sc, NULL); #else /* call it directly */ callstart(sc, NULL); @@ -1122,7 +1122,7 @@ bahintr(sc) #ifdef BAHSOFTCOPY /* this one starts a soft int to copy out of the hw */ - add_sicallback(bah_srint, sc,NULL); + add_sicallback((sifunc_t)bah_srint, sc,NULL); #else /* this one does the copy here */ bah_srint(sc,NULL);