fpu.c (71890) | fpu.c (72200) |
---|---|
1/*- 2 * Copyright (c) 1990 William Jolitz. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 | 1/*- 2 * Copyright (c) 1990 William Jolitz. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 |
35 * $FreeBSD: head/sys/amd64/amd64/fpu.c 71890 2001-02-01 03:34:20Z jake $ | 35 * $FreeBSD: head/sys/amd64/amd64/fpu.c 72200 2001-02-09 06:11:45Z bmilekic $ |
36 */ 37 38#include "opt_debug_npx.h" 39#include "opt_math_emulate.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/bus.h> --- 675 unchanged lines hidden (view full) --- 719void 720npx_intr(dummy) 721 void *dummy; 722{ 723 int code; 724 u_short control; 725 struct intrframe *frame; 726 | 36 */ 37 38#include "opt_debug_npx.h" 39#include "opt_math_emulate.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/bus.h> --- 675 unchanged lines hidden (view full) --- 719void 720npx_intr(dummy) 721 void *dummy; 722{ 723 int code; 724 u_short control; 725 struct intrframe *frame; 726 |
727 mtx_enter(&Giant, MTX_DEF); | 727 mtx_lock(&Giant); |
728 if (PCPU_GET(npxproc) == NULL || !npx_exists) { 729 printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n", 730 PCPU_GET(npxproc), curproc, npx_exists); 731 panic("npxintr from nowhere"); 732 } 733 if (PCPU_GET(npxproc) != curproc) { 734 printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n", 735 PCPU_GET(npxproc), curproc, npx_exists); --- 42 unchanged lines hidden (view full) --- 778 * trace trap. 779 * o an IRQ13 occurs at the same time as another higher- 780 * priority interrupt. 781 * 782 * Treat them like a true async interrupt. 783 */ 784 psignal(curproc, SIGFPE); 785 } | 728 if (PCPU_GET(npxproc) == NULL || !npx_exists) { 729 printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n", 730 PCPU_GET(npxproc), curproc, npx_exists); 731 panic("npxintr from nowhere"); 732 } 733 if (PCPU_GET(npxproc) != curproc) { 734 printf("npxintr: npxproc = %p, curproc = %p, npx_exists = %d\n", 735 PCPU_GET(npxproc), curproc, npx_exists); --- 42 unchanged lines hidden (view full) --- 778 * trace trap. 779 * o an IRQ13 occurs at the same time as another higher- 780 * priority interrupt. 781 * 782 * Treat them like a true async interrupt. 783 */ 784 psignal(curproc, SIGFPE); 785 } |
786 mtx_exit(&Giant, MTX_DEF); | 786 mtx_unlock(&Giant); |
787} 788 789/* 790 * Implement device not available (DNA) exception 791 * 792 * It would be better to switch FP context here (if curproc != npxproc) 793 * and not necessarily for every context switch, but it is too hard to 794 * access foreign pcb's. --- 199 unchanged lines hidden --- | 787} 788 789/* 790 * Implement device not available (DNA) exception 791 * 792 * It would be better to switch FP context here (if curproc != npxproc) 793 * and not necessarily for every context switch, but it is too hard to 794 * access foreign pcb's. --- 199 unchanged lines hidden --- |