OSDN Git Service

arm64: capabilities: Allow features based on local CPU scope
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 26 Mar 2018 14:12:37 +0000 (15:12 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 26 Mar 2018 17:01:39 +0000 (18:01 +0100)
commitfbd890b9b8497bab04c1d338bd97579a7bc53fab
tree721b537c97f2a4239ff92f6fb06386246e0e52fc
parentd69fe9a7e7214d49fe157ec20889892388d0fe23
arm64: capabilities: Allow features based on local CPU scope

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