linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] use asm-generic/topology.h
@ 2002-10-30 22:01 Matthew Dobson
  2002-10-30 23:31 ` Anton Blanchard
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Dobson @ 2002-10-30 22:01 UTC (permalink / raw)
  To: linux-kernel, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

Linus,

use_generic_topology.patch

This patch changes ppc64 & alpha to use the generic topology.h for the 
non-NUMA case rather than redefining the same macros.  It is much easier 
to maintain one set of generic non-NUMA macros than several.

[mcd@arrakis patches]$ diffstat use_generic_topo-2.5.44.patch
  asm-alpha/topology.h |   19 +++++++------------
  asm-ppc64/topology.h |    8 ++------
  2 files changed, 9 insertions(+), 18 deletions(-)

Cheers!

-Matt

[-- Attachment #2: use_generic_topo-2.5.44.patch --]
[-- Type: text/plain, Size: 1891 bytes --]

diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.44-vanilla/include/asm-alpha/topology.h linux-2.5.44-topology_fixup/include/asm-alpha/topology.h
--- linux-2.5.44-vanilla/include/asm-alpha/topology.h	Fri Oct 18 21:01:18 2002
+++ linux-2.5.44-topology_fixup/include/asm-alpha/topology.h	Wed Oct 30 13:51:56 2002
@@ -1,20 +1,15 @@
 #ifndef _ASM_ALPHA_TOPOLOGY_H
 #define _ASM_ALPHA_TOPOLOGY_H
 
-#ifdef CONFIG_NUMA
-#ifdef CONFIG_ALPHA_WILDFIRE
+#if defined(CONFIG_NUMA) && defined(CONFIG_ALPHA_WILDFIRE)
+
 /* With wildfire assume 4 CPUs per node */
 #define __cpu_to_node(cpu)		((cpu) >> 2)
-#endif /* CONFIG_ALPHA_WILDFIRE */
-#endif /* CONFIG_NUMA */
 
-#if !defined(CONFIG_NUMA) || !defined(CONFIG_ALPHA_WILDFIRE)
-#define __cpu_to_node(cpu)		(0)
-#define __memblk_to_node(memblk)	(0)
-#define __parent_node(nid)		(0)
-#define __node_to_first_cpu(node)	(0)
-#define __node_to_cpu_mask(node)	(cpu_online_map)
-#define __node_to_memblk(node)		(0)
-#endif /* !CONFIG_NUMA || !CONFIG_ALPHA_WILDFIRE */
+#else /* !CONFIG_NUMA || !CONFIG_ALPHA_WILDFIRE */
+
+#include <asm-generic/topology.h>
+
+#endif /* CONFIG_NUMA && CONFIG_ALPHA_WILDFIRE */
 
 #endif /* _ASM_ALPHA_TOPOLOGY_H */
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.44-vanilla/include/asm-ppc64/topology.h linux-2.5.44-topology_fixup/include/asm-ppc64/topology.h
--- linux-2.5.44-vanilla/include/asm-ppc64/topology.h	Fri Oct 18 21:01:52 2002
+++ linux-2.5.44-topology_fixup/include/asm-ppc64/topology.h	Wed Oct 30 13:45:23 2002
@@ -48,12 +48,8 @@
 
 #else /* !CONFIG_NUMA */
 
-#define __cpu_to_node(cpu)		(0)
-#define __memblk_to_node(memblk)	(0)
-#define __parent_node(nid)		(0)
-#define __node_to_first_cpu(node)	(0)
-#define __node_to_cpu_mask(node)	(cpu_online_map)
-#define __node_to_memblk(node)		(0)
+/* If non-NUMA, grab the generic macros */
+#include <asm-generic/topology.h>
 
 #endif /* CONFIG_NUMA */
 

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

* Re: [patch] use asm-generic/topology.h
  2002-10-30 22:01 [patch] use asm-generic/topology.h Matthew Dobson
@ 2002-10-30 23:31 ` Anton Blanchard
  2002-10-30 23:35   ` Matthew Dobson
  0 siblings, 1 reply; 5+ messages in thread
From: Anton Blanchard @ 2002-10-30 23:31 UTC (permalink / raw)
  To: Matthew Dobson; +Cc: linux-kernel, Linus Torvalds


Hi Matt,

> use_generic_topology.patch
> 
> This patch changes ppc64 & alpha to use the generic topology.h for the 
> non-NUMA case rather than redefining the same macros.  It is much easier 
> to maintain one set of generic non-NUMA macros than several.

Looks good from the ppc64 perspective.

Anton

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

* Re: [patch] use asm-generic/topology.h
  2002-10-30 23:31 ` Anton Blanchard
@ 2002-10-30 23:35   ` Matthew Dobson
  2002-10-31  1:42     ` Peter Rival
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Dobson @ 2002-10-30 23:35 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linux-kernel, Linus Torvalds

Anton Blanchard wrote:
> Hi Matt,
> 
> 
>>use_generic_topology.patch
>>
>>This patch changes ppc64 & alpha to use the generic topology.h for the 
>>non-NUMA case rather than redefining the same macros.  It is much easier 
>>to maintain one set of generic non-NUMA macros than several.
> 
> 
> Looks good from the ppc64 perspective.
> 
> Anton

Glad to have the positive feedback.  It doesn't really change how 
anything works, just eliminates duplicate code and makes modifying the 
generic behavior simpler.

Anyone that works with alpha want to verify that I haven't inadvertently 
hosed your topology file?

Cheers!

-Matt


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

* Re: [patch] use asm-generic/topology.h
  2002-10-30 23:35   ` Matthew Dobson
@ 2002-10-31  1:42     ` Peter Rival
  2002-10-31  2:11       ` Matthew Dobson
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rival @ 2002-10-31  1:42 UTC (permalink / raw)
  To: colpatch; +Cc: Anton Blanchard, linux-kernel, Linus Torvalds

Matthew Dobson wrote:

> Anton Blanchard wrote:
> > Hi Matt,
> >
> >
> >>use_generic_topology.patch
> >>
> >>This patch changes ppc64 & alpha to use the generic topology.h for the
> >>non-NUMA case rather than redefining the same macros.  It is much easier
> >>to maintain one set of generic non-NUMA macros than several.
> >
> >
> > Looks good from the ppc64 perspective.
> >
> > Anton
>
> Glad to have the positive feedback.  It doesn't really change how
> anything works, just eliminates duplicate code and makes modifying the
> generic behavior simpler.
>
> Anyone that works with alpha want to verify that I haven't inadvertently
> hosed your topology file?
>

I'd say six of one, half-dozen of the other.  I've been working with another
engineer on updated patches that among other things make NUMA work on Alpha
again.  We're also re-working much of the surrounding code, including much of
this file anyway - Marvel uses a much different topology than Wildfire.

It looks fine to me, but realistically the only opinion I can give for real is
a shoulder shrug, as I'm not exactly sure when the code will be ready for
submission.  Actually, the patch looks just like a part of the patch we have
working, just without Marvel support.  Then again, I suppose IBM would have a
hard time doing that, huh? ;)

 - Pete


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

* Re: [patch] use asm-generic/topology.h
  2002-10-31  1:42     ` Peter Rival
@ 2002-10-31  2:11       ` Matthew Dobson
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Dobson @ 2002-10-31  2:11 UTC (permalink / raw)
  To: Peter Rival; +Cc: Anton Blanchard, linux-kernel, Linus Torvalds

Peter Rival wrote:
>
 > <snip>
> 
> I'd say six of one, half-dozen of the other.  I've been working with another
> engineer on updated patches that among other things make NUMA work on Alpha
> again.  We're also re-working much of the surrounding code, including much of
> this file anyway - Marvel uses a much different topology than Wildfire.
> 
> It looks fine to me, but realistically the only opinion I can give for real is
> a shoulder shrug, as I'm not exactly sure when the code will be ready for
> submission.  Actually, the patch looks just like a part of the patch we have
> working, just without Marvel support.  Then again, I suppose IBM would have a
> hard time doing that, huh? ;)

I'll take that as a thumbs-up.  "A wink's as good as a nudge to a blind 
bat!  eh? EH?"

Please apply, Linus.

Oh yeah...  If you want to send me free hardware to play with, we can 
see what happens on the Marvel support front...  ;) ;)

Cheers!

-Matt


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

end of thread, other threads:[~2002-10-31  2:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-30 22:01 [patch] use asm-generic/topology.h Matthew Dobson
2002-10-30 23:31 ` Anton Blanchard
2002-10-30 23:35   ` Matthew Dobson
2002-10-31  1:42     ` Peter Rival
2002-10-31  2:11       ` Matthew Dobson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).