arm64: cpufeature: introduce helper cpu_has_hw_af()
authorJia He <justin.he@arm.com>
Fri, 11 Oct 2019 14:09:36 +0000 (22:09 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 18 Oct 2019 10:11:19 +0000 (11:11 +0100)
commit47d7b15b88f96a90694cfc607d0717d62dff6c45
tree535f14204b7beb59b3c2d43ee53ae71f6740b257
parent4f5cafb5cb8471e54afdc9054d973535614f7675
arm64: cpufeature: introduce helper cpu_has_hw_af()

We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have the feature. But sometimes we need to know
whether this cpu has the capability of HW AF. So decouple AF from
DBM by a new helper cpu_has_hw_af().

If later we noticed a potential performance issue on this path, we can
turn it into a static label as with other CPU features.

Signed-off-by: Jia He <justin.he@arm.com>
Suggested-by: Suzuki Poulose <Suzuki.Poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cpufeature.h