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

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

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Nicholas Piggin and committed by
Arnd Bergmann
ca0f34b5 c350f8c7

+9 -11
+4 -6
arch/sparc/include/asm/mmu_context_32.h
··· 6 6 7 7 #include <asm-generic/mm_hooks.h> 8 8 9 - static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 10 - { 11 - } 12 - 13 9 /* Initialize a new mmu context. This is invoked when a new 14 10 * address space instance (unique or shared) is instantiated. 15 11 */ 12 + #define init_new_context init_new_context 16 13 int init_new_context(struct task_struct *tsk, struct mm_struct *mm); 17 14 18 15 /* Destroy a dead context. This occurs when mmput drops the ··· 17 20 * all the page tables have been flushed. Our job is to destroy 18 21 * any remaining processor-specific state. 19 22 */ 23 + #define destroy_context destroy_context 20 24 void destroy_context(struct mm_struct *mm); 21 25 22 26 /* Switch the current MM context. */ 23 27 void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, 24 28 struct task_struct *tsk); 25 29 26 - #define deactivate_mm(tsk,mm) do { } while (0) 27 - 28 30 /* Activate a new MM instance for the current task. */ 29 31 #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL) 32 + 33 + #include <asm-generic/mmu_context.h> 30 34 31 35 #endif /* !(__ASSEMBLY__) */ 32 36
+5 -5
arch/sparc/include/asm/mmu_context_64.h
··· 16 16 #include <asm-generic/mm_hooks.h> 17 17 #include <asm/percpu.h> 18 18 19 - static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 20 - { 21 - } 22 - 23 19 extern spinlock_t ctx_alloc_lock; 24 20 extern unsigned long tlb_context_cache; 25 21 extern unsigned long mmu_context_bmap[]; 26 22 27 23 DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); 28 24 void get_new_mmu_context(struct mm_struct *mm); 25 + 26 + #define init_new_context init_new_context 29 27 int init_new_context(struct task_struct *tsk, struct mm_struct *mm); 28 + #define destroy_context destroy_context 30 29 void destroy_context(struct mm_struct *mm); 31 30 32 31 void __tsb_context_switch(unsigned long pgd_pa, ··· 135 136 spin_unlock_irqrestore(&mm->context.lock, flags); 136 137 } 137 138 138 - #define deactivate_mm(tsk,mm) do { } while (0) 139 139 #define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL) 140 140 141 141 #define __HAVE_ARCH_START_CONTEXT_SWITCH ··· 184 186 } 185 187 } 186 188 } 189 + 190 + #include <asm-generic/mmu_context.h> 187 191 188 192 #endif /* !(__ASSEMBLY__) */ 189 193