summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/simd.h
blob: f57eb7b5c23b377934f8cf46fd85309715a1cd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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();
}
OpenPOWER on IntegriCloud