From owner-freebsd-arch@FreeBSD.ORG Wed Aug 27 23:15:47 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02F3E16A4BF for ; Wed, 27 Aug 2003 23:15:47 -0700 (PDT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id C302843FAF for ; Wed, 27 Aug 2003 23:15:43 -0700 (PDT) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [IPv6:::1]) h7S6FQ5v001219; Thu, 28 Aug 2003 08:15:26 +0200 (SAST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.9/8.12.9/Submit) id h7S6FP07001218; Thu, 28 Aug 2003 08:15:25 +0200 (SAST) (envelope-from jhay) Date: Thu, 28 Aug 2003 08:15:25 +0200 From: John Hay To: "M. Warner Losh" Message-ID: <20030828061524.GA249@zibbi.icomtek.csir.co.za> References: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> <20030827.224045.20748146.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030827.224045.20748146.imp@bsdimp.com> User-Agent: Mutt/1.4i cc: freebsd-arch@freebsd.org Subject: Re: pnp code and irq 2 broken X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 06:15:47 -0000 On Wed, Aug 27, 2003 at 10:40:45PM -0600, M. Warner Losh wrote: > In message: <20030827054550.GA53143@zibbi.icomtek.csir.co.za> > John Hay writes: > : I have worked around it with this crude patch below. Crude because: > : 1) I don't know if it should be an i386 only fix, and > : 2) I used 0x04 directly, maybe IRQ_SLAVE from i386/isa/icu.h or > : some other define should be used? > > I'd change 0x04 to 1 << IRQ_SLAVE. Other than that, it looks good to > me. I'm not sure of a better place to do this, as it doesn't looke > like a good idea to do the translation in pnp.c. One reason that I'm hessitant about it is that up to now isa/pnpparse.c seems pretty machine independant and from sys/conf/files* it looks like more than just the i386 arch use it. So to include i386/isa/icu.h doesn't seem right. Or should I put it all in #ifdefs? > : Index: isa/pnpparse.c > : =================================================================== > : RCS file: /home/ncvs/src/sys/isa/pnpparse.c,v > : retrieving revision 1.13 > : diff -u -r1.13 pnpparse.c > : --- isa/pnpparse.c 16 Oct 2002 09:07:30 -0000 1.13 > : +++ isa/pnpparse.c 19 Jun 2003 06:00:02 -0000 > : @@ -110,7 +110,8 @@ > : if (bootverbose) > : pnp_printf(id, "adding irq mask %#02x\n", > : I16(res)); > : - config->ic_irqmask[config->ic_nirq] = I16(res); > : + config->ic_irqmask[config->ic_nirq] = I16(res) & > : + ~0x04; > : config->ic_nirq++; > : break; John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org