simd.h 397 B

1234567891011121314
  1. #include <linux/hardirq.h>
  2. /*
  3. * may_use_simd - whether it is allowable at this time to issue SIMD
  4. * instructions or access the SIMD register file
  5. *
  6. * As architectures typically don't preserve the SIMD register file when
  7. * taking an interrupt, !in_interrupt() should be a reasonable default.
  8. */
  9. static __must_check inline bool may_use_simd(void)
  10. {
  11. return !in_interrupt();
  12. }