diff options
author | Marc Zyngier <Marc.Zyngier@arm.com> | 2013-06-21 07:07:27 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-06-24 10:27:35 -0400 |
commit | 0d0752bca1f9a91fb646647aa4abbb21156f316c (patch) | |
tree | d5cedcc1ba2f3fd4ed4c095c98851ed1ecf4e110 /arch/arm/include/asm/mmu_context.h | |
parent | b8e4a4740fa2b17c0a447b3ab783b3dc10702e27 (diff) |
ARM: 7769/1: Cortex-A15: fix erratum 798181 implementation
Looking into the active_asids array is not enough, as we also need
to look into the reserved_asids array (they both represent processes
that are currently running).
Also, not holding the ASID allocator lock is racy, as another CPU
could schedule that process and trigger a rollover, making the erratum
workaround miss an IPI.
Exposing this outside of context.c is a little ugly on the side, so
let's define a new entry point that the erratum workaround can call
to obtain the cpumask.
Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/mmu_context.h')
-rw-r--r-- | arch/arm/include/asm/mmu_context.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 2a45c33ebdc8..b5792b7fd8d3 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -28,7 +28,15 @@ void __check_vmalloc_seq(struct mm_struct *mm); | |||
28 | void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); | 28 | void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); |
29 | #define init_new_context(tsk,mm) ({ atomic64_set(&mm->context.id, 0); 0; }) | 29 | #define init_new_context(tsk,mm) ({ atomic64_set(&mm->context.id, 0); 0; }) |
30 | 30 | ||
31 | DECLARE_PER_CPU(atomic64_t, active_asids); | 31 | #ifdef CONFIG_ARM_ERRATA_798181 |
32 | void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, | ||
33 | cpumask_t *mask); | ||
34 | #else /* !CONFIG_ARM_ERRATA_798181 */ | ||
35 | static inline void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, | ||
36 | cpumask_t *mask) | ||
37 | { | ||
38 | } | ||
39 | #endif /* CONFIG_ARM_ERRATA_798181 */ | ||
32 | 40 | ||
33 | #else /* !CONFIG_CPU_HAS_ASID */ | 41 | #else /* !CONFIG_CPU_HAS_ASID */ |
34 | 42 | ||