mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
kselftest/arm64: add AES feature check to hwcap test
Add the AES feature check in the set of hwcap tests. Signed-off-by: Zeng Heng <zengheng4@huawei.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815040915.3966955-3-zengheng4@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
7eb4ee6673
commit
3fc3c0d124
|
|
@ -34,6 +34,12 @@
|
|||
*/
|
||||
typedef void (*sig_fn)(void);
|
||||
|
||||
static void aes_sigill(void)
|
||||
{
|
||||
/* AESE V0.16B, V0.16B */
|
||||
asm volatile(".inst 0x4e284800" : : : );
|
||||
}
|
||||
|
||||
static void atomics_sigill(void)
|
||||
{
|
||||
/* STADD W0, [SP] */
|
||||
|
|
@ -273,6 +279,13 @@ static const struct hwcap_data {
|
|||
sig_fn sigbus_fn;
|
||||
bool sigbus_reliable;
|
||||
} hwcaps[] = {
|
||||
{
|
||||
.name = "AES",
|
||||
.at_hwcap = AT_HWCAP,
|
||||
.hwcap_bit = HWCAP_AES,
|
||||
.cpuinfo = "aes",
|
||||
.sigill_fn = aes_sigill,
|
||||
},
|
||||
{
|
||||
.name = "CRC32",
|
||||
.at_hwcap = AT_HWCAP,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user