arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 13 Jan 2020 23:30:20 +0000 (23:30 +0000)
committerWill Deacon <will@kernel.org>
Tue, 14 Jan 2020 17:11:36 +0000 (17:11 +0000)
commit7559950aef1ab8792c50797c6c5c7c5150a02460
tree6d4f657c932b27579cd4343cc17a094978d69e22
parent449443c03d8cfdacf7313e17779a2594ebf87e6d
arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly

We set the compat_elf_hwcap bits unconditionally on arm64 to
include the VFP and NEON support. However, the FP/SIMD unit
is optional on Arm v8 and thus could be missing. We already
handle this properly in the kernel, but still advertise to
the COMPAT applications that the VFP is available. Fix this
to make sure we only advertise when we really have them.

Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD")
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/cpufeature.c