Skip to contentSkip to conversation

arm64: Add missing header <asm/smp.h> in two files

PATCH In review Carlos Bilbao 3 participants 4 messages Jul 7, 2021 – Jul 12, 2021 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Add missing header <asm/smp.h> in two files

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.

---
 arch/arm64/include/asm/smp_plat.h | 1 +
 arch/arm64/kernel/cpufeature.c    | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/include/asm/smp_plat.h +1 -0
index 99ad77df8f52..140c7a03a901 100644
@@ -11,6 +11,7 @@
 #include <linux/cpumask.h>
 
 #include <asm/types.h>
+#include <asm/smp.h>
 
 struct mpidr_hash {
        u64     mask;
arch/arm64/kernel/cpufeature.c +1 -0
index 125d5c9471ac..350d8601ff28 100644
@@ -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;
Signature · 1 line
2.25.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Carlos Bilbao

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.

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:

Quoted 10 lines
---
 arch/arm64/include/asm/smp_plat.h | 1 +
 arch/arm64/kernel/cpufeature.c    | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/include/asm/smp_plat.h +0 -0
index 99ad77df8f52..140c7a03a901 100644

arch/arm64/include/asm/smp_plat.h line 14

Quoted 4 lines
arch/arm64/include/asm/smp_plat.h +1 -0
@@ -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>

arch/arm64/kernel/cpufeature.c line 87

Quoted 11 lines
arch/arm64/include/asm/smp_plat.h +0 -0
 struct mpidr_hash {
        u64     mask;
arch/arm64/kernel/cpufeature.c +1 -0
index 125d5c9471ac..350d8601ff28 100644
@@ -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.

#2 lore raw

PATCH 1/1 arm64: Add missing header <asm/smp.h> in two files

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.

---
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(+)
arch/arm64/include/asm/smp_plat.h +1 -0
index 99ad77df8f52..97ddc6c203b7 100644
@@ -10,6 +10,7 @@
 
 #include <linux/cpumask.h>
 
+#include <asm/smp.h>
 #include <asm/types.h>
 
 struct mpidr_hash {
arch/arm64/kernel/cpufeature.c +1 -0
index 125d5c9471ac..0ead8bfedf20 100644
@@ -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>
Signature · 1 line
2.25.1
maintainer Applied
#3 lore raw
Quoted 6 lines · Carlos Bilbao

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,

Signature · 5 lines
Will

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