arm64: capabilities: Allow features based on local CPU scope
commit33236e444f1c84b23ac265687578d2176640b2ba
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 24 Oct 2019 12:48:04 +0000 (24 14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:17:18 +0000 (29 09:17 +0100)
tree14880f815b09cd7252360dcabfcda08f5e5fb22c
parent0a599aa7daca84b95335667162f530292e91e3d1
arm64: capabilities: Allow features based on local CPU scope

[ Upstream commit fbd890b9b8497bab04c1d338bd97579a7bc53fab ]

So far we have treated the feature capabilities as system wide
and this wouldn't help with features that could be detected locally
on one or more CPUs (e.g, KPTI, Software prefetch). This patch
splits the feature detection to two phases :

 1) Local CPU features are checked on all boot time active CPUs.
 2) System wide features are checked only once after all CPUs are
    active.

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/kernel/cpufeature.c