Re: [PATCH v3 6/8] treewide: Trace IPIs sent via smp_send_reschedule()

2023-01-08 Thread Huacai Chen
Hi, Valentin,

On Fri, Dec 2, 2022 at 11:59 PM Valentin Schneider  wrote:
>
> To be able to trace invocations of smp_send_reschedule(), rename the
> arch-specific definitions of it to arch_smp_send_reschedule() and wrap it
> into an smp_send_reschedule() that contains a tracepoint.
>
> Changes to include the declaration of the tracepoint were driven by the
> following coccinelle script:
>
>   @func_use@
>   @@
>   smp_send_reschedule(...);
>
>   @include@
>   @@
>   #include 
>
>   @no_include depends on func_use && !include@
>   @@
> #include <...>
>   +
>   + #include 
>
> Signed-off-by: Valentin Schneider 
> [csky bits]
> Acked-by: Guo Ren 
> ---
>  arch/alpha/kernel/smp.c  | 2 +-
>  arch/arc/kernel/smp.c| 2 +-
>  arch/arm/kernel/smp.c| 2 +-
>  arch/arm/mach-actions/platsmp.c  | 2 ++
>  arch/arm64/kernel/smp.c  | 2 +-
>  arch/csky/kernel/smp.c   | 2 +-
>  arch/hexagon/kernel/smp.c| 2 +-
>  arch/ia64/kernel/smp.c   | 4 ++--
>  arch/loongarch/include/asm/smp.h | 2 +-
>  arch/mips/include/asm/smp.h  | 2 +-
>  arch/mips/kernel/rtlx-cmp.c  | 2 ++
>  arch/openrisc/kernel/smp.c   | 2 +-
>  arch/parisc/kernel/smp.c | 4 ++--
>  arch/powerpc/kernel/smp.c| 6 --
>  arch/powerpc/kvm/book3s_hv.c | 3 +++
>  arch/powerpc/platforms/powernv/subcore.c | 2 ++
>  arch/riscv/kernel/smp.c  | 4 ++--
>  arch/s390/kernel/smp.c   | 2 +-
>  arch/sh/kernel/smp.c | 2 +-
>  arch/sparc/kernel/smp_32.c   | 2 +-
>  arch/sparc/kernel/smp_64.c   | 2 +-
>  arch/x86/include/asm/smp.h   | 2 +-
>  arch/x86/kvm/svm/svm.c   | 4 
>  arch/x86/kvm/x86.c   | 2 ++
>  arch/xtensa/kernel/smp.c | 2 +-
>  include/linux/smp.h  | 8 ++--
>  virt/kvm/kvm_main.c  | 1 +
>  27 files changed, 47 insertions(+), 25 deletions(-)
>
> diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
> index f4e20f75438f8..38637eb9eebd5 100644
> --- a/arch/alpha/kernel/smp.c
> +++ b/arch/alpha/kernel/smp.c
> @@ -562,7 +562,7 @@ handle_ipi(struct pt_regs *regs)
>  }
>
>  void
> -smp_send_reschedule(int cpu)
> +arch_smp_send_reschedule(int cpu)
>  {
>  #ifdef DEBUG_IPI_MSG
> if (cpu == hard_smp_processor_id())
> diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
> index ad93fe6e4b77d..409cfa4675b40 100644
> --- a/arch/arc/kernel/smp.c
> +++ b/arch/arc/kernel/smp.c
> @@ -292,7 +292,7 @@ static void ipi_send_msg(const struct cpumask *callmap, 
> enum ipi_msg_type msg)
> ipi_send_msg_one(cpu, msg);
>  }
>
> -void smp_send_reschedule(int cpu)
> +void arch_smp_send_reschedule(int cpu)
>  {
> ipi_send_msg_one(cpu, IPI_RESCHEDULE);
>  }
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 3b280d55c1c40..f216ac890b6f9 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -745,7 +745,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
> ipi_setup(smp_processor_id());
>  }
>
> -void smp_send_reschedule(int cpu)
> +void arch_smp_send_reschedule(int cpu)
>  {
> smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
>  }
> diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
> index f26618b435145..7b208e96fbb67 100644
> --- a/arch/arm/mach-actions/platsmp.c
> +++ b/arch/arm/mach-actions/platsmp.c
> @@ -20,6 +20,8 @@
>  #include 
>  #include 
>
> +#include 
> +
>  #define OWL_CPU1_ADDR  0x50
>  #define OWL_CPU1_FLAG  0x5c
>
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index 937d2623e06ba..8d108edc4a89f 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -976,7 +976,7 @@ void __init set_smp_ipi_range(int ipi_base, int n)
> ipi_setup(smp_processor_id());
>  }
>
> -void smp_send_reschedule(int cpu)
> +void arch_smp_send_reschedule(int cpu)
>  {
> smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
>  }
> diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c
> index 4b605aa2e1d65..fd7f81be16dd6 100644
> --- a/arch/csky/kernel/smp.c
> +++ b/arch/csky/kernel/smp.c
> @@ -140,7 +140,7 @@ void smp_send_stop(void)
> on_each_cpu(ipi_stop, NULL, 1);
>  }
>
> -void smp_send_reschedule(int cpu)
> +void arch_smp_send_reschedule(int cpu)
>  {
> send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
>  }
> diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c
> index 4ba93e59370c4..4e8bee25b8c68 100644
> --- a/arch/hexagon/kernel/smp.c
> +++ b/arch/hexagon/kernel/smp.c
> @@ -217,7 +217,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> }
>  }
>
> -void smp_send_reschedule(int cpu)
> +void arch_smp_send_reschedule(int cpu)
>  {
> send_ipi(cpumask_of(cpu), IPI_RESCHEDULE);
> 

[PATCH] bit_spinlock: Include

2023-01-08 Thread Christophe JAILLET
In an attempt to simplify some includes in , it
appeared, when compiling fs/ecryptfs/dentry.c, that 
was relying on other includes to get the definition of cpu_relax().
(see [1])

It broke on arc.

Include  in  to fix the issue.
This will help remove some un-needed includes from .

[1]: https://lore.kernel.org/all/202301082130.lxmj5qkd-...@intel.com/

Signed-off-by: Christophe JAILLET 
---
Not sure who to send this to.
get_maintainer.pl is of no help, and the file is untouched from a too long
time.

Greg? Dan? Any pointer?
---
 include/linux/bit_spinlock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h
index bbc4730a6505..d0fd2a7afca2 100644
--- a/include/linux/bit_spinlock.h
+++ b/include/linux/bit_spinlock.h
@@ -2,6 +2,7 @@
 #ifndef __LINUX_BIT_SPINLOCK_H
 #define __LINUX_BIT_SPINLOCK_H
 
+#include 
 #include 
 #include 
 #include 
-- 
2.34.1


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc