mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
@ 2011-09-09 23:38 H Hartley Sweeten
  2011-09-10  9:39 ` David Rientjes
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2011-09-09 23:38 UTC (permalink / raw)
  To: Linux Kernel; +Cc: x86, tglx, mingo, hpa, tj, penberg, yinghai, rientjes

If CONFIG_X86_64 is not set the function __node_distance is not declared in
<asm/topology.h>. This results in the following sparse noise.

warning: symbol '__node_distance' was not declared. Should it be static?

Fix this by putting an #ifdef around the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>

---

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index fbeaaf4..11c60a7 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance)
 	numa_distance[from * numa_distance_cnt + to] = distance;
 }
 
+#ifdef CONFIG_X86_64
 int __node_distance(int from, int to)
 {
 	if (from >= numa_distance_cnt || to >= numa_distance_cnt)
@@ -462,6 +463,7 @@ int __node_distance(int from, int to)
 	return numa_distance[from * numa_distance_cnt + to];
 }
 EXPORT_SYMBOL(__node_distance);
+#endif
 
 /*
  * Sanity check to catch more bad NUMA configurations (they are amazingly

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

* Re: [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
  2011-09-09 23:38 [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set H Hartley Sweeten
@ 2011-09-10  9:39 ` David Rientjes
  2011-09-11  1:06   ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: David Rientjes @ 2011-09-10  9:39 UTC (permalink / raw)
  To: H Hartley Sweeten
  Cc: Linux Kernel, x86, tglx, mingo, hpa, tj, penberg, yinghai

On Fri, 9 Sep 2011, H Hartley Sweeten wrote:

> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index fbeaaf4..11c60a7 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance)
>  	numa_distance[from * numa_distance_cnt + to] = distance;
>  }
>  
> +#ifdef CONFIG_X86_64
>  int __node_distance(int from, int to)
>  {
>  	if (from >= numa_distance_cnt || to >= numa_distance_cnt)
> @@ -462,6 +463,7 @@ int __node_distance(int from, int to)
>  	return numa_distance[from * numa_distance_cnt + to];
>  }
>  EXPORT_SYMBOL(__node_distance);
> +#endif
>  
>  /*
>   * Sanity check to catch more bad NUMA configurations (they are amazingly
> 

What is 64-bit specific about this function?  Shouldn't we be defining it 
to be node_distance for all of x86?

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

* Re: [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
  2011-09-10  9:39 ` David Rientjes
@ 2011-09-11  1:06   ` Tejun Heo
  2011-09-19 23:05     ` H Hartley Sweeten
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2011-09-11  1:06 UTC (permalink / raw)
  To: David Rientjes
  Cc: H Hartley Sweeten, Linux Kernel, x86, tglx, mingo, hpa, penberg, yinghai

Hello,

On Sat, Sep 10, 2011 at 02:39:02AM -0700, David Rientjes wrote:
> On Fri, 9 Sep 2011, H Hartley Sweeten wrote:
> 
> > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> > index fbeaaf4..11c60a7 100644
> > --- a/arch/x86/mm/numa.c
> > +++ b/arch/x86/mm/numa.c
> > @@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance)
> >  	numa_distance[from * numa_distance_cnt + to] = distance;
> >  }
> >  
> > +#ifdef CONFIG_X86_64
> >  int __node_distance(int from, int to)
> >  {
> >  	if (from >= numa_distance_cnt || to >= numa_distance_cnt)
> > @@ -462,6 +463,7 @@ int __node_distance(int from, int to)
> >  	return numa_distance[from * numa_distance_cnt + to];
> >  }
> >  EXPORT_SYMBOL(__node_distance);
> > +#endif
> >  
> >  /*
> >   * Sanity check to catch more bad NUMA configurations (they are amazingly
> > 
> 
> What is 64-bit specific about this function?  Shouldn't we be defining it 
> to be node_distance for all of x86?

Yeap, that's a remnant of the old separate code paths, which wasn't
discovered because asm-generic/topology.h defines fallback
node_distance() automatically.  We should drop #ifdef from
arch/x86/include/asm/topology.h::node_distance().  Hartley, can you
please send a patch to do that?

Thanks.

-- 
tejun

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

* RE: [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set
  2011-09-11  1:06   ` Tejun Heo
@ 2011-09-19 23:05     ` H Hartley Sweeten
  0 siblings, 0 replies; 4+ messages in thread
From: H Hartley Sweeten @ 2011-09-19 23:05 UTC (permalink / raw)
  To: Tejun Heo, David Rientjes
  Cc: Linux Kernel, x86, tglx, mingo, hpa, penberg, yinghai

On Saturday, September 10, 2011 6:06 PM, Tejun Heo wrote:
> Hello,
>
> On Sat, Sep 10, 2011 at 02:39:02AM -0700, David Rientjes wrote:
>> On Fri, 9 Sep 2011, H Hartley Sweeten wrote:
>> 
>>> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
>>> index fbeaaf4..11c60a7 100644
>>> --- a/arch/x86/mm/numa.c
>>> +++ b/arch/x86/mm/numa.c
>>> @@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance)
>>>  	numa_distance[from * numa_distance_cnt + to] = distance;
>>>  }
>>>  
>>> +#ifdef CONFIG_X86_64
>>>  int __node_distance(int from, int to)
>>>  {
>>>  	if (from >= numa_distance_cnt || to >= numa_distance_cnt)
>>> @@ -462,6 +463,7 @@ int __node_distance(int from, int to)
>>>  	return numa_distance[from * numa_distance_cnt + to];
>>>  }
>>>  EXPORT_SYMBOL(__node_distance);
>>> +#endif
>>>  
>>>  /*
>>>   * Sanity check to catch more bad NUMA configurations (they are amazingly
>>> 
>>
>> What is 64-bit specific about this function?  Shouldn't we be defining it 
>> to be node_distance for all of x86?
>
> Yeap, that's a remnant of the old separate code paths, which wasn't
> discovered because asm-generic/topology.h defines fallback
> node_distance() automatically.  We should drop #ifdef from
> arch/x86/include/asm/topology.h::node_distance().  Hartley, can you
> please send a patch to do that?

Tejun,

I just posted the new patch, "x86: use the same node distance for 32 and 64-bit".

Thanks,
Hartley

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

end of thread, other threads:[~2011-09-19 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 23:38 [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set H Hartley Sweeten
2011-09-10  9:39 ` David Rientjes
2011-09-11  1:06   ` Tejun Heo
2011-09-19 23:05     ` H Hartley Sweeten

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

all inboxes | Powered by JetHome®