* [PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations [not found] <20200826145249.745432-1-npiggin@gmail.com> @ 2020-08-26 14:52 ` Nicholas Piggin 2020-09-01 7:30 ` Michael Ellerman 0 siblings, 1 reply; 2+ messages in thread From: Nicholas Piggin @ 2020-08-26 14:52 UTC (permalink / raw) To: linux-arch Cc: Arnd Bergmann, linux-kernel, Nicholas Piggin, linux-mm, linuxppc-dev Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@ozlabs.org> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/include/asm/mmu_context.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 7f3658a97384..bc22e247ab55 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -14,7 +14,9 @@ /* * 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); +#define destroy_context destroy_context extern void destroy_context(struct mm_struct *mm); #ifdef CONFIG_SPAPR_TCE_IOMMU struct mm_iommu_table_group_mem_t; @@ -235,27 +237,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, } #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 - * the context for the new mm so we see the new mappings. - */ -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) -{ - switch_mm(prev, next, current); -} - -/* 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, struct task_struct *tsk) { /* 64-bit Book3E keeps track of current PGD in the PACA */ -#ifdef CONFIG_PPC_BOOK3E_64 get_paca()->pgd = NULL; -#endif } +#endif extern void arch_exit_mmap(struct mm_struct *mm); @@ -298,5 +288,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, return 0; } +#include <asm-generic/mmu_context.h> + #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */ -- 2.23.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations 2020-08-26 14:52 ` [PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations Nicholas Piggin @ 2020-09-01 7:30 ` Michael Ellerman 0 siblings, 0 replies; 2+ messages in thread From: Michael Ellerman @ 2020-09-01 7:30 UTC (permalink / raw) To: Nicholas Piggin, linux-arch Cc: Arnd Bergmann, linux-kernel, Nicholas Piggin, linux-mm, linuxppc-dev Nicholas Piggin <npiggin@gmail.com> writes: > Cc: Michael Ellerman <mpe@ellerman.id.au> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> > Cc: Paul Mackerras <paulus@ozlabs.org> > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > --- > arch/powerpc/include/asm/mmu_context.h | 22 +++++++--------------- > 1 file changed, 7 insertions(+), 15 deletions(-) Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) cheers > diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h > index 7f3658a97384..bc22e247ab55 100644 > --- a/arch/powerpc/include/asm/mmu_context.h > +++ b/arch/powerpc/include/asm/mmu_context.h > @@ -14,7 +14,9 @@ > /* > * 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); > +#define destroy_context destroy_context > extern void destroy_context(struct mm_struct *mm); > #ifdef CONFIG_SPAPR_TCE_IOMMU > struct mm_iommu_table_group_mem_t; > @@ -235,27 +237,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, > } > #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 > - * the context for the new mm so we see the new mappings. > - */ > -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) > -{ > - switch_mm(prev, next, current); > -} > - > -/* 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, > struct task_struct *tsk) > { > /* 64-bit Book3E keeps track of current PGD in the PACA */ > -#ifdef CONFIG_PPC_BOOK3E_64 > get_paca()->pgd = NULL; > -#endif > } > +#endif > > extern void arch_exit_mmap(struct mm_struct *mm); > > @@ -298,5 +288,7 @@ static inline int arch_dup_mmap(struct mm_struct *oldmm, > return 0; > } > > +#include <asm-generic/mmu_context.h> > + > #endif /* __KERNEL__ */ > #endif /* __ASM_POWERPC_MMU_CONTEXT_H */ > -- > 2.23.0 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-01 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200826145249.745432-1-npiggin@gmail.com>
2020-08-26 14:52 ` [PATCH v2 16/23] powerpc: use asm-generic/mmu_context.h for no-op implementations Nicholas Piggin
2020-09-01 7:30 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).