public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: little fix in 'include/asm-x86/topology.h'
@ 2008-01-04 22:04 Miguel Botón
  2008-01-05 15:09 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Miguel Botón @ 2008-01-04 22:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, tglx

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: little fix in 'include/asm-x86/topology.h'
  2008-01-04 22:04 [PATCH] x86: little fix in 'include/asm-x86/topology.h' Miguel Botón
@ 2008-01-05 15:09 ` Ingo Molnar
  2008-01-05 20:25   ` Miguel Botón
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-01-05 15:09 UTC (permalink / raw)
  To: Miguel Botón; +Cc: linux-kernel, tglx


* Miguel Botón <mboton.lkml@gmail.com> wrote:

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

hm, do you have a .config that fails to build?

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: little fix in 'include/asm-x86/topology.h'
  2008-01-05 15:09 ` Ingo Molnar
@ 2008-01-05 20:25   ` Miguel Botón
  0 siblings, 0 replies; 3+ messages in thread
From: Miguel Botón @ 2008-01-05 20:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Miguel Botón, linux-kernel, tglx

On Saturday 05 January 2008 16:09:44 Ingo Molnar wrote:
> * Miguel Botón <mboton.lkml@gmail.com> wrote:
> > 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.
>
> hm, do you have a .config that fails to build?
>
> 	Ingo

I had a .config (I deleted it) that fails to build *but* using the tree from 
http://git.kernel.org/?p=linux/kernel/git/eranian/linux-2.6.git;a=summary

The problem was that CONFIG_NUMA wasn't defined so ENABLE_TOPO_DEFINE wasn't 
defined too and then we get an error about an implicit declaration 
of 'topology_physical_package_id'.

-- 
	Miguel Botón

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-05 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 22:04 [PATCH] x86: little fix in 'include/asm-x86/topology.h' Miguel Botón
2008-01-05 15:09 ` Ingo Molnar
2008-01-05 20:25   ` Miguel Botón

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox