Deleted Added
full compact
apic_vector.s (72220) apic_vector.s (72276)
1/*
2 * from: vector.s, 386BSD 0.1 unknown origin
1/*
2 * from: vector.s, 386BSD 0.1 unknown origin
3 * $FreeBSD: head/sys/i386/i386/apic_vector.s 72220 2001-02-09 14:30:03Z jhb $
3 * $FreeBSD: head/sys/i386/i386/apic_vector.s 72276 2001-02-10 02:20:34Z jhb $
4 */
5
6
7#include <machine/apic.h>
8#include <machine/smp.h>
9
10#include "i386/isa/intr_machdep.h"
11

--- 287 unchanged lines hidden (view full) ---

299 movl $0, _lapic+LA_EOI /* End Of Interrupt to APIC */
300
301 lock
302 btsl %eax, _checkstate_pending_ast
303 jc 1f
304
305 FAKE_MCOUNT(13*4(%esp))
306
4 */
5
6
7#include <machine/apic.h>
8#include <machine/smp.h>
9
10#include "i386/isa/intr_machdep.h"
11

--- 287 unchanged lines hidden (view full) ---

299 movl $0, _lapic+LA_EOI /* End Of Interrupt to APIC */
300
301 lock
302 btsl %eax, _checkstate_pending_ast
303 jc 1f
304
305 FAKE_MCOUNT(13*4(%esp))
306
307 orl $AST_PENDING, PCPU(ASTPENDING) /* XXX */
307 MTX_LOCK_SPIN(sched_lock, 0)
308 movl PCPU(CURPROC),%ebx
308 movl PCPU(CURPROC),%ebx
309 incl P_INTR_NESTING_LEVEL(%ebx)
310 sti
309 orl $PS_ASTPENDING, P_SFLAG(%ebx)
311
312 movl PCPU(CPUID), %eax
313 lock
314 btrl %eax, _checkstate_pending_ast
315 lock
316 btrl %eax, CNAME(resched_cpus)
317 jnc 2f
310
311 movl PCPU(CPUID), %eax
312 lock
313 btrl %eax, _checkstate_pending_ast
314 lock
315 btrl %eax, CNAME(resched_cpus)
316 jnc 2f
318 orl $AST_PENDING+AST_RESCHED, PCPU(ASTPENDING)
317 orl $PS_NEEDRESCHED, P_SFLAG(%ebx)
319 lock
320 incl CNAME(want_resched_cnt)
3212:
318 lock
319 incl CNAME(want_resched_cnt)
3202:
321 MTX_UNLOCK_SPIN(sched_lock)
322 lock
323 incl CNAME(cpuast_cnt)
322 lock
323 incl CNAME(cpuast_cnt)
324 decl P_INTR_NESTING_LEVEL(%ebx)
325 MEXITCOUNT
326 jmp _doreti
3271:
328 /* We are already in the process of delivering an ast for this CPU */
329 POP_FRAME
330 iret
331
332/*

--- 202 unchanged lines hidden ---
324 MEXITCOUNT
325 jmp _doreti
3261:
327 /* We are already in the process of delivering an ast for this CPU */
328 POP_FRAME
329 iret
330
331/*

--- 202 unchanged lines hidden ---