Commit fc5e8c28 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

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: 541cc394 ("sparc: fix a building error reported by kbuild")
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Acked-by: default avatarGonglei <arei.gonglei@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbc41b43
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/cpudata.h>
static inline int cpu_to_node(int cpu) static inline int cpu_to_node(int cpu)
{ {
...@@ -42,6 +41,9 @@ int __node_distance(int, int); ...@@ -42,6 +41,9 @@ int __node_distance(int, int);
#endif /* !(CONFIG_NUMA) */ #endif /* !(CONFIG_NUMA) */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#include <asm/cpudata.h>
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
#define topology_core_id(cpu) (cpu_data(cpu).core_id) #define topology_core_id(cpu) (cpu_data(cpu).core_id)
#define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu]) #define topology_core_cpumask(cpu) (&cpu_core_sib_map[cpu])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment