mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
kselftest/arm64: Add lsfe to the hwcaps test
This feature has no traps associated with it so the SIGILL is not reliable. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
09b5febf84
commit
777fb19ed8
|
|
@ -17,6 +17,8 @@
|
|||
#include <asm/sigcontext.h>
|
||||
#include <asm/unistd.h>
|
||||
|
||||
#include <linux/auxvec.h>
|
||||
|
||||
#include "../../kselftest.h"
|
||||
|
||||
#define TESTS_PER_HWCAP 3
|
||||
|
|
@ -168,6 +170,18 @@ static void lse128_sigill(void)
|
|||
: "cc", "memory");
|
||||
}
|
||||
|
||||
static void lsfe_sigill(void)
|
||||
{
|
||||
float __attribute__ ((aligned (16))) mem;
|
||||
register float *memp asm ("x0") = &mem;
|
||||
|
||||
/* STFADD H0, [X0] */
|
||||
asm volatile(".inst 0x7c20801f"
|
||||
: "+r" (memp)
|
||||
:
|
||||
: "memory");
|
||||
}
|
||||
|
||||
static void lut_sigill(void)
|
||||
{
|
||||
/* LUTI2 V0.16B, { V0.16B }, V[0] */
|
||||
|
|
@ -761,6 +775,13 @@ static const struct hwcap_data {
|
|||
.cpuinfo = "lse128",
|
||||
.sigill_fn = lse128_sigill,
|
||||
},
|
||||
{
|
||||
.name = "LSFE",
|
||||
.at_hwcap = AT_HWCAP3,
|
||||
.hwcap_bit = HWCAP3_LSFE,
|
||||
.cpuinfo = "lsfe",
|
||||
.sigill_fn = lsfe_sigill,
|
||||
},
|
||||
{
|
||||
.name = "LUT",
|
||||
.at_hwcap = AT_HWCAP2,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user