diff options
author | Paul Burton <paul.burton@mips.com> | 2018-11-07 18:14:09 -0500 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-11-09 13:23:18 -0500 |
commit | 36a498035bd2e5169bbceed1e3b0c8bb0ce5a7b4 (patch) | |
tree | a56b00865d9ec4048c50dcc0aefbbc26d1bc155e | |
parent | ea6a37373f9aca4ecb98ea3a298fda57177ee6a5 (diff) |
MIPS: Avoid FCSR sanitization when CONFIG_MIPS_FP_SUPPORT=n
When CONFIG_MIPS_FP_SUPPORT=n we don't support floating point, so we
don't need to worry about floating point exceptions pending in the
Floating point Control & Status Register (FCSR) during switch_to(). Stub
out the __sanitize_fcr31() macro in this case.
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21010/
Cc: linux-mips@linux-mips.org
-rw-r--r-- | arch/mips/include/asm/switch_to.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index e610473d61b8..0f813bb753c6 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
@@ -84,7 +84,8 @@ do { \ | |||
84 | * Check FCSR for any unmasked exceptions pending set with `ptrace', | 84 | * Check FCSR for any unmasked exceptions pending set with `ptrace', |
85 | * clear them and send a signal. | 85 | * clear them and send a signal. |
86 | */ | 86 | */ |
87 | #define __sanitize_fcr31(next) \ | 87 | #ifdef CONFIG_MIPS_FP_SUPPORT |
88 | # define __sanitize_fcr31(next) \ | ||
88 | do { \ | 89 | do { \ |
89 | unsigned long fcr31 = mask_fcr31_x(next->thread.fpu.fcr31); \ | 90 | unsigned long fcr31 = mask_fcr31_x(next->thread.fpu.fcr31); \ |
90 | void __user *pc; \ | 91 | void __user *pc; \ |
@@ -95,6 +96,9 @@ do { \ | |||
95 | force_fcr31_sig(fcr31, pc, next); \ | 96 | force_fcr31_sig(fcr31, pc, next); \ |
96 | } \ | 97 | } \ |
97 | } while (0) | 98 | } while (0) |
99 | #else | ||
100 | # define __sanitize_fcr31(next) | ||
101 | #endif | ||
98 | 102 | ||
99 | /* | 103 | /* |
100 | * For newly created kernel threads switch_to() will return to | 104 | * For newly created kernel threads switch_to() will return to |