diff mbox series

[3/8] membarrier: Remove membarrier_arch_switch_mm() prototype in core code

Message ID 2d45c55c4fbbe38317ff625e2a2158b6fbe0dc2d.1623813516.git.luto@kernel.org (mailing list archive)
State New
Headers show
Series membarrier cleanups | expand

Commit Message

Andy Lutomirski June 16, 2021, 3:21 a.m. UTC
membarrier_arch_switch_mm()'s sole implementation and caller are in
arch/powerpc.  Having a fallback implementation in include/linux is
confusing -- remove it.

It's still mentioned in a comment, but a subsequent patch will remove
it.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 include/linux/sched/mm.h | 7 -------
 1 file changed, 7 deletions(-)

Comments

Nicholas Piggin June 16, 2021, 4:26 a.m. UTC | #1
Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm:
> membarrier_arch_switch_mm()'s sole implementation and caller are in
> arch/powerpc.  Having a fallback implementation in include/linux is
> confusing -- remove it.
> 
> It's still mentioned in a comment, but a subsequent patch will remove
> it.
> 
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>

Acked-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  include/linux/sched/mm.h | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
> index 24d97d1b6252..10aace21d25e 100644
> --- a/include/linux/sched/mm.h
> +++ b/include/linux/sched/mm.h
> @@ -350,13 +350,6 @@ extern void membarrier_exec_mmap(struct mm_struct *mm);
>  extern void membarrier_update_current_mm(struct mm_struct *next_mm);
>  
>  #else
> -#ifdef CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS
> -static inline void membarrier_arch_switch_mm(struct mm_struct *prev,
> -					     struct mm_struct *next,
> -					     struct task_struct *tsk)
> -{
> -}
> -#endif
>  static inline void membarrier_exec_mmap(struct mm_struct *mm)
>  {
>  }
> -- 
> 2.31.1
> 
>
Mathieu Desnoyers June 16, 2021, 5:52 p.m. UTC | #2
----- On Jun 15, 2021, at 11:21 PM, Andy Lutomirski luto@kernel.org wrote:

> membarrier_arch_switch_mm()'s sole implementation and caller are in
> arch/powerpc.  Having a fallback implementation in include/linux is
> confusing -- remove it.
> 
> It's still mentioned in a comment, but a subsequent patch will remove
> it.
> 

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> include/linux/sched/mm.h | 7 -------
> 1 file changed, 7 deletions(-)
> 
> diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
> index 24d97d1b6252..10aace21d25e 100644
> --- a/include/linux/sched/mm.h
> +++ b/include/linux/sched/mm.h
> @@ -350,13 +350,6 @@ extern void membarrier_exec_mmap(struct mm_struct *mm);
> extern void membarrier_update_current_mm(struct mm_struct *next_mm);
> 
> #else
> -#ifdef CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS
> -static inline void membarrier_arch_switch_mm(struct mm_struct *prev,
> -					     struct mm_struct *next,
> -					     struct task_struct *tsk)
> -{
> -}
> -#endif
> static inline void membarrier_exec_mmap(struct mm_struct *mm)
> {
> }
> --
> 2.31.1
diff mbox series

Patch

diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index 24d97d1b6252..10aace21d25e 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -350,13 +350,6 @@  extern void membarrier_exec_mmap(struct mm_struct *mm);
 extern void membarrier_update_current_mm(struct mm_struct *next_mm);
 
 #else
-#ifdef CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS
-static inline void membarrier_arch_switch_mm(struct mm_struct *prev,
-					     struct mm_struct *next,
-					     struct task_struct *tsk)
-{
-}
-#endif
 static inline void membarrier_exec_mmap(struct mm_struct *mm)
 {
 }