diff mbox

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

Message ID 20170204163222.GT3442@decadent.org.uk
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings Feb. 4, 2017, 4:32 p.m. UTC
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>
---

Comments

Gonglei (Arei) Feb. 6, 2017, 3:04 a.m. UTC | #1
>
> From: Ben Hutchings [mailto:ben@decadent.org.uk]
> Sent: Sunday, February 05, 2017 12:32 AM
> To: David S. Miller
> Cc: sparclinux@vger.kernel.org; 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")
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> --- a/arch/sparc/include/asm/topology_64.h
> +++ b/arch/sparc/include/asm/topology_64.h

Acked-by: Gonglei <arei.gonglei@huawei.com>
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 23, 2017, 4:22 p.m. UTC | #2
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 4 Feb 2017 16:32:22 +0000

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/arch/sparc/include/asm/topology_64.h
+++ b/arch/sparc/include/asm/topology_64.h
@@ -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])