sparc: topology_64.h: Fix condition for including cpudata.h
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.
---
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])
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 includingcpudata.hWe currently define macros referring to
cpu_dataifCONFIG_SMPis defined, but only include the declaration ifCONFIG_NUMAis defined.Fixes 541cc39433a8 ("sparc: fix a building error reported by kbuild")Signed-off-by Ben Hutchings <[email protected]>---
arch/sparc/include/asm/topology_64.h +0
-0
From: Ben Hutchings <[email protected]>
Date: Sat, 4 Feb 2017 16:32:22 +0000
Quoted 5 lines
We currently define macros referring to
cpu_dataifCONFIG_SMPis defined, but only include the declaration ifCONFIG_NUMAis defined.Fixes 541cc39433a8 ("sparc: fix a building error reported by kbuild")Signed-off-by Ben Hutchings <[email protected]>
Applied.