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

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

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 4146bdab
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
/* /*
* Most if the context management is out of line * Most if the context management is out of line
*/ */
#define init_new_context init_new_context
extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
#define destroy_context destroy_context
extern void destroy_context(struct mm_struct *mm); extern void destroy_context(struct mm_struct *mm);
#ifdef CONFIG_SPAPR_TCE_IOMMU #ifdef CONFIG_SPAPR_TCE_IOMMU
struct mm_iommu_table_group_mem_t; struct mm_iommu_table_group_mem_t;
...@@ -235,27 +237,26 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -235,27 +237,26 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
} }
#define switch_mm_irqs_off switch_mm_irqs_off #define switch_mm_irqs_off switch_mm_irqs_off
#define deactivate_mm(tsk,mm) do { } while (0)
/* /*
* 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 *prev, struct mm_struct *next) static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
{ {
switch_mm_irqs_off(prev, next, current); switch_mm_irqs_off(prev, next, current);
} }
/* We don't currently use enter_lazy_tlb() for anything */ /* We don't currently use enter_lazy_tlb() for anything */
#ifdef CONFIG_PPC_BOOK3E_64
#define enter_lazy_tlb enter_lazy_tlb
static inline void enter_lazy_tlb(struct mm_struct *mm, static inline void enter_lazy_tlb(struct mm_struct *mm,
struct task_struct *tsk) struct task_struct *tsk)
{ {
/* 64-bit Book3E keeps track of current PGD in the PACA */ /* 64-bit Book3E keeps track of current PGD in the PACA */
#ifdef CONFIG_PPC_BOOK3E_64
get_paca()->pgd = NULL; get_paca()->pgd = NULL;
#endif
} }
#endif
extern void arch_exit_mmap(struct mm_struct *mm); extern void arch_exit_mmap(struct mm_struct *mm);
...@@ -298,5 +299,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, ...@@ -298,5 +299,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm,
return 0; return 0;
} }
#include <asm-generic/mmu_context.h>
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASM_POWERPC_MMU_CONTEXT_H */ #endif /* __ASM_POWERPC_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