diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-11 20:59:13 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-05-11 20:59:13 +0000 |
commit | e3b4abcb9607063735ea134eca6fad62f8147f20 (patch) | |
tree | 3cb2e5fa1795bfc2b2df6b0e72ce4b39e44f4ae0 /include/asm-mips64/processor.h | |
parent | aed9bea016318b0f4cd8b3ac9aae9cb0f78526ef (diff) |
SMP FPU management: similar to what sparc does, no lazy fpu context
switching in SMP mode, use PF_USEDFPU to determine whether a program
used the fpu in the last time quantum and so needs the fpu context
to be saved during context switch.
Diffstat (limited to 'include/asm-mips64/processor.h')
-rw-r--r-- | include/asm-mips64/processor.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h index 0532dbf0c..1932672e7 100644 --- a/include/asm-mips64/processor.h +++ b/include/asm-mips64/processor.h @@ -87,6 +87,14 @@ extern int EISA_bus; /* Lazy FPU handling on uni-processor */ extern struct task_struct *last_task_used_math; +#ifndef CONFIG_SMP +#define IS_FPU_OWNER() (last_task_used_math == current) +#define CLEAR_FPU_OWNER() last_task_used_math = NULL; +#else +#define IS_FPU_OWNER() (current->flags & PF_USEDFPU) +#define CLEAR_FPU_OWNER() current->flags &= ~PF_USEDFPU; +#endif + /* * User space process size: 1TB. This is hardcoded into a few places, * so don't change it unless you know what you are doing. TASK_SIZE |