lkml.org 
[lkml]   [2008]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] x86: little fix in 'include/asm-x86/topology.h'
Date
From
Before 'topology_32.h' and 'topology_64.h' were unified, topology defines in a
X86_64 kernel were declared if CONFIG_SMP was enabled.
Now, post unification, these same defines in a X86_64 kernel are only being
declared if CONFIG_NUMA and CONFIG_SMP are enabled.

This, for example, breaks 'perfmon_amd64.c' compilation.

This patch defines ENABLE_TOPO_DEFINE if this is a X86_64 kernel and we
have SMP support enabled.

Signed-off-by: Miguel Botón <mboton@gmail.com>

diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
index 9c25160..f95b3cc 100644
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -79,10 +79,6 @@ extern unsigned long node_remap_size[];

#else

-# ifdef CONFIG_SMP
-# define ENABLE_TOPO_DEFINES
-# endif
-
# define SD_CACHE_NICE_TRIES 2
# define SD_IDLE_IDX 2
# define SD_NEWIDLE_IDX 0
@@ -129,6 +125,10 @@ extern int __node_distance(int, int);

extern cpumask_t cpu_coregroup_map(int cpu);

+#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
+# define ENABLE_TOPO_DEFINES
+#endif
+
#ifdef ENABLE_TOPO_DEFINES
#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
--
Miguel Botón
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-01-04 23:09    [W:0.033 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site