public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl@pobox.com>
To: Anton Blanchard <anton@samba.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	colpatch@us.ibm.com, akpm@osdl.org, paulus@samba.org
Subject: Re: topology api confusion
Date: Mon, 1 Aug 2005 00:22:44 -0500	[thread overview]
Message-ID: <20050801052244.GA3985@otto> (raw)
In-Reply-To: <20050801050748.GB31199@krispykreme>

Anton Blanchard wrote:
> 
> Hi,
> 
> > We need some clarity on how asm-generic/topology.h is intended to be
> > used.  I suspect that it's supposed to be unconditionally included at
> > the end of the architecture's topology.h so that any elements which
> > are undefined by the arch have sensible default definitions.  Looking
> > at 2.6.13-rc3, this is what ppc64, ia64, and x86_64 currently do,
> > however i386 does not (i386 pulls in the generic version only when
> > !CONFIG_NUMA).
> > 
> > The #ifndef guards around each element of the topology api
> > cannot serve their apparent intended purpose when the architecture
> > implements a given bit as a function instead of a macro
> > (e.g. cpu_to_node in ppc64):
> 
> Since it doesnt look like this will be resolved by 2.6.13 and NUMA is
> currently completely broken on ppc64, how does this patch look?

Yes, this change is the least risk for now, thanks.

> 
> --
> 
> Dont include asm-generic/topology.h unconditionally, we end up
> overriding all the ppc64 specific functions when NUMA is on.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> 
> Index: linux-2.6.git-work/include/asm-ppc64/topology.h
> ===================================================================
> --- linux-2.6.git-work.orig/include/asm-ppc64/topology.h	2005-07-30 23:49:56.000000000 +1000
> +++ linux-2.6.git-work/include/asm-ppc64/topology.h	2005-08-01 14:43:49.000000000 +1000
> @@ -33,6 +33,7 @@
>  	return first_cpu(tmp);
>  }
>  
> +#define pcibus_to_node(node)    (-1)
>  #define pcibus_to_cpumask(bus)	(cpu_online_map)
>  
>  #define nr_cpus_node(node)	(nr_cpus_in_node[node])
> @@ -59,8 +60,10 @@
>  	.nr_balance_failed	= 0,			\
>  }
>  
> -#endif /* CONFIG_NUMA */
> +#else
>  
>  #include <asm-generic/topology.h>
>  
> +#endif /* CONFIG_NUMA */
> +
>  #endif /* _ASM_PPC64_TOPOLOGY_H */

  reply	other threads:[~2005-08-01  5:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 21:33 topology api confusion Nathan Lynch
2005-07-25 21:41 ` Matthew Dobson
2005-07-25 23:25   ` Nathan Lynch
2005-07-26 15:16   ` Bill Davidsen
2005-08-01  5:07 ` Anton Blanchard
2005-08-01  5:22   ` Nathan Lynch [this message]
2005-08-01  8:10   ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050801052244.GA3985@otto \
    --to=ntl@pobox.com \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=colpatch@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox