linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: Add missing header <asm/smp.h> in two files
@ 2021-07-07 17:54 Carlos Bilbao
  2021-07-08  9:33 ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Bilbao @ 2021-07-07 17:54 UTC (permalink / raw)
  To: mark.rutland, catalin.marinas, will, maz, linux-arm-kernel, linux-kernel

Add missing header <asm/smp.h> on include/asm/smp_plat.h, as it calls function
cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to
functions cpu_panic_kernel() and cpu_die_early().
 
Both files call functions defined on this header, make the header dependencies 
less fragile.

Signed-off-by: Carlos Bilbao <bilbao@vt.edu>
---
 arch/arm64/include/asm/smp_plat.h | 1 +
 arch/arm64/kernel/cpufeature.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/smp_plat.h b/arch/arm64/include/asm/smp_plat.h
index 99ad77df8f52..140c7a03a901 100644
--- a/arch/arm64/include/asm/smp_plat.h
+++ b/arch/arm64/include/asm/smp_plat.h
@@ -11,6 +11,7 @@
 #include <linux/cpumask.h>
 
 #include <asm/types.h>
+#include <asm/smp.h>
 
 struct mpidr_hash {
        u64     mask;
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 125d5c9471ac..350d8601ff28 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -84,6 +84,7 @@
 #include <asm/sysreg.h>
 #include <asm/traps.h>
 #include <asm/virt.h>
+#include <asm/smp.h>
 
 /* Kernel representation of AT_HWCAP and AT_HWCAP2 */
 static unsigned long elf_hwcap __read_mostly;
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: Add missing header <asm/smp.h> in two files
  2021-07-07 17:54 [PATCH] arm64: Add missing header <asm/smp.h> in two files Carlos Bilbao
@ 2021-07-08  9:33 ` Mark Rutland
  2021-07-08 11:15   ` [PATCH v1.1] " Carlos Bilbao
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2021-07-08  9:33 UTC (permalink / raw)
  To: Carlos Bilbao; +Cc: catalin.marinas, will, maz, linux-arm-kernel, linux-kernel

On Wed, Jul 07, 2021 at 01:54:13PM -0400, Carlos Bilbao wrote:
> Add missing header <asm/smp.h> on include/asm/smp_plat.h, as it calls function
> cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to
> functions cpu_panic_kernel() and cpu_die_early().
>  
> Both files call functions defined on this header, make the header dependencies 
> less fragile.
> 
> Signed-off-by: Carlos Bilbao <bilbao@vt.edu>

Per our usual rules, we should include a header if we directly use a
something defined in that header, so this makes sense to me.

I have a couple of minor comments below; with those fixed up:

Acked-by: Mark Rutland <mark.rutland@arm.com>

> ---
>  arch/arm64/include/asm/smp_plat.h | 1 +
>  arch/arm64/kernel/cpufeature.c    | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/smp_plat.h b/arch/arm64/include/asm/smp_plat.h
> index 99ad77df8f52..140c7a03a901 100644
> --- a/arch/arm64/include/asm/smp_plat.h
> +++ b/arch/arm64/include/asm/smp_plat.h
> @@ -11,6 +11,7 @@
>  #include <linux/cpumask.h>
>  
>  #include <asm/types.h>
> +#include <asm/smp.h>

We try to keep the includes in alphabetical order; could you please make
this:

| #include <asm/smp.h>
| #include <asm/types.h>

>  struct mpidr_hash {
>         u64     mask;
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 125d5c9471ac..350d8601ff28 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -84,6 +84,7 @@
>  #include <asm/sysreg.h>
>  #include <asm/traps.h>
>  #include <asm/virt.h>
> +#include <asm/smp.h>

Similarly, here:

| #include <asm/smp.h>
| #include <asm/sysreg.h>
| #include <asm/traps.h>
| #include <asm/virt.h>

(I checked the file, and immediately before <asm/sysreg.h> we include
<asm/processor.h>).

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1.1] arm64: Add missing header <asm/smp.h> in two files
  2021-07-08  9:33 ` Mark Rutland
@ 2021-07-08 11:15   ` Carlos Bilbao
  2021-07-12 12:50     ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Bilbao @ 2021-07-08 11:15 UTC (permalink / raw)
  To: Mark Rutland; +Cc: catalin.marinas, will, maz, linux-arm-kernel, linux-kernel

Add missing header <asm/smp.h> on include/asm/smp_plat.h, as it calls function 
cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to 
functions cpu_panic_kernel() and cpu_die_early().

Both files call functions defined on this header, make the header dependencies 
less fragile.

Signed-off-by: Carlos Bilbao <bilbao@vt.edu>
Acked-by: Mark Rutland <mark.rutland@arm.com>
---
Changelog:  
v1.1: Include the header in alphabetical order.
---
 arch/arm64/include/asm/smp_plat.h | 1 +
 arch/arm64/kernel/cpufeature.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/smp_plat.h b/arch/arm64/include/asm/smp_plat.h
index 99ad77df8f52..97ddc6c203b7 100644
--- a/arch/arm64/include/asm/smp_plat.h
+++ b/arch/arm64/include/asm/smp_plat.h
@@ -10,6 +10,7 @@
 
 #include <linux/cpumask.h>
 
+#include <asm/smp.h>
 #include <asm/types.h>
 
 struct mpidr_hash {
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 125d5c9471ac..0ead8bfedf20 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -81,6 +81,7 @@
 #include <asm/mmu_context.h>
 #include <asm/mte.h>
 #include <asm/processor.h>
+#include <asm/smp.h>
 #include <asm/sysreg.h>
 #include <asm/traps.h>
 #include <asm/virt.h>
-- 
2.25.1








^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1.1] arm64: Add missing header <asm/smp.h> in two files
  2021-07-08 11:15   ` [PATCH v1.1] " Carlos Bilbao
@ 2021-07-12 12:50     ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2021-07-12 12:50 UTC (permalink / raw)
  To: Carlos Bilbao, Mark Rutland
  Cc: catalin.marinas, kernel-team, Will Deacon, linux-kernel, maz,
	linux-arm-kernel

On Thu, 08 Jul 2021 07:15:42 -0400, Carlos Bilbao wrote:
> Add missing header <asm/smp.h> on include/asm/smp_plat.h, as it calls function
> cpu_logical_map(). Also include it on kernel/cpufeature.c since it has calls to
> functions cpu_panic_kernel() and cpu_die_early().
> 
> Both files call functions defined on this header, make the header dependencies
> less fragile.

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Add missing header <asm/smp.h> in two files
      https://git.kernel.org/arm64/c/e62e07481486

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-12 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 17:54 [PATCH] arm64: Add missing header <asm/smp.h> in two files Carlos Bilbao
2021-07-08  9:33 ` Mark Rutland
2021-07-08 11:15   ` [PATCH v1.1] " Carlos Bilbao
2021-07-12 12:50     ` Will Deacon

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).