lkml.org 
[lkml]   [2008]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sh migor_defconfig build breakage
On Thu, May 08, 2008 at 03:12:46PM -0700, Mike Travis wrote:
> Mike Travis wrote:
> > Because some arch's have it defined as an inline function. Perhaps the
> > easiest would be to add to include/asm-sh/topology.h a simple define of
> > cpu_to_node()?
>
> Ahh, this is what caused the error. In include/asm-generic/topology.h
> cpu_to_node is only defined now if NUMA is turned off.
>
> #ifndef CONFIG_NUMA
>
> /* Other architectures wishing to use this simple topology API should fill
> in the below functions as appropriate in their own <asm/topology.h> file. */
> #ifndef cpu_to_node
> #define cpu_to_node(cpu) ((void)(cpu),0)
> #endif
> ...
>
> So before my change arch 'sh' used the default define whether NUMA was
> set or not.
>
The dependency here is a bit vague in the first place. For UP NUMA the
asm-generic definitions are perfectly fine, it's only the CONFIG_NUMA &&
CONFIG_SMP cases where there is any point in doing anything more
fine-grained. So while it would be trivial to add a CONFIG_SMP test here
too, that's likely to break all of the other NUMA platforms.

So while sh can use the asm-generic definitions in the UP case, it
obviously can't on SMP. The easiest option for now is to just stub the
asm-generic bits in to asm-sh/topology.h under a CONFIG_NUMA ifdef and
then add more reasonable definitions for the SMP cases.


\
 
 \ /
  Last update: 2008-05-09 02:53    [W:0.089 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site