arm64: errata: Calling enable functions for CPU errata too

Currently we call the (optional) enable function for CPU _features_
only. As CPU _errata_ descriptions share the same data structure and
having an enable function is useful for errata as well (for instance
to set bits in SCTLR), lets call it when enumerating erratas too.

Change-Id: Ie5d4d14dc1c0006423196e9fc1b102655f0c13b2
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: 8e2318521bf5837dae093413f81292b59d49d030
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Resolve trivial merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
This commit is contained in:
Andre Przywara 2016-06-28 18:07:30 +01:00 committed by Srinivas Ramana
parent a7e3f3f2de
commit ce870f33b6
3 changed files with 9 additions and 2 deletions

View file

@ -170,7 +170,9 @@ void __init setup_cpu_features(void);
void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
const char *info);
void enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps);
void check_local_cpu_errata(void);
void __init enable_errata_workarounds(void);
#ifdef CONFIG_HOTPLUG_CPU
void verify_local_cpu_capabilities(void);

View file

@ -111,3 +111,8 @@ void check_local_cpu_errata(void)
{
update_cpu_capabilities(arm64_errata, "enabling workaround for");
}
void __init enable_errata_workarounds(void)
{
enable_cpu_capabilities(arm64_errata);
}

View file

@ -859,8 +859,7 @@ void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps,
* Run through the enabled capabilities and enable() it on all active
* CPUs
*/
static void __init
enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)
{
int i;
@ -1019,6 +1018,7 @@ void __init setup_cpu_features(void)
/* Set the CPU feature capabilies */
setup_feature_capabilities();
enable_errata_workarounds();
setup_cpu_hwcaps();
/* Advertise that we have computed the system capabilities */