lkml.org 
[lkml]   [2008]   [Apr]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 25 Apr 2008 13:21:05 +0200
FromGabriel C <>
SubjectRe: [REGRESSION] x86: support for new UV apic
Andi Kleen wrote:
> Ingo Molnar <mingo@elte.hu> writes:
> 
>> * Priit Laes <plaes@plaes.org> wrote:
>>
>>> Hey,
>>>
>>> I am getting two following warnings (probable one per each CPU core) 
>>> using the latest Linus's git:
>>>
>>> WARNING: at arch/x86/kernel/genapic_64.c:86 read_apic_id+0x30/0x62()
>>> Modules linked in:
>>> Pid: 1, comm: swapper Not tainted 2.6.25-03563-gf7288b1 #20
>> thanks - could you check the patch below, does it fix the warnings?
> 
> I think it would have been better to change the WARN_ON to
> 
> WARN_ON(preemptible() && num_online_cpus() > 1)

Hmm , I think you are right , Ingo's patch fixes the warning on boot but now I get one when I reboot the box.

> 
> Preemption is actually ok here because this runs before the other
> CPUs are started
> 
> Alternative patch appended.

I will test your patch in some minutes.

> 
> -Andi

Gabriel

> 
> ---
> 
> Don't warn in read_apic_id() when preemptible but only one CPU online.
> 
> Signed-off-by: Andi Kleen <andi@firstfloor.org>
> 
> Index: linux/arch/x86/kernel/genapic_64.c
> ===================================================================
> --- linux.orig/arch/x86/kernel/genapic_64.c
> +++ linux/arch/x86/kernel/genapic_64.c
> @@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
>  {
>  	unsigned int id;
> 
> -	WARN_ON(preemptible());
> +	WARN_ON(preemptible() && num_online_cpus() > 1);
>  	id = apic_read(APIC_ID);
>  	if (uv_system_type >= UV_X2APIC)
>  		id  |= __get_cpu_var(x2apic_extra_bits);



\
 
 \ /
  Last update: 2008-04-25 13:23    [from the cache]
©2003-2008