exception.S (109860) | exception.S (111032) |
---|---|
1/*- 2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 38 unchanged lines hidden (view full) --- 47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 53 * SUCH DAMAGE. 54 * | 1/*- 2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 38 unchanged lines hidden (view full) --- 47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 53 * SUCH DAMAGE. 54 * |
55 * $FreeBSD: head/sys/sparc64/sparc64/exception.S 109860 2003-01-26 03:38:30Z jake $ | 55 * $FreeBSD: head/sys/sparc64/sparc64/exception.S 111032 2003-02-17 09:55:10Z julian $ |
56 */ 57 58#include "opt_compat.h" 59#include "opt_ddb.h" 60 61#include <machine/asi.h> 62#include <machine/asmacros.h> 63#include <machine/ktr.h> --- 2247 unchanged lines hidden (view full) --- 2311 * Check for pending asts atomically with returning. We must raise 2312 * the pil before checking, and if no asts are found the pil must 2313 * remain raised until the retry is executed, or we risk missing asts 2314 * caused by interrupts occuring after the test. If the pil is lowered, 2315 * as it is when we call ast, the check must be re-executed. 2316 */ 2317 wrpr %g0, PIL_TICK, %pil 2318 ldx [PCPU(CURTHREAD)], %l0 | 56 */ 57 58#include "opt_compat.h" 59#include "opt_ddb.h" 60 61#include <machine/asi.h> 62#include <machine/asmacros.h> 63#include <machine/ktr.h> --- 2247 unchanged lines hidden (view full) --- 2311 * Check for pending asts atomically with returning. We must raise 2312 * the pil before checking, and if no asts are found the pil must 2313 * remain raised until the retry is executed, or we risk missing asts 2314 * caused by interrupts occuring after the test. If the pil is lowered, 2315 * as it is when we call ast, the check must be re-executed. 2316 */ 2317 wrpr %g0, PIL_TICK, %pil 2318 ldx [PCPU(CURTHREAD)], %l0 |
2319 ldx [%l0 + TD_KSE], %l1 2320 lduw [%l1 + KE_FLAGS], %l2 2321 and %l2, KEF_ASTPENDING | KEF_NEEDRESCHED, %l2 2322 brz,a,pt %l2, 1f | 2319 lduw [%l0 + TD_FLAGS], %l1 2320 set TDF_ASTPENDING | TDF_NEEDRESCHED, %l2 2321 and %l1, %l2, %l1 2322 brz,a,pt %l1, 1f |
2323 nop 2324 2325 /* 2326 * We have an ast. Re-enable interrupts and handle it, then restart 2327 * the return sequence. 2328 */ 2329 wrpr %g0, 0, %pil 2330 call ast --- 536 unchanged lines hidden --- | 2323 nop 2324 2325 /* 2326 * We have an ast. Re-enable interrupts and handle it, then restart 2327 * the return sequence. 2328 */ 2329 wrpr %g0, 0, %pil 2330 call ast --- 536 unchanged lines hidden --- |