lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch V1 3/6] genirq: Introduce msi_domain_{alloc|free}_irqs()
On 2014/11/14 4:23, Marc Zyngier wrote:
> On 13/11/14 11:43, Jiang Liu wrote:
>> Introduce msi_domain_{alloc|free}_irqs() to alloc/free interrupts
>> from generic MSI irqdomain.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>> ---
>> include/linux/msi.h | 35 ++++++++++++++++++++++++++++++
>> kernel/irq/msi.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 94 insertions(+)
>>
>> +/*
>> + * Default structure for MSI interrupt allocation.
>> + * Arch may overwrite it by define msi_alloc_info_t.
>> + */
>> +struct msi_alloc_info {
>> + struct msi_desc *desc;
>> + irq_hw_number_t hwirq;
>> + long scratchpad[NUM_MSI_ALLOC_SCRATCHPAD_REGS];
>
> As much as I'm relieved to see a generic structure here, could
> scratchpad be slightly less awkward to use? Something like:
>
> struct msi_alloc_info {
> [...]
> union {
> unsigned long ul;
> void *ptr;
> } scratchpad[NUM_MSI_ALLOC_SCRATCHPAD_REGS];
> };
>
> That would avoid some very ugly casting.
Great, will changed to this way in next version:)

>
> Thanks,
>
> M.
>


\
 
 \ /
  Last update: 2014-11-14 01:41    [W:0.174 / U:1.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site