From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicholas Piggin Subject: [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:58 +1000 Message-ID: <20200728033405.78469-18-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org List-Id: linux-arch.vger.kernel.org Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/riscv/include/asm/mmu_context.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h index 67c463812e2d..250defa06f3a 100644 --- a/arch/riscv/include/asm/mmu_context.h +++ b/arch/riscv/include/asm/mmu_context.h @@ -13,34 +13,16 @@ #include #include -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *task) -{ -} - -/* Initialize context-related info for a new mm_struct */ -static inline int init_new_context(struct task_struct *task, - struct mm_struct *mm) -{ - return 0; -} - -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *task); +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, NULL); } -static inline void deactivate_mm(struct task_struct *task, - struct mm_struct *mm) -{ -} +#include #endif /* _ASM_RISCV_MMU_CONTEXT_H */ -- 2.23.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Nicholas Piggin Subject: [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations Date: Tue, 28 Jul 2020 13:33:58 +1000 Message-ID: <20200728033405.78469-18-npiggin@gmail.com> In-Reply-To: <20200728033405.78469-1-npiggin@gmail.com> References: <20200728033405.78469-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: linux-arch@vger.kernel.org Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org List-ID: Message-ID: <20200728033358.H28fxy94VS5zpDoSTwFzBTn6IKfDf7e98H8izVC5Lsc@z> Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Nicholas Piggin --- arch/riscv/include/asm/mmu_context.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/as= m/mmu_context.h index 67c463812e2d..250defa06f3a 100644 --- a/arch/riscv/include/asm/mmu_context.h +++ b/arch/riscv/include/asm/mmu_context.h @@ -13,34 +13,16 @@ #include #include =20 -static inline void enter_lazy_tlb(struct mm_struct *mm, - struct task_struct *task) -{ -} - -/* Initialize context-related info for a new mm_struct */ -static inline int init_new_context(struct task_struct *task, - struct mm_struct *mm) -{ - return 0; -} - -static inline void destroy_context(struct mm_struct *mm) -{ -} - void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *task); =20 +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, NULL); } =20 -static inline void deactivate_mm(struct task_struct *task, - struct mm_struct *mm) -{ -} +#include =20 #endif /* _ASM_RISCV_MMU_CONTEXT_H */ --=20 2.23.0