]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: arm64: cpu_errata: Allow an erratum to be match for all revisions...
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 1 Feb 2017 14:38:46 +0000 (14:38 +0000)
committerTim Gardner <tim.gardner@canonical.com>
Tue, 28 Mar 2017 20:17:54 +0000 (14:17 -0600)
BugLink: https://bugs.launchpad.net/bugs/1675509
Some minor erratum may not be fixed in further revisions of a core,
leading to a situation where the workaround needs to be updated each
time an updated core is released.

Introduce a MIDR_ALL_VERSIONS match helper that will work for all
versions of that MIDR, once and for all.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit 8b8ebca44292a59789c612c0e060c58cb7e0be40
 in the timers/errata-rework branch of
 git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/arm64/kernel/cpu_errata.c

index f6cc67e7626ec13d52920f3a3fd841216f3be350..2be1d1c053037145bfaabc131e7e4311cfc62e48 100644 (file)
@@ -53,6 +53,13 @@ static int cpu_enable_trap_ctr_access(void *__unused)
        .midr_range_min = min, \
        .midr_range_max = max
 
+#define MIDR_ALL_VERSIONS(model) \
+       .def_scope = SCOPE_LOCAL_CPU, \
+       .matches = is_affected_midr_range, \
+       .midr_model = model, \
+       .midr_range_min = 0, \
+       .midr_range_max = (MIDR_VARIANT_MASK | MIDR_REVISION_MASK)
+
 const struct arm64_cpu_capabilities arm64_errata[] = {
 #if    defined(CONFIG_ARM64_ERRATUM_826319) || \
        defined(CONFIG_ARM64_ERRATUM_827319) || \