Date: Wed, 03 Dec 1997 19:30:51 -0700 From: Steve Passe <smp@csn.net> To: Joe Eykholt <jre@Ipsilon.COM> Cc: smp@freebsd.org Subject: Re: SMP Message-ID: <199712040230.TAA10762@Ilsa.StevesCafe.com> In-Reply-To: Your message of "Wed, 03 Dec 1997 17:27:49 PST." <34860715.31DFF4F5@ipsilon.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712040230.TAA10762>