Commit ca0f34b5 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Arnd Bergmann

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

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c350f8c7
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
#include <asm-generic/mm_hooks.h> #include <asm-generic/mm_hooks.h>
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
}
/* Initialize a new mmu context. This is invoked when a new /* Initialize a new mmu context. This is invoked when a new
* address space instance (unique or shared) is instantiated. * address space instance (unique or shared) is instantiated.
*/ */
#define init_new_context init_new_context
int init_new_context(struct task_struct *tsk, struct mm_struct *mm); int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
/* Destroy a dead context. This occurs when mmput drops the /* Destroy a dead context. This occurs when mmput drops the
...@@ -20,17 +17,18 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm); ...@@ -20,17 +17,18 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
* all the page tables have been flushed. Our job is to destroy * all the page tables have been flushed. Our job is to destroy
* any remaining processor-specific state. * any remaining processor-specific state.
*/ */
#define destroy_context destroy_context
void destroy_context(struct mm_struct *mm); void destroy_context(struct mm_struct *mm);
/* Switch the current MM context. */ /* Switch the current MM context. */
void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm,
struct task_struct *tsk); struct task_struct *tsk);
#define deactivate_mm(tsk,mm) do { } while (0)
/* Activate a new MM instance for the current task. */ /* Activate a new MM instance for the current task. */
#define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL) #define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL)
#include <asm-generic/mmu_context.h>
#endif /* !(__ASSEMBLY__) */ #endif /* !(__ASSEMBLY__) */
#endif /* !(__SPARC_MMU_CONTEXT_H) */ #endif /* !(__SPARC_MMU_CONTEXT_H) */
...@@ -16,17 +16,16 @@ ...@@ -16,17 +16,16 @@
#include <asm-generic/mm_hooks.h> #include <asm-generic/mm_hooks.h>
#include <asm/percpu.h> #include <asm/percpu.h>
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
}
extern spinlock_t ctx_alloc_lock; extern spinlock_t ctx_alloc_lock;
extern unsigned long tlb_context_cache; extern unsigned long tlb_context_cache;
extern unsigned long mmu_context_bmap[]; extern unsigned long mmu_context_bmap[];
DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm);
void get_new_mmu_context(struct mm_struct *mm); void get_new_mmu_context(struct mm_struct *mm);
#define init_new_context init_new_context
int init_new_context(struct task_struct *tsk, struct mm_struct *mm); int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
#define destroy_context destroy_context
void destroy_context(struct mm_struct *mm); void destroy_context(struct mm_struct *mm);
void __tsb_context_switch(unsigned long pgd_pa, void __tsb_context_switch(unsigned long pgd_pa,
...@@ -136,7 +135,6 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str ...@@ -136,7 +135,6 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
spin_unlock_irqrestore(&mm->context.lock, flags); spin_unlock_irqrestore(&mm->context.lock, flags);
} }
#define deactivate_mm(tsk,mm) do { } while (0)
#define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL) #define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL)
#define __HAVE_ARCH_START_CONTEXT_SWITCH #define __HAVE_ARCH_START_CONTEXT_SWITCH
...@@ -187,6 +185,8 @@ static inline void finish_arch_post_lock_switch(void) ...@@ -187,6 +185,8 @@ static inline void finish_arch_post_lock_switch(void)
} }
} }
#include <asm-generic/mmu_context.h>
#endif /* !(__ASSEMBLY__) */ #endif /* !(__ASSEMBLY__) */
#endif /* !(__SPARC64_MMU_CONTEXT_H) */ #endif /* !(__SPARC64_MMU_CONTEXT_H) */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment