arm64: Advertise support for Rounding double multiply instructions
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 12 Jan 2017 16:37:28 +0000 (16:37 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 12 Jan 2017 17:19:06 +0000 (17:19 +0000)
ARM v8.1 extensions include support for rounding double multiply
add/subtract instructions to the A64 SIMD instructions set. Let
the userspace know about it via a HWCAP bit.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/uapi/asm/hwcap.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c

index 773c90b..61c263c 100644 (file)
@@ -31,5 +31,6 @@
 #define HWCAP_FPHP             (1 << 9)
 #define HWCAP_ASIMDHP          (1 << 10)
 #define HWCAP_CPUID            (1 << 11)
+#define HWCAP_ASIMDRDM         (1 << 12)
 
 #endif /* _UAPI__ASM_HWCAP_H */
index 1661750..a995aae 100644 (file)
@@ -881,6 +881,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
        HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA2_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_SHA2),
        HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_CRC32_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_CRC32),
        HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_ATOMICS_SHIFT, FTR_UNSIGNED, 2, CAP_HWCAP, HWCAP_ATOMICS),
+       HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_RDM_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_ASIMDRDM),
        HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_FP),
        HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, FTR_SIGNED, 1, CAP_HWCAP, HWCAP_FPHP),
        HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_ASIMD),
index 4d44edd..5b22c68 100644 (file)
@@ -64,6 +64,7 @@ static const char *const hwcap_str[] = {
        "fphp",
        "asimdhp",
        "cpuid",
+       "asimdrdm",
        NULL
 };