hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/arch/parisc/include/asm/mmu_context.h
....@@ -5,8 +5,7 @@
55 #include <linux/mm.h>
66 #include <linux/sched.h>
77 #include <linux/atomic.h>
8
-#include <asm/pgalloc.h>
9
-#include <asm/pgtable.h>
8
+#include <linux/spinlock.h>
109 #include <asm-generic/mm_hooks.h>
1110
1211 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
....@@ -54,6 +53,12 @@
5453 struct mm_struct *next, struct task_struct *tsk)
5554 {
5655 if (prev != next) {
56
+#ifdef CONFIG_TLB_PTLOCK
57
+ /* put physical address of page_table_lock in cr28 (tr4)
58
+ for TLB faults */
59
+ spinlock_t *pgd_lock = &next->page_table_lock;
60
+ mtctl(__pa(__ldcw_align(&pgd_lock->rlock.raw_lock)), 28);
61
+#endif
5762 mtctl(__pa(next->pgd), 25);
5863 load_context(next->context);
5964 }