Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kselftest/arm64: add crc32 feature to hwcap test

Add the CRC32 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/20230808134036.668954-3-zengheng4@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Zeng Heng and committed by
Will Deacon
09d2e95a eb27c76a

+12
+12
tools/testing/selftests/arm64/abi/hwcap.c
··· 33 33 */ 34 34 typedef void (*sigill_fn)(void); 35 35 36 + static void crc32_sigill(void) 37 + { 38 + asm volatile("crc32w w0, w0, w1"); 39 + } 40 + 36 41 static void cssc_sigill(void) 37 42 { 38 43 /* CNT x0, x0 */ ··· 238 233 sigill_fn sigill_fn; 239 234 bool sigill_reliable; 240 235 } hwcaps[] = { 236 + { 237 + .name = "CRC32", 238 + .at_hwcap = AT_HWCAP, 239 + .hwcap_bit = HWCAP_CRC32, 240 + .cpuinfo = "crc32", 241 + .sigill_fn = crc32_sigill, 242 + }, 241 243 { 242 244 .name = "CSSC", 243 245 .at_hwcap = AT_HWCAP2,