Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: use asm-generic/mmu_context.h for no-op implementations

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Nicholas Piggin and committed by
Arnd Bergmann
0a1c8e54 586c4f24

+4 -33
+3 -8
arch/xtensa/include/asm/mmu_context.h
··· 111 111 * to -1 says the process has never run on any core. 112 112 */ 113 113 114 + #define init_new_context init_new_context 114 115 static inline int init_new_context(struct task_struct *tsk, 115 116 struct mm_struct *mm) 116 117 { ··· 137 136 activate_context(next, cpu); 138 137 } 139 138 140 - #define activate_mm(prev, next) switch_mm((prev), (next), NULL) 141 - #define deactivate_mm(tsk, mm) do { } while (0) 142 - 143 139 /* 144 140 * Destroy context related info for an mm_struct that is about 145 141 * to be put to rest. 146 142 */ 143 + #define destroy_context destroy_context 147 144 static inline void destroy_context(struct mm_struct *mm) 148 145 { 149 146 invalidate_page_directory(); 150 147 } 151 148 152 149 153 - static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 154 - { 155 - /* Nothing to do. */ 156 - 157 - } 150 + #include <asm-generic/mmu_context.h> 158 151 159 152 #endif /* CONFIG_MMU */ 160 153 #endif /* _XTENSA_MMU_CONTEXT_H */
+1 -25
arch/xtensa/include/asm/nommu_context.h
··· 7 7 { 8 8 } 9 9 10 - static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 11 - { 12 - } 13 - 14 - static inline int init_new_context(struct task_struct *tsk,struct mm_struct *mm) 15 - { 16 - return 0; 17 - } 18 - 19 - static inline void destroy_context(struct mm_struct *mm) 20 - { 21 - } 22 - 23 - static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) 24 - { 25 - } 26 - 27 - static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 28 - struct task_struct *tsk) 29 - { 30 - } 31 - 32 - static inline void deactivate_mm(struct task_struct *tsk, struct mm_struct *mm) 33 - { 34 - } 10 + #include <asm-generic/nommu_context.h>