Messages in this thread | | | Subject | Re: [PATCH UPDATED#3 04/16] x86: setup_local_APIC() must always be called with preemption disabled | From | Pekka Enberg <> | Date | Thu, 09 Dec 2010 18:18:54 +0200 |
| |
On Thu, 2010-12-09 at 11:47 +0100, 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. > > Signed-off-by: Tejun Heo <tj@kernel.org> > Cc: Yinghai Lu <yinghai@kernel.org> > Cc: Cyrill Gorcunov <gorcunov@gmail.com> > Cc: Pekka Enberg <penberg@kernel.org>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
| |