diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2005-08-03 19:49:17 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-08-03 19:49:17 +0100 |
commit | f148af2593ef76ac705d1cc6abe48f455c9912cc (patch) | |
tree | cd1e0b0959624234ca3489df8888434ffea5050e /arch/arm/nwfpe/fpa11.h | |
parent | 1fcf844861eb08ee05e05dba13b5436f2f2e29ed (diff) | |
download | talos-op-linux-f148af2593ef76ac705d1cc6abe48f455c9912cc.tar.gz talos-op-linux-f148af2593ef76ac705d1cc6abe48f455c9912cc.zip |
[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.h | 11 |
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 @@ /* includes */ #include "fpsr.h" /* FP control and status register definitions */ #include "milieu.h" + +struct roundingData { + int8 mode; + int8 precision; + signed char exception; +}; + #include "softfloat.h" #define typeNone 0x00 @@ -84,8 +91,8 @@ typedef struct tagFPA11 { initialised. */ } FPA11; -extern void SetRoundingMode(const unsigned int); -extern void SetRoundingPrecision(const unsigned int); +extern int8 SetRoundingMode(const unsigned int); +extern int8 SetRoundingPrecision(const unsigned int); extern void nwfpe_init_fpa(union fp_state *fp); #endif |