[PATCH v6 1/2] sparc: fix a building error reported by kbuild

From: Gonglei
Date: Wed Dec 07 2016 - 23:38:29 EST


>> arch/sparc/include/asm/topology_64.h:44:44:
error: implicit declaration of function 'cpu_data'
[-Werror=implicit-function-declaration]

#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
^
Let's include cpudata.h in topology_64.h.

Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: sparclinux@xxxxxxxxxxxxxxx
Suggested-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
Signed-off-by: Gonglei <arei.gonglei@xxxxxxxxxx>
---
arch/sparc/include/asm/topology_64.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/sparc/include/asm/topology_64.h b/arch/sparc/include/asm/topology_64.h
index 7b4898a..2255430 100644
--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -4,6 +4,7 @@
#ifdef CONFIG_NUMA

#include <asm/mmzone.h>
+#include <asm/cpudata.h>

static inline int cpu_to_node(int cpu)
{
--
1.8.3.1