diff options
author | Mark Brown <broonie@linaro.org> | 2014-06-19 13:18:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-19 13:18:00 +0100 |
commit | 9952ea5aee31bb082ca5f702507fb563ed23431f (patch) | |
tree | 46da00f62709cca4f434e4bdbdc43f5dcabc9b00 /include/asm-generic | |
parent | b621c22123dc6b6facafe115f6364cf80172d551 (diff) | |
parent | 696fe9b3a638b5545f7cbfd1e4536cdbdacab2a5 (diff) |
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-crypto' into linux-linaro-lsk
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/simd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-generic/simd.h b/include/asm-generic/simd.h new file mode 100644 index 000000000000..f57eb7b5c23b --- /dev/null +++ b/include/asm-generic/simd.h @@ -0,0 +1,14 @@ + +#include <linux/hardirq.h> + +/* + * may_use_simd - whether it is allowable at this time to issue SIMD + * instructions or access the SIMD register file + * + * As architectures typically don't preserve the SIMD register file when + * taking an interrupt, !in_interrupt() should be a reasonable default. + */ +static __must_check inline bool may_use_simd(void) +{ + return !in_interrupt(); +} |