arm64: capabilities: Introduce weak features based on local CPU
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 24 Oct 2019 12:48:06 +0000 (14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:17:19 +0000 (09:17 +0100)
commit32354dd01c29c97b68b00e9816617d50b7f3659f
tree5add503cf178224b9c587b377573685ca45ee8c0
parentf1696036165b7369ef73f96953c15d495ff60497
arm64: capabilities: Introduce weak features based on local CPU

[ Upstream commit 5c137714dd8cae464dbd5f028c07af149e6d09fc ]

Now that we have the flexibility of defining system features based
on individual CPUs, introduce CPU feature type that can be detected
on a local SCOPE and ignores the conflict on late CPUs. This is
applicable for ARM64_HAS_NO_HW_PREFETCH, where it is fine for
the system to have CPUs without hardware prefetch turning up
later. We only suffer a performance penalty, nothing fatal.

Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: Dave Martin <dave.martin@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c