diff options
| author | matt <matt@NetBSD.org> | 2014-05-16 19:18:21 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2014-05-16 19:18:21 +0000 |
| commit | 59f685e09baa54be2385dbda14fbbff4fe08a1e5 (patch) | |
| tree | d8e37262da7db06672cd6cd58bdb81d80bb60b00 /sys/arch/alpha/include | |
| parent | ce6925213d9291a3228ca5c1efba6ff2d3600ab8 (diff) | |
Cleanup and simplify PCU FP support. Nuke MDLWP_FPUSED.
Diffstat (limited to 'sys/arch/alpha/include')
| -rw-r--r-- | sys/arch/alpha/include/alpha.h | 13 | ||||
| -rw-r--r-- | sys/arch/alpha/include/proc.h | 9 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/alpha/include/alpha.h b/sys/arch/alpha/include/alpha.h index 7f517023ed2..e68876511b6 100644 --- a/sys/arch/alpha/include/alpha.h +++ b/sys/arch/alpha/include/alpha.h @@ -1,4 +1,4 @@ -/* $NetBSD: alpha.h,v 1.33 2014/05/16 00:48:41 rmind Exp $ */ +/* $NetBSD: alpha.h,v 1.34 2014/05/16 19:18:21 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -113,6 +113,13 @@ void fpu_state_load(struct lwp *, u_int); void fpu_state_save(struct lwp *); void fpu_state_release(struct lwp *); +static inline bool +fpu_valid_p(struct lwp *l) +{ + KASSERT(l == curlwp); + return pcu_valid_p(&fpu_ops); +} + static inline void fpu_load(void) { @@ -126,9 +133,9 @@ fpu_save(void) } static inline void -fpu_discard(void) +fpu_discard(bool valid_p) { - pcu_discard(&fpu_ops, false); + pcu_discard(&fpu_ops, valid_p); } void alpha_patch(bool); diff --git a/sys/arch/alpha/include/proc.h b/sys/arch/alpha/include/proc.h index 00c8f30597c..233820644ef 100644 --- a/sys/arch/alpha/include/proc.h +++ b/sys/arch/alpha/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.21 2012/02/06 02:14:13 matt Exp $ */ +/* $NetBSD: proc.h,v 1.22 2014/05/16 19:18:21 matt Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -61,7 +61,6 @@ struct mdlwp { * C99 API's, the use of the MDLWP_FP_C bits is defined variously in * ieeefp.h and fpu.h. */ -#define MDLWP_FPUSED 0x00000001 /* LWP used the FPU */ #define MDLWP_FP_C 0x007ffffe /* Extended FP_C Quadword bits */ #define MDLWP_FPACTIVE __BIT(63) /* FPU is active on LWP's PCU CPU */ @@ -74,10 +73,4 @@ struct mdproc { void (*md_syscall)(struct lwp *, uint64_t, struct trapframe *); }; -#ifdef _KERNEL -#define fpu_used_p(l) (((l)->l_md.md_flags & MDLWP_FPUSED) != 0) -#define fpu_mark_used(l) ((void)((l)->l_md.md_flags |= MDLWP_FPUSED)) -#endif - - #endif /* !_ALPHA_PROC_H_ */ |
