diff mbox series

[v2,12/23] nds32: use asm-generic/mmu_context.h for no-op implementations

Message ID 20200826145249.745432-13-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show
Series Use asm-generic for mmu_context no-op functions | expand

Commit Message

Nicholas Piggin Aug. 26, 2020, 2:52 p.m. UTC
Cc: Nick Hu <nickhu@andestech.com>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/nds32/include/asm/mmu_context.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Greentime Hu Aug. 28, 2020, 10:09 a.m. UTC | #1
Nicholas Piggin <npiggin@gmail.com> 於 2020年8月26日 週三 下午10:53寫道:
>
> Cc: Nick Hu <nickhu@andestech.com>
> Cc: Greentime Hu <green.hu@gmail.com>
> Cc: Vincent Chen <deanbo422@gmail.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>  arch/nds32/include/asm/mmu_context.h | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/nds32/include/asm/mmu_context.h b/arch/nds32/include/asm/mmu_context.h
> index b8fd3d189fdc..c651bc8cacdc 100644
> --- a/arch/nds32/include/asm/mmu_context.h
> +++ b/arch/nds32/include/asm/mmu_context.h
> @@ -9,6 +9,7 @@
>  #include <asm/proc-fns.h>
>  #include <asm-generic/mm_hooks.h>
>
> +#define init_new_context init_new_context
>  static inline int
>  init_new_context(struct task_struct *tsk, struct mm_struct *mm)
>  {
> @@ -16,8 +17,6 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
>         return 0;
>  }
>
> -#define destroy_context(mm)    do { } while(0)
> -
>  #define CID_BITS       9
>  extern spinlock_t cid_lock;
>  extern unsigned int cpu_last_cid;
> @@ -47,10 +46,6 @@ static inline void check_context(struct mm_struct *mm)
>                 __new_context(mm);
>  }
>
> -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
> -{
> -}
> -
>  static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
>                              struct task_struct *tsk)
>  {
> @@ -62,7 +57,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
>         }
>  }
>
> -#define deactivate_mm(tsk,mm)  do { } while (0)
> -#define activate_mm(prev,next) switch_mm(prev, next, NULL)
> +#include <asm-generic/mmu_context.h>
>
>  #endif

Acked-by: Greentime Hu <green.hu@gmail.com>
Thank you. :)
diff mbox series

Patch

diff --git a/arch/nds32/include/asm/mmu_context.h b/arch/nds32/include/asm/mmu_context.h
index b8fd3d189fdc..c651bc8cacdc 100644
--- a/arch/nds32/include/asm/mmu_context.h
+++ b/arch/nds32/include/asm/mmu_context.h
@@ -9,6 +9,7 @@ 
 #include <asm/proc-fns.h>
 #include <asm-generic/mm_hooks.h>
 
+#define init_new_context init_new_context
 static inline int
 init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
@@ -16,8 +17,6 @@  init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 	return 0;
 }
 
-#define destroy_context(mm)	do { } while(0)
-
 #define CID_BITS	9
 extern spinlock_t cid_lock;
 extern unsigned int cpu_last_cid;
@@ -47,10 +46,6 @@  static inline void check_context(struct mm_struct *mm)
 		__new_context(mm);
 }
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
-{
-}
-
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 			     struct task_struct *tsk)
 {
@@ -62,7 +57,6 @@  static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	}
 }
 
-#define deactivate_mm(tsk,mm)	do { } while (0)
-#define activate_mm(prev,next)	switch_mm(prev, next, NULL)
+#include <asm-generic/mmu_context.h>
 
 #endif