From owner-freebsd-smp Wed Dec 3 18:31:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA07404 for smp-outgoing; Wed, 3 Dec 1997 18:31:03 -0800 (PST) (envelope-from owner-freebsd-smp) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA07397 for ; Wed, 3 Dec 1997 18:30:58 -0800 (PST) (envelope-from smp@Ilsa.StevesCafe.com) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.7/8.8.5) with ESMTP id TAA10762; Wed, 3 Dec 1997 19:30:51 -0700 (MST) Message-Id: <199712040230.TAA10762@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: Joe Eykholt Subject: Re: SMP Cc: smp@freebsd.org In-reply-to: Your message of "Wed, 03 Dec 1997 17:27:49 PST." <34860715.31DFF4F5@ipsilon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 03 Dec 1997 19:30:51 -0700 Sender: owner-freebsd-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Joe, > I'm glad you see the problem. I wasn't pressing for an immediate > solution so much as pointing out the problem. I think the long term nows the time, december is my "free month". --- > I'm not sure UNMASK_IRQ() should do the eoi either, since that can > happen from doreti as well, right? Maybe the Xintrxx and Xresumexx I actually mis-spoke last time, what I did was remove the lapic_eoi that was sent before the XResumeXXX entry point, and modify UNMASK_IRQ() to send it if the INT was currently UNmasked AND a level INT. The theory is that if its unmasked we must be in the first occurrance of an INT, ie NOT coming in from doreti(), as that could only occur for an INT that was defered, and thus would be masked. I applied the following patch to fix this: *** apic_vector.s 1997/12/04 01:11:26 1.37 --- apic_vector.s 1997/12/04 01:46:40 *************** *** 190,196 **** #define UNMASK_IRQ(irq_num) \ IMASK_LOCK ; /* into critical reg */ \ testl $IRQ_BIT(irq_num), _apic_imen ; \ ! je 9f ; \ andl $~IRQ_BIT(irq_num), _apic_imen ;/* clear mask bit */ \ movl _ioapic,%ecx ; /* ioapic[0]addr */ \ movl $REDTBL_IDX(irq_num),(%ecx) ; /* write the index */ \ --- 190,201 ---- #define UNMASK_IRQ(irq_num) \ IMASK_LOCK ; /* into critical reg */ \ testl $IRQ_BIT(irq_num), _apic_imen ; \ ! jne 7f ; /* bit set, masked */ \ ! testl $IRQ_BIT(irq_num), _apic_pin_trigger ; \ ! jz 9f ; /* edge, don't EOI */ \ ! movl $0, lapic_eoi ; /* should be safe */ \ ! jmp 9f ; /* skip unmasking */ \ ! 7: \ andl $~IRQ_BIT(irq_num), _apic_imen ;/* clear mask bit */ \ movl _ioapic,%ecx ; /* ioapic[0]addr */ \ movl $REDTBL_IDX(irq_num),(%ecx) ; /* write the index */ \ *************** *** 239,245 **** orl $IRQ_BIT(irq_num), _cil ; \ AVCPL_UNLOCK ; \ ; \ ! movl $0, lapic_eoi ; /* XXX too soon? */ \ incb _intr_nesting_level ; \ ; \ /* entry point used by doreti_unpend for HWIs. */ \ --- 244,250 ---- orl $IRQ_BIT(irq_num), _cil ; \ AVCPL_UNLOCK ; \ ; \ ! ;;; movl $0, lapic_eoi ; /* XXX too soon? */ \ incb _intr_nesting_level ; \ ; \ /* entry point used by doreti_unpend for HWIs. */ \ --- When I get a few reports I'll commit it. -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD