projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb4ee6
)
kselftest/arm64: add AES feature check to hwcap test
author
Zeng Heng
<zengheng4@huawei.com>
Tue, 15 Aug 2023 04:09:13 +0000
(12:09 +0800)
committer
Will Deacon
<will@kernel.org>
Wed, 16 Aug 2023 14:24:01 +0000
(15:24 +0100)
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>
tools/testing/selftests/arm64/abi/hwcap.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/arm64/abi/hwcap.c
b/tools/testing/selftests/arm64/abi/hwcap.c
index 83d3b6dcc0d8a3f790c024e7a4026bd9e9912896..96c2611f1ac00ae86b2469f70106f36a802d089d 100644
(file)
--- a/
tools/testing/selftests/arm64/abi/hwcap.c
+++ b/
tools/testing/selftests/arm64/abi/hwcap.c
@@
-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,