diff options
author | 2010-07-01 23:20:13 +0000 | |
---|---|---|
committer | 2010-07-01 23:20:13 +0000 | |
commit | 85bbe66a7914a92d79d6441c596d2e5715a3c79d (patch) | |
tree | 940737c2aad2b334a119a4a52d08153e48a7fae5 | |
parent | Mobility hd4870 works, add it. (diff) | |
download | wireguard-openbsd-85bbe66a7914a92d79d6441c596d2e5715a3c79d.tar.xz wireguard-openbsd-85bbe66a7914a92d79d6441c596d2e5715a3c79d.zip |
When a process' FPU context is evicted or restored record which CPU the
context is on so that we can handle FPU shootdowns.
ok kettenis@
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 5f78e9aef69..44ec1edcecc 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.176 2010/07/01 05:33:32 jsing Exp $ */ +/* $OpenBSD: locore.S,v 1.177 2010/07/01 23:20:13 jsing Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -966,7 +966,10 @@ ENTRY(TLABEL(excpt),0) copy r8, arg0 mfctl cr29, r1 mtctl r0, ccr /* cause a reload after exception */ + ldw CI_FPU_STATE(r1), r16 stw r0, CI_FPU_STATE(r1) + stw r0, HFP_CPU(r16) + sync /* now, check for trap */ ldw 0(r9), r1 @@ -1040,7 +1043,10 @@ ENTRY(TLABEL(emu),0) $fpusw_emu mfctl cr29, r1 mtctl r0, ccr /* cause a reload after exception */ + ldw CI_FPU_STATE(r1), r16 stw r0, CI_FPU_STATE(r1) + stw r0, HFP_CPU(r16) + sync #if 0 /* here we emulate the fld/fst */ mfctl iir, r1 @@ -1082,6 +1088,12 @@ $fpusw_set copy r1, rp copy r17, arg0 + mfctl cr29, r1 + ldw CI_FPU_STATE(r1), r16 + stw r0, CI_FPU_STATE(r1) + stw r0, HFP_CPU(r16) + sync + $fpusw_nosave /* count switches */ .import uvmexp, data @@ -1126,6 +1138,9 @@ $fpusw_nosave mfctl cr29, r1 stw r17, CI_FPU_STATE(r1) + mfctl cr30, r17 + stw r1, HFP_CPU(r17) + sync $fpusw_done rfir |