lkml.org 
[lkml]   [2013]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] irq: Set multiple MSI descriptor data for multiple IRQs
Date
On Tue, 15 Jan 2013 15:38:54 +0800, Mike Qiu <qiudayu@linux.vnet.ibm.com> wrote:
> Multiple MSI only requires the IRQ in msi_desc entry to be set as
> the value of irq_base.
>
> This patch implements the above mentioned technique.
>
> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>

Hi Mike,

question below...

> ---
> +int irq_set_multiple_msi_desc(unsigned int irq_base, unsigned int nvec,
> + struct msi_desc *entry)
> +{
> + unsigned long flags, i;
> + struct irq_desc *desc;
> +
> + for (i = 0; i < nvec; i++) {
> + desc = irq_get_desc_lock(irq_base + i, &flags,
> + IRQ_GET_DESC_CHECK_GLOBAL);
> + if (!desc)
> + return -EINVAL;
> + desc->irq_data.msi_desc = entry;
> + if (i == 0 && entry)
> + entry->irq = irq_base;

It's not clear to me why this code only sets the irq value for the first
desc. Why don't the other descs in the array want (irq_base + i) here? A
comment describing what is going on would be appropriate and helpful.

g.


\
 
 \ /
  Last update: 2013-06-06 01:41    [W:0.160 / U:3.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site