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

Re: [Xen-devel] [PATCH for-4.5 7/8] xen/irq: Handle multiple action per IRQ



Hi all,

On 03/18/2014 03:26 PM, Ian Campbell wrote:
> On Tue, 2014-03-18 at 15:12 +0000, Julien Grall wrote:
>> On 03/18/2014 03:10 PM, Ian Campbell wrote:
>>> On Tue, 2014-03-18 at 15:08 +0000, Julien Grall wrote:
>>>> On 03/18/2014 03:02 PM, Ian Campbell wrote:
>>>>>> int num_irqs = dt_number_of_irq(smmu->node);
>>>>>
>>>>> assert(num_irqs == 2) here and the rest gets a lot simpler. The maximum
>>>>> is a property of the hardware I think, so the driver is allowed to make
>>>>> such assumptions.
>>>>
>>>> I know it would be easier ... but you can't assume that num_irqs == 2 :).
>>>>
>>>> The number is not determined.
>>>
>>> Are you saying that the SMMU-400 has an arbitrary number of interrupts?
>>
>> Yes.
> 
> And the relevant doc is in the bindings:
> 
> - #global-interrupts : The number of global interrupts exposed by the
>                        device.
> 
> - interrupts    : Interrupt list, with the first #global-irqs entries
>                   corresponding to the global interrupts and any
>                   following entries corresponding to context interrupts,
>                   specified in order of their indexing by the SMMU.
> 
>                   For SMMUv2 implementations, there must be exactly one
>                   interrupt per context bank. In the case of a single,
>                   combined interrupt, it must be listed multiple times.

I'm about to resend a new version of the interrupts and IOMMU support.

As I understand the main concern is to let the developer a "powerful"
way to handle multiple action on a same IRQ in the future.

Adding a such feature directly in the SMMU driver will be more complex
(see a preview in
http://www.gossamer-threads.com/lists/xen/devel/321318#321318) and IHMO
complicated the code just for protecting against developer. If in the
future next IOMMU drivers (or other kind of drivers in Xen) will come up
with IRQ shared, the code will be duplicated.

What is the final decision for the interrupt handling? Stefano would
prefer to let the SMMU drivers handle a such case. Ian, do you have any
opinion?

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®.