diff options
author | marcel <marcel@FreeBSD.org> | 2009-10-31 22:27:31 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-10-31 22:27:31 +0000 |
commit | 943e1b107a9100189f9c88ee1313ce81a7ed1ba5 (patch) | |
tree | cbe2460180af94e36765a193aa0c297777924c50 /sys/ia64/include | |
parent | 113d2ed8a6d71af32a5432b6d3892b57eaf4f0cc (diff) | |
download | FreeBSD-src-943e1b107a9100189f9c88ee1313ce81a7ed1ba5.zip FreeBSD-src-943e1b107a9100189f9c88ee1313ce81a7ed1ba5.tar.gz |
Reimplement the lazy FP context switching:
o Move all code into a single file for easier maintenance.
o Use a single global lock to avoid having to handle either
multiple locks or race conditions.
o Make sure to disable the high FP registers after saving
or dropping them.
o use msleep() to wait for the other CPU to save the high
FP registers.
This change fixes the high FP inconsistency panics.
A single global lock typically serializes too much, which may
be noticable when a lot of threads use the high FP registers,
but in that case it's probably better to switch the high FP
context synchronuously. Put differently: cpu_switch() should
switch the high FP registers if the incoming and outgoing
threads both use the high FP registers.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r-- | sys/ia64/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/ia64/include/proc.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index adc4725..6ee4cb4 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -86,7 +86,9 @@ int ia64_emulate(struct trapframe *, struct thread *); int ia64_flush_dirty(struct thread *, struct _special *); uint64_t ia64_get_hcdp(void); int ia64_highfp_drop(struct thread *); +int ia64_highfp_enable(struct thread *, struct trapframe *); int ia64_highfp_save(struct thread *); +int ia64_highfp_save_ipi(void); struct ia64_init_return ia64_init(void); void ia64_probe_sapics(void); void ia64_sync_icache(vm_offset_t, vm_size_t); diff --git a/sys/ia64/include/proc.h b/sys/ia64/include/proc.h index 5cbc0bf..6bf9c78 100644 --- a/sys/ia64/include/proc.h +++ b/sys/ia64/include/proc.h @@ -30,7 +30,6 @@ #define _MACHINE_PROC_H_ struct mdthread { - struct mtx md_highfp_mtx; int md_spinlock_count; /* (k) */ int md_saved_intr; /* (k) */ }; |