Re: [PATCH UPDATED#3 04/16] x86: setup_local_APIC() must always becalled with preemption disabled

From: Tejun Heo
Date: Fri Dec 10 2010 - 06:09:03 EST


On 12/09/2010 10:56 PM, Thomas Gleixner wrote:
> On Thu, 9 Dec 2010, Tejun Heo wrote:
>
>> setup_local_APIC() is used to setup local APIC early during CPU
>> initialization and already assumes that preemption is disabled on
>> entry. However, The function unnecessarily disables and enables
>> preemption and uses smp_processor_id() multiple times in and out of
>> the nested preemption disabled section. This gives the wrong
>> impression that the function might be able to handle being called with
>> preemption enabled and/or migrated to another processor in the middle.
>>
>> Make it clear that the function is always called with preemption
>> disabled, drop the confusing preemption disable block and call
>> smp_processor_id() once at the beginning of the function.
>
> AFAICT, this one is completely unrelated to that NUMA cleanup, right ?
>
> So this can be applied independent and should never have been part of
> that NUMA series in the first place.

Originally, it was a trivial prep patch. Anyways, I'll push it
to the top of the series so that it can be taken separately.

Thanks.

--
tejun
--
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/