|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] x86/IRQ: fix create_irq() after c/s 24068:692817
On 04/11/2011 15:05, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>>>> On 04.11.11 at 15:41, Keir Fraser <keir@xxxxxxx> wrote:
>> On 04/11/2011 11:52, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>>
>>> init_one_irq_desc() must be called with interrupts enabled (as it may
>>> call functions from the xmalloc() group). Rather than mis-using
>>> vector_lock to also protect the finding of an unused IRQ, make this
>>> lockless through using cmpxchg(), and obtain the lock only around the
>>> actual assignment of the vector.
>>
>> Looks fine to me.
>>
>> Acked-by: Keir Fraser <keir@xxxxxxx>
>>
>>> Also fold find_unassigned_irq() into its only caller.
>>>
>>> It is, btw, questionable whether create_irq() calling
>>> __assign_irq_vector() (rather than assign_irq_vector()) is actually
>>> correct - desc->affinity appears to not get initialized properly in
>>> this case.
>
> Any thought on this one? Adjusting this would have the nice side
> effect of the function no longer explicitly acquiring vector_lock.
I would agree it should call assign_irq_vector(). It was probably only
taking the lock itself, and thus using __assign_irq_vector(), to avoid the
irq it found in find_unassigned_irq() being stolen. That can't happen now
you reserve it via cmpxchg.
-- Keir
> Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|