From 66d73f00a617be4feb45885a56fc5e6441b30a92 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 10 Feb 2009 09:49:00 +1000 Subject: [PATCH] m68k: merge the mmu and non-mmu versions of mmu_context.h Simple merge of the mmu and non-mmu versions of mmu_context.h Signed-off-by: Greg Ungerer --- .../asm/{mmu_context_mm.h => mmu_context.h} | 23 ++++++++++++++- arch/m68k/include/asm/mmu_context_no.h | 33 ---------------------- 2 files changed, 22 insertions(+), 34 deletions(-) rename arch/m68k/include/asm/{mmu_context_mm.h => mmu_context.h} (87%) delete mode 100644 arch/m68k/include/asm/mmu_context_no.h diff --git a/arch/m68k/include/asm/mmu_context_mm.h b/arch/m68k/include/asm/mmu_context.h similarity index 87% rename from arch/m68k/include/asm/mmu_context_mm.h rename to arch/m68k/include/asm/mmu_context.h index 894dacbcee1..7d4341e55a9 100644 --- a/arch/m68k/include/asm/mmu_context_mm.h +++ b/arch/m68k/include/asm/mmu_context.h @@ -7,6 +7,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { } +#ifdef CONFIG_MMU #ifndef CONFIG_SUN3 #include @@ -151,4 +152,24 @@ static inline void activate_mm(struct mm_struct *prev_mm, } #endif -#endif +#else /* !CONFIG_MMU */ + +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) +#define deactivate_mm(tsk,mm) do { } while (0) + +static inline void activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) +{ +} + +#endif /* CONFIG_MMU */ +#endif /* __M68K_MMU_CONTEXT_H */ diff --git a/arch/m68k/include/asm/mmu_context_no.h b/arch/m68k/include/asm/mmu_context_no.h deleted file mode 100644 index 9ccee4278c9..00000000000 --- a/arch/m68k/include/asm/mmu_context_no.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __M68KNOMMU_MMU_CONTEXT_H -#define __M68KNOMMU_MMU_CONTEXT_H - -#include -#include -#include -#include - -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - -static inline int -init_new_context(struct task_struct *tsk, struct mm_struct *mm) -{ - // mm->context = virt_to_phys(mm->pgd); - return(0); -} - -#define destroy_context(mm) do { } while(0) - -static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) -{ -} - -#define deactivate_mm(tsk,mm) do { } while (0) - -static inline void activate_mm(struct mm_struct *prev_mm, - struct mm_struct *next_mm) -{ -} - -#endif -- 2.11.4.GIT