simd.h 436 B

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