lkml.org 
[lkml]   [2010]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH UPDATED 04/16] x86: Use local variable to cache smp_processor_id() in setup_local_APIC()
On Tue, Nov 30, 2010 at 05:17:19PM +0100, Tejun Heo wrote:
> Subject: x86: Use local variable to cache smp_processor_id() in setup_local_APIC()
>
> This is a trivial clean up.
>
> * Move initialization of @cpu inside preemption disabled region as
> suggested by Cyrill Gorcunov.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Cc: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
> Updated as suggested. Git tree updated too.
>
> Thanks.
>

Thanks Tejun, but please don't modify the snippet below
(ie leave it with smp_processor_id). It happens when preempt
gets enabled again but cpu cached with preempt disabled.
So we should not mess this I believe. ok?

Other than that
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>

Thanks!

> @@ -1368,7 +1367,7 @@ void __cpuinit setup_local_APIC(void)
>
> #ifdef CONFIG_X86_MCE_INTEL
> /* Recheck CMCI information after local APIC is up on CPU #0 */
> - if (smp_processor_id() == 0)
> + if (cpu == 0)
> cmci_recheck();
> #endif
> }
>
Cyrill


\
 
 \ /
  Last update: 2010-11-30 18:35    [W:0.032 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site