All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Bjorn Helgaas'" <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, <linux-samsung-soc@vger.kernel.org>,
	"'Kukjin Kim'" <kgene.kim@samsung.com>,
	"'Pratyush Anand'" <pratyush.anand@st.com>,
	"'Mohit KUMAR'" <Mohit.KUMAR@st.com>,
	"'Siva Reddy Kallam'" <siva.kallam@samsung.com>,
	"'SRIKANTH TUMKUR SHIVANAND'" <ts.srikanth@samsung.com>,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	"'Sean Cross'" <xobs@kosagi.com>,
	"'Thierry Reding'" <thierry.reding@gmail.com>,
	"'Thomas Petazzoni'" <thomas.petazzoni@free-electrons.com>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH] PCI: designware: Add irq_create_mapping()
Date: Wed, 9 Oct 2013 15:18:27 +0530	[thread overview]
Message-ID: <5255266B.6040809@ti.com> (raw)
In-Reply-To: <003901cec4d0$5d83e650$188bb2f0$%han@samsung.com>

On Wednesday 09 October 2013 02:47 PM, Jingoo Han wrote:
> On Wednesday, October 09, 2013 6:06 PM, Kishon Vijay Abraham I wrote:
>> On Wednesday 09 October 2013 01:39 PM, Jingoo Han wrote:
>>> Without irq_create_mapping(), the correct irq number cannot be
>>> provided. In this case, it makes problem such as NULL deference.
>>> Thus, irq_create_mapping() should be added for MSI.
>>>
>>> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> Tested on Exynos5440.
>>>
>>>  drivers/pci/host/pcie-designware.c |   10 ++++------
>>>  drivers/pci/host/pcie-designware.h |    1 +
>>>  2 files changed, 5 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>>> index 8963017..e536bb6 100644
>>> --- a/drivers/pci/host/pcie-designware.c
>>> +++ b/drivers/pci/host/pcie-designware.c
>>> @@ -237,6 +237,8 @@ static int assign_irq(int no_irqs, struct msi_desc *desc, int *pos)
>>>  		}
>>>  	}
>>>
>>> +	pp->msi_irq_start = irq_create_mapping(pp->irq_domain, 0);
>>> +
>>
>> I think irq_create_mapping should be done for all the MSI irq lines instead of
>> only the first line. So you might have to do for MAX_MSI_IRQS lines.

Maybe it should be only till MAX_MSI_IRQS-1?

Thanks
Kishon

WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Bjorn Helgaas' <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	'Kukjin Kim' <kgene.kim@samsung.com>,
	'Pratyush Anand' <pratyush.anand@st.com>,
	'Mohit KUMAR' <Mohit.KUMAR@st.com>,
	'Siva Reddy Kallam' <siva.kallam@samsung.com>,
	'SRIKANTH TUMKUR SHIVANAND' <ts.srikanth@samsung.com>,
	'Arnd Bergmann' <arnd@arndb.de>, 'Sean Cross' <xobs@kosagi.com>,
	'Thierry Reding' <thierry.reding@gmail.com>,
	'Thomas Petazzoni' <thomas.petazzoni@free-electrons.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] PCI: designware: Add irq_create_mapping()
Date: Wed, 9 Oct 2013 15:18:27 +0530	[thread overview]
Message-ID: <5255266B.6040809@ti.com> (raw)
In-Reply-To: <003901cec4d0$5d83e650$188bb2f0$%han@samsung.com>

On Wednesday 09 October 2013 02:47 PM, Jingoo Han wrote:
> On Wednesday, October 09, 2013 6:06 PM, Kishon Vijay Abraham I wrote:
>> On Wednesday 09 October 2013 01:39 PM, Jingoo Han wrote:
>>> Without irq_create_mapping(), the correct irq number cannot be
>>> provided. In this case, it makes problem such as NULL deference.
>>> Thus, irq_create_mapping() should be added for MSI.
>>>
>>> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>>> Cc: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> Tested on Exynos5440.
>>>
>>>  drivers/pci/host/pcie-designware.c |   10 ++++------
>>>  drivers/pci/host/pcie-designware.h |    1 +
>>>  2 files changed, 5 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
>>> index 8963017..e536bb6 100644
>>> --- a/drivers/pci/host/pcie-designware.c
>>> +++ b/drivers/pci/host/pcie-designware.c
>>> @@ -237,6 +237,8 @@ static int assign_irq(int no_irqs, struct msi_desc *desc, int *pos)
>>>  		}
>>>  	}
>>>
>>> +	pp->msi_irq_start = irq_create_mapping(pp->irq_domain, 0);
>>> +
>>
>> I think irq_create_mapping should be done for all the MSI irq lines instead of
>> only the first line. So you might have to do for MAX_MSI_IRQS lines.

Maybe it should be only till MAX_MSI_IRQS-1?

Thanks
Kishon

  reply	other threads:[~2013-10-09  9:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09  8:09 [PATCH] PCI: designware: Add irq_create_mapping() Jingoo Han
2013-10-09  9:05 ` Kishon Vijay Abraham I
2013-10-09  9:05   ` Kishon Vijay Abraham I
2013-10-09  9:17   ` Jingoo Han
2013-10-09  9:48     ` Kishon Vijay Abraham I [this message]
2013-10-09  9:48       ` Kishon Vijay Abraham I
2013-10-09 10:05       ` Jingoo Han
2013-10-09 10:27         ` Kishon Vijay Abraham I
2013-10-09 10:27           ` Kishon Vijay Abraham I
2013-10-09 10:49           ` Jingoo Han
2013-10-09 11:13             ` Pratyush Anand
2013-10-09 11:13               ` Pratyush Anand
2013-10-09 12:29               ` Jingoo Han

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5255266B.6040809@ti.com \
    --to=kishon@ti.com \
    --cc=Mohit.KUMAR@st.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jg1.han@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=pratyush.anand@st.com \
    --cc=siva.kallam@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=ts.srikanth@samsung.com \
    --cc=xobs@kosagi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.