]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Further work-out the handling of the high FP registers. The most
authormarcel <marcel@FreeBSD.org>
Wed, 12 Nov 2003 01:26:02 +0000 (01:26 +0000)
committermarcel <marcel@FreeBSD.org>
Wed, 12 Nov 2003 01:26:02 +0000 (01:26 +0000)
commit19c69bbd49c4d95a3cf228c609e4ee3257649d3a
tree7b376a522336a8c9ffd97c3c91a85f1333fbc1f2
parentdfaa7af61be5f69136519a90e14b1615b99b931d
Further work-out the handling of the high FP registers. The most
important change is in cpu_switch() where we disable the high FP
registers for the thread that we switch-out if the CPU currently
has its high FP registers. This avoids that the high FP registers
remain enabled for the thread even when the CPU has unloaded them
or the thread migrated to another processor.
Likewise, when we switch-in a thread of that has its high FP
registers on the CPU, we enable them. This avoids an otherwise
harmless, but unnecessary trap to have them enabled.

The code that handles the disabled high FP trap (in trap()) has
been turned into a critical section for the most part to avoid
being preempted. If there's a race, we bail out and have the
processor trap again if necessary.

Avoid using the generic ia64_highfp_save() function when the
context is predictable. The function adds unnecessary overhead.
Don't use ia64_highfp_load() for the same reason. The function
is now unused and can be removed.

These changes make the lazy context switching of the high FP
registers in an UP kernel functional.
sys/ia64/ia64/interrupt.c
sys/ia64/ia64/machdep.c
sys/ia64/ia64/trap.c