aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r--arch/arm64/include/asm/mmu_context.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index f68465dee026..e2bc385adb6b 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -35,6 +35,21 @@ extern unsigned int cpu_last_asid;
35void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); 35void __init_new_context(struct task_struct *tsk, struct mm_struct *mm);
36void __new_context(struct mm_struct *mm); 36void __new_context(struct mm_struct *mm);
37 37
38#ifdef CONFIG_PID_IN_CONTEXTIDR
39static inline void contextidr_thread_switch(struct task_struct *next)
40{
41 asm(
42 " msr contextidr_el1, %0\n"
43 " isb"
44 :
45 : "r" (task_pid_nr(next)));
46}
47#else
48static inline void contextidr_thread_switch(struct task_struct *next)
49{
50}
51#endif
52
38/* 53/*
39 * Set TTBR0 to empty_zero_page. No translations will be possible via TTBR0. 54 * Set TTBR0 to empty_zero_page. No translations will be possible via TTBR0.
40 */ 55 */