* [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations
[not found] <20200728033405.78469-1-npiggin@gmail.com>
@ 2020-07-28 3:33 ` Nicholas Piggin
2020-07-30 21:20 ` Palmer Dabbelt
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2020-07-28 3:33 UTC (permalink / raw)
To: linux-arch
Cc: Albert Ou, Arnd Bergmann, linux-kernel, Nicholas Piggin, linux-mm,
Palmer Dabbelt, Paul Walmsley, linux-riscv
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
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 <linux/mm.h>
#include <linux/sched.h>
-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 <asm-generic/mmu_context.h>
#endif /* _ASM_RISCV_MMU_CONTEXT_H */
--
2.23.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations
2020-07-28 3:33 ` [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations Nicholas Piggin
@ 2020-07-30 21:20 ` Palmer Dabbelt
0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2020-07-30 21:20 UTC (permalink / raw)
To: npiggin
Cc: linux-arch, aou, Arnd Bergmann, linux-kernel, npiggin, linux-mm,
Paul Walmsley, linux-riscv
On Mon, 27 Jul 2020 20:33:58 PDT (-0700), npiggin@gmail.com wrote:
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: linux-riscv@lists.infradead.org
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> 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 <linux/mm.h>
> #include <linux/sched.h>
>
> -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 <asm-generic/mmu_context.h>
>
> #endif /* _ASM_RISCV_MMU_CONTEXT_H */
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
I'm assuming this is going in along with the others. Thanks!
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-30 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200728033405.78469-1-npiggin@gmail.com>
2020-07-28 3:33 ` [PATCH 17/24] riscv: use asm-generic/mmu_context.h for no-op implementations Nicholas Piggin
2020-07-30 21:20 ` Palmer Dabbelt
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).