Message ID | 20170204163222.GT3442@decadent.org.uk |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
> > 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
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
--- 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])
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> ---