From owner-freebsd-hackers Wed Apr 5 11:53:44 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id LAB25290 for hackers-outgoing; Wed, 5 Apr 1995 11:53:44 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id LAA25284 for ; Wed, 5 Apr 1995 11:53:40 -0700 Received: (dufault@localhost) by hda.com (8.6.9/8.3) id OAA01204; Wed, 5 Apr 1995 14:53:40 -0400 From: Peter Dufault Message-Id: <199504051853.OAA01204@hda.com> Subject: spl() and LKM To: freebsd-hackers@freefall.cdrom.com Date: Wed, 5 Apr 1995 14:53:39 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1813 Sender: hackers-owner@FreeBSD.org Precedence: bulk I realize now that the driver I've been testing using an LKM doesn't have the interrupt mask set up properly, and I assume that the "reconfigurable" devices if_ze and if_zp don't work properly (when they aren't on at initial boot) either. I've tried to install a driver at tty_mask but spltty() isn't masking off the interrupt. Here is what I'm doing right now. I originally had something neater, but I wanted to see if by brute force copying what isa_configure does at the end of its configuration pass I couldn't get it to work properly: > void > isa_device_install(isdp, mp) > struct isa_device *isdp; > u_int *mp; > { > struct isa_device *dvp; > > int s = splhigh(); > > config_isadev_c(isdp, mp, 0); > > for (dvp = isa_devtab_tty; dvp->id_driver; dvp++) > register_imask(dvp, tty_imask); > register_imask(isdp, tty_imask); > for (dvp = isa_devtab_bio; dvp->id_driver; dvp++) > register_imask(dvp, bio_imask); > register_imask(isdp, bio_imask); > for (dvp = isa_devtab_net; dvp->id_driver; dvp++) > register_imask(dvp, net_imask); > register_imask(isdp, net_imask); > for (dvp = isa_devtab_null; dvp->id_driver; dvp++) > register_imask(dvp, SWI_CLOCK_MASK); > register_imask(isdp, SWI_CLOCK_MASK); > > splx(s); > } I'm calling this like: > isa_device_install(&isa_labpc, &tty_imask); The "register_intr" in config_isadev_c is working fine since my interrupt is called just fine. The problem is that spltty() doesn't mask it off. I expected this brute force recalculation of intr_mask[] and intr_mptr[] would get me a basis to work from, but no go. Can anyone suggest the right way to get this to work? -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267