Re: [PATCH UPDATED 04/16] x86: Use local variable to cachesmp_processor_id() in setup_local_APIC()

From: Cyrill Gorcunov
Date: Tue Nov 30 2010 - 12:33:03 EST


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@xxxxxxxxxx>
> Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
> Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
> ---
> 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@xxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/