Skip to contentSkip to conversation

sparc: topology_64.h: Fix condition for including cpudata.h

PATCH Applied Ben Hutchings 3 participants 3 messages Feb 4, 2017 – Feb 23, 2017 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: topology_64.h: Fix condition for including cpudata.h

We currently define macros referring to cpu_data if CONFIG_SMP is defined, but only include the declaration if CONFIG_NUMA is defined.

Fixes 541cc39433a8 ("sparc: fix a building error reported by kbuild")

---

arch/sparc/include/asm/topology_64.h +3 -1
@@ -4,7 +4,6 @@
 #ifdef CONFIG_NUMA
 
 #include <asm/mmzone.h>
-#include <asm/cpudata.h>
 
 static inline int cpu_to_node(int cpu)
 {
@@ -42,6 +41,9 @@ int __node_distance(int, int);
 #endif /* !(CONFIG_NUMA) */
 
 #ifdef CONFIG_SMP
+
+#include <asm/cpudata.h>
+
 #define topology_physical_package_id(cpu)	(cpu_data(cpu).proc_id)
 #define topology_core_id(cpu)			(cpu_data(cpu).core_id)
 #define topology_core_cpumask(cpu)		(&cpu_core_sib_map[cpu])
Acked-by on v1 1/1
#1 lore raw

arch/sparc/include/asm/topology_64.h

Quoted 15 lines

From: Ben Hutchings [mailto:[email protected]]
Sent: Sunday, February 05, 2017 12:32 AM
To: David S. Miller
Cc: [email protected]; Gonglei (Arei); Sam Ravnborg
Subject: [PATCH] sparc: topology_64.h: Fix condition for including cpudata.h

We currently define macros referring to cpu_data if CONFIG_SMP is defined, but only include the declaration if CONFIG_NUMA is defined.

Fixes 541cc39433a8 ("sparc: fix a building error reported by kbuild")

---

arch/sparc/include/asm/topology_64.h +0 -0