]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sparc: topology_64.h: Fix condition for including cpudata.h
authorBen Hutchings <ben@decadent.org.uk>
Sat, 4 Feb 2017 16:32:22 +0000 (16:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 16:21:45 +0000 (08:21 -0800)
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")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/topology_64.h

index 225543000122777847f686d418c62e6e6b92d1a5..ad5293f89680f4c3dd4405e413e2a2b4966bcd1b 100644 (file)
@@ -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])