[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v3 07/18] xen/arm: ITS: implement hw_irq_controller for LPIs



On 29/06/15 12:53, Ian Campbell wrote:
>> In this case, I would prefer to see 2 callbacks (one for the host the 
>> other for the guest) which return the correct IRQ controller for a 
>> specific IRQ. I have in mind something like:
>>
>>     get_guest_hw_irq_controller(unsigned int irq)
>>     {
>>         if ( !is_lpi )
>>           return &gicv3_guest_irq_controller
>>         else
>>           return &gicv3_guest_lpi_controller
>>     }
>>      
>> Same for the host irq controller. So the selection of the IRQ controller 
>> would be hidden from gic.c and keep the code a generic as possible.
> 
> Yes, this is how I would expect it too.
> 
> Alternatively I notice that the pattern today is:
>         desc->handler = gic_hw_ops->gic_(host|guest)_irq_type;
>      [set_bit(_IRQ_GUEST, &desc->status) or not]
>      gic_set_irq_properties(desc,[...]);
> 
> So an alternative might be for the set_irq_properties hook in the ops to
> also setup the handler (based on desc->status&_IRQ_GUEST and desc->irq),
> perhaps renaming it to something less "property" based. Both callers are
> git_route_irq_to_... so perhaps gic_route_irq?

Sounds good for me.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.