From 5d03735614e5a798dd827a93c7336624e2e28903 Mon Sep 17 00:00:00 2001 From: wdk Date: Fri, 30 Mar 2001 23:26:29 +0000 Subject: [PATCH] Move most interrupt functionality to arch/mipsco/mipsco/interrupt.c Remove old style soft interrupts to favor MI softintr support --- sys/arch/mipsco/mipsco/machdep.c | 68 +++----------------------------- 1 file changed, 5 insertions(+), 63 deletions(-) diff --git a/sys/arch/mipsco/mipsco/machdep.c b/sys/arch/mipsco/mipsco/machdep.c index a12d29602990..cbb88575c88e 100644 --- a/sys/arch/mipsco/mipsco/machdep.c +++ b/sys/arch/mipsco/mipsco/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.19 2001/03/15 06:10:43 chs Exp $ */ +/* $NetBSD: machdep.c,v 1.20 2001/03/30 23:26:29 wdk Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -43,12 +43,11 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2001/03/15 06:10:43 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2001/03/30 23:26:29 wdk Exp $"); /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ #include -#include #include #include #include @@ -99,11 +98,13 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2001/03/15 06:10:43 chs Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" +#include "zsc.h" /* XXX */ +#include "com.h" /* XXX */ + /* the following is used externally (sysctl_hw) */ char machine[] = MACHINE; /* from */ char machine_arch[] = MACHINE_ARCH; char cpu_model[40]; -unsigned ssir; /* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; @@ -137,7 +138,6 @@ int initcpu __P((void)); void configure __P((void)); void mach_init __P((int, char *[], char*[], u_int, char *)); -void softintr_init __P((void)); int memsize_scan __P((caddr_t)); #ifdef DEBUG @@ -472,18 +472,6 @@ cpu_startup() bufinit(); } -void -softintr_init() -{ - int i; - static const char *intr_names[] = IPL_SOFTNAMES; - - for (i=0; i < IPL_NSOFT; i++) { - evcnt_attach_dynamic(&soft_evcnt[i], EVCNT_TYPE_INTR, NULL, - "soft", intr_names[i]); - } -} - /* * machine dependent system variables. */ @@ -649,7 +637,6 @@ microtime(tvp) int initcpu() { - softintr_init(); spl0(); /* safe to turn interrupts on now */ return 0; } @@ -709,51 +696,6 @@ delay(n) DELAY(n); } -void -cpu_intr(status, cause, pc, ipending) - u_int32_t status; - u_int32_t cause; - u_int32_t pc; - u_int32_t ipending; -{ - uvmexp.intrs++; - - /* device interrupts */ - (*platform.iointr)(status, cause, pc, ipending); - - /* software simulated interrupt */ - if ((ipending & MIPS_SOFT_INT_MASK_1) || - (ssir && (status & MIPS_SOFT_INT_MASK_1))) { - -#define DO_SIR(bit, fn, ev) \ - do { \ - if (n & (bit)) { \ - uvmexp.softs++; \ - soft_evcnt[ev].ev_count++; \ - fn; \ - } \ - } while (0) - - unsigned n; - n = ssir; ssir = 0; - _clrsoftintr(MIPS_SOFT_INT_MASK_1); - -#if NZSC > 0 - DO_SIR(SIR_SERIAL, zssoft(), IPL_SOFTSERIAL); -#endif - DO_SIR(SIR_NET, netintr(), IPL_SOFTNET); -#undef DO_SIR - } - - /* 'softclock' interrupt */ - if (ipending & MIPS_SOFT_INT_MASK_0) { - _clrsoftintr(MIPS_SOFT_INT_MASK_0); - uvmexp.softs++; - soft_evcnt[IPL_SOFTCLOCK].ev_count++; - softclock(NULL); - } -} - /* * Find out how much memory is available by testing memory. * Be careful to save and restore the original contents for msgbuf.