|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 06/21] xen/arm: Allow virq != irq
Hi Stefano,
On 08/06/2014 03:50 PM, Stefano Stabellini wrote:
>> -int route_irq_to_guest(struct domain *d, unsigned int irq,
>> - const char * devname)
>> +int route_irq_to_guest(struct domain *d, unsigned int virq,
>> + unsigned int irq, const char * devname)
>> {
>> struct irqaction *action;
>> - struct irq_desc *desc = irq_to_desc(irq);
>> + struct irq_guest *info;
>> + struct irq_desc *desc;
>> unsigned long flags;
>> int retval = 0;
>>
>> action = xmalloc(struct irqaction);
>> - if (!action)
>> + if ( !action )
>> + return -ENOMEM;
>> +
>> + info = xmalloc(struct irq_guest);
>> + if ( !info )
>> + {
>> + xfree(action);
>> return -ENOMEM;
>> + }
>
> Rather than xmalloc'ing another struct and storing the pointer in
> dev_id, maybe we could simply expand struct arch_irq_desc?
I though about it. If we add another field in arch_irq_desc, we will
likely use more memory than xmalloc. This is because most of the
platform doesn't use 1024 interrupts but about 256 interrupts.
As the new field will be a pointer (on ARM64, 8 bytes), that would make
Xen use statically about 8K more.
We could allocate irq_desc dynamically during Xen boot.
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |