Commit 2fd171be authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Arnd Bergmann

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

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 8e51efc2
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
#include <asm-generic/mm_hooks.h> #include <asm-generic/mm_hooks.h>
#include <linux/mm_types.h> #include <linux/mm_types.h>
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
}
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
#if defined(CONFIG_COLDFIRE) #if defined(CONFIG_COLDFIRE)
...@@ -58,6 +54,7 @@ static inline void get_mmu_context(struct mm_struct *mm) ...@@ -58,6 +54,7 @@ static inline void get_mmu_context(struct mm_struct *mm)
/* /*
* We're finished using the context for an address space. * We're finished using the context for an address space.
*/ */
#define destroy_context destroy_context
static inline void destroy_context(struct mm_struct *mm) static inline void destroy_context(struct mm_struct *mm)
{ {
if (mm->context != NO_CONTEXT) { if (mm->context != NO_CONTEXT) {
...@@ -83,6 +80,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -83,6 +80,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
* After we have set current->mm to a new value, this activates * After we have set current->mm to a new value, this activates
* the context for the new mm so we see the new mappings. * the context for the new mm so we see the new mappings.
*/ */
#define activate_mm activate_mm
static inline void activate_mm(struct mm_struct *active_mm, static inline void activate_mm(struct mm_struct *active_mm,
struct mm_struct *mm) struct mm_struct *mm)
{ {
...@@ -90,8 +88,6 @@ static inline void activate_mm(struct mm_struct *active_mm, ...@@ -90,8 +88,6 @@ static inline void activate_mm(struct mm_struct *active_mm,
set_context(mm->context, mm->pgd); set_context(mm->context, mm->pgd);
} }
#define deactivate_mm(tsk, mm) do { } while (0)
#define prepare_arch_switch(next) load_ksp_mmu(next) #define prepare_arch_switch(next) load_ksp_mmu(next)
static inline void load_ksp_mmu(struct task_struct *task) static inline void load_ksp_mmu(struct task_struct *task)
...@@ -176,6 +172,7 @@ extern unsigned long get_free_context(struct mm_struct *mm); ...@@ -176,6 +172,7 @@ extern unsigned long get_free_context(struct mm_struct *mm);
extern void clear_context(unsigned long context); extern void clear_context(unsigned long context);
/* set the context for a new task to unmapped */ /* set the context for a new task to unmapped */
#define init_new_context init_new_context
static inline int init_new_context(struct task_struct *tsk, static inline int init_new_context(struct task_struct *tsk,
struct mm_struct *mm) struct mm_struct *mm)
{ {
...@@ -210,8 +207,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -210,8 +207,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
activate_context(tsk->mm); activate_context(tsk->mm);
} }
#define deactivate_mm(tsk, mm) do { } while (0) #define activate_mm activate_mm
static inline void activate_mm(struct mm_struct *prev_mm, static inline void activate_mm(struct mm_struct *prev_mm,
struct mm_struct *next_mm) struct mm_struct *next_mm)
{ {
...@@ -224,6 +220,7 @@ static inline void activate_mm(struct mm_struct *prev_mm, ...@@ -224,6 +220,7 @@ static inline void activate_mm(struct mm_struct *prev_mm,
#include <asm/page.h> #include <asm/page.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#define init_new_context init_new_context
static inline int init_new_context(struct task_struct *tsk, static inline int init_new_context(struct task_struct *tsk,
struct mm_struct *mm) struct mm_struct *mm)
{ {
...@@ -231,8 +228,6 @@ static inline int init_new_context(struct task_struct *tsk, ...@@ -231,8 +228,6 @@ static inline int init_new_context(struct task_struct *tsk,
return 0; return 0;
} }
#define destroy_context(mm) do { } while(0)
static inline void switch_mm_0230(struct mm_struct *mm) static inline void switch_mm_0230(struct mm_struct *mm)
{ {
unsigned long crp[2] = { unsigned long crp[2] = {
...@@ -300,8 +295,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, str ...@@ -300,8 +295,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, str
} }
} }
#define deactivate_mm(tsk,mm) do { } while (0) #define activate_mm activate_mm
static inline void activate_mm(struct mm_struct *prev_mm, static inline void activate_mm(struct mm_struct *prev_mm,
struct mm_struct *next_mm) struct mm_struct *next_mm)
{ {
...@@ -315,24 +309,11 @@ static inline void activate_mm(struct mm_struct *prev_mm, ...@@ -315,24 +309,11 @@ static inline void activate_mm(struct mm_struct *prev_mm,
#endif #endif
#else /* !CONFIG_MMU */ #include <asm-generic/mmu_context.h>
static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
return 0;
}
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
{
}
#define destroy_context(mm) do { } while (0) #else /* !CONFIG_MMU */
#define deactivate_mm(tsk,mm) do { } while (0)
static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) #include <asm-generic/nommu_context.h>
{
}
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
#endif /* __M68K_MMU_CONTEXT_H */ #endif /* __M68K_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