lkml.org 
[lkml]   [2010]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH UPDATED#3 04/16] x86: setup_local_APIC() must always be called with preemption disabled
    From
    Date
    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>



    \
     
     \ /
      Last update: 2010-12-09 17:21    [W:0.020 / U:0.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site