projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c94d89f
)
arm64: Implement task_cpu_possible_mask()
author
Will Deacon
<will@kernel.org>
Fri, 30 Jul 2021 11:24:37 +0000
(12:24 +0100)
committer
Peter Zijlstra
<peterz@infradead.org>
Fri, 20 Aug 2021 10:33:06 +0000
(12:33 +0200)
Provide an implementation of task_cpu_possible_mask() so that we can
prevent 64-bit-only cores being added to the 'cpus_mask' for compat
tasks on systems with mismatched 32-bit support at EL0,
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link:
https://lore.kernel.org/r/20210730112443.23245-11-will@kernel.org
arch/arm64/include/asm/mmu_context.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm64/include/asm/mmu_context.h
b/arch/arm64/include/asm/mmu_context.h
index eeb210997149a96d56a8111bcb7028be3974b55f..f4ba93d4ffebe9ddc763056ff4a7664c0be64e9a 100644
(file)
--- a/
arch/arm64/include/asm/mmu_context.h
+++ b/
arch/arm64/include/asm/mmu_context.h
@@
-231,6
+231,19
@@
switch_mm(struct mm_struct *prev, struct mm_struct *next,
update_saved_ttbr0(tsk, next);
}
+static inline const struct cpumask *
+task_cpu_possible_mask(struct task_struct *p)
+{
+ if (!static_branch_unlikely(&arm64_mismatched_32bit_el0))
+ return cpu_possible_mask;
+
+ if (!is_compat_thread(task_thread_info(p)))
+ return cpu_possible_mask;
+
+ return system_32bit_el0_cpumask();
+}
+#define task_cpu_possible_mask task_cpu_possible_mask
+
void verify_cpu_asid_bits(void);
void post_ttbr_update_workaround(void);