aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/nwfpe/fpa11.h
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2005-08-03 14:49:17 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-08-03 14:49:17 -0400
commitf148af2593ef76ac705d1cc6abe48f455c9912cc (patch)
treecd1e0b0959624234ca3489df8888434ffea5050e /arch/arm/nwfpe/fpa11.h
parent1fcf844861eb08ee05e05dba13b5436f2f2e29ed (diff)
[PATCH] ARM: 2837/2: Re: ARM: Make NWFPE preempt safe
Patch from Richard Purdie NWFPE used global variables which meant it wasn't safe for use with preemptive kernels. This patch removes them and communicates the information between functions in a preempt safe manner. Generation of some exceptions was broken and this has also been corrected. Tests with glibc's maths test suite show no change in the results before/after this patch. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/nwfpe/fpa11.h')
-rw-r--r--arch/arm/nwfpe/fpa11.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h
index e4a61aea534b..93523ae4b7a1 100644
--- a/arch/arm/nwfpe/fpa11.h
+++ b/arch/arm/nwfpe/fpa11.h
@@ -37,6 +37,13 @@
37/* includes */ 37/* includes */
38#include "fpsr.h" /* FP control and status register definitions */ 38#include "fpsr.h" /* FP control and status register definitions */
39#include "milieu.h" 39#include "milieu.h"
40
41struct roundingData {
42 int8 mode;
43 int8 precision;
44 signed char exception;
45};
46
40#include "softfloat.h" 47#include "softfloat.h"
41 48
42#define typeNone 0x00 49#define typeNone 0x00
@@ -84,8 +91,8 @@ typedef struct tagFPA11 {
84 initialised. */ 91 initialised. */
85} FPA11; 92} FPA11;
86 93
87extern void SetRoundingMode(const unsigned int); 94extern int8 SetRoundingMode(const unsigned int);
88extern void SetRoundingPrecision(const unsigned int); 95extern int8 SetRoundingPrecision(const unsigned int);
89extern void nwfpe_init_fpa(union fp_state *fp); 96extern void nwfpe_init_fpa(union fp_state *fp);
90 97
91#endif 98#endif