Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162271036
D26032.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
749 B
Referenced Files
None
Subscribers
None
D26032.diff
View Options
Index: head/sys/libkern/gsb_crc32.c
===================================================================
--- head/sys/libkern/gsb_crc32.c
+++ head/sys/libkern/gsb_crc32.c
@@ -58,7 +58,8 @@
#endif
#if defined(__aarch64__)
-#include <machine/cpu.h>
+#include <machine/elf.h>
+#include <machine/md_var.h>
#endif
#endif /* _KERNEL */
@@ -755,14 +756,7 @@
} else
#endif
#if defined(__aarch64__)
- uint64_t reg;
-
- /*
- * We only test for CRC32 support on the CPU with index 0 assuming that
- * this applies to all CPUs.
- */
- reg = READ_SPECIALREG(id_aa64isar0_el1);
- if (ID_AA64ISAR0_CRC32_VAL(reg) != ID_AA64ISAR0_CRC32_NONE) {
+ if ((elf_hwcap & HWCAP_CRC32) != 0) {
return (armv8_crc32c(crc32c, buffer, length));
} else
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 12, 1:52 PM (12 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34998278
Default Alt Text
D26032.diff (749 B)
Attached To
Mode
D26032: arm64: check for CRC32 support via HWCAP
Attached
Detach File
Event Timeline
Log In to Comment