From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Bharat Bhushan <bharat.bhushan@nxp.com>,
Nipun Gupta <nipun.gupta@nxp.com>,
"stuyoder@gmail.com" <stuyoder@gmail.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"cakturk@gmail.com" <cakturk@gmail.com>,
"bretth256@gmail.com" <bretth256@gmail.com>,
"arnd@arndb.de" <arnd@arndb.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Subject: Re: [PATCH 1/2] staging: fsl-mc: Allocate IRQ's before scanning DPRC objects
Date: Wed, 6 Dec 2017 14:23:45 +0000 [thread overview]
Message-ID: <5A27FD70.7040208@nxp.com> (raw)
In-Reply-To: <AM5PR0401MB2545FF924020D53A64D058B99A320@AM5PR0401MB2545.eurprd04.prod.outlook.com>
Hi Bharat,
On 12/06/2017 04:03 PM, Bharat Bhushan wrote:
> Hi Laurentiu,
>
>> -----Original Message-----
>> From: Laurentiu Tudor
>> Sent: Wednesday, December 06, 2017 7:00 PM
>> To: Nipun Gupta <nipun.gupta@nxp.com>; stuyoder@gmail.com; Bharat
>> Bhushan <bharat.bhushan@nxp.com>; gregkh@linuxfoundation.org;
>> cakturk@gmail.com; bretth256@gmail.com; arnd@arndb.de
>> Cc: linux-kernel@vger.kernel.org; devel@driverdev.osuosl.org
>> Subject: Re: [PATCH 1/2] staging: fsl-mc: Allocate IRQ's before scanning DPRC
>> objects
>>
>> Hi Nipun,
>>
>> Can you polish a bit this commit message? It doesn't seem to explain why this
>> is needed.
>>
>> On 12/06/2017 06:18 PM, Nipun Gupta wrote:
>>> When DPRC probing is deferred (such as where IOMMU is not probed
>>> before the fsl-mc bus), all the devices in the DPRC containers gets
>>> initialized one after another.
>>
>> Are you referring to dprc probing being deferred (do we ever do that?) or
>> devices inside the dprc deferring the probe?
>>
>>> As IRQ's were allocated only once the
>>> DPRC scanning is completed, the devices like DPIO which uses these
>>> IRQ's at initalization fails. This patch allocates the IRQ resources
>>
>> s/initalization/initialization
>>
>>> before scanning all the objects in the DPRC container.
>>>
>>> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
>>> ---
>>> drivers/staging/fsl-mc/bus/dprc-driver.c | 49 ++++++++++++++++++------
>> --------
>>> 1 file changed, 27 insertions(+), 22 deletions(-)
>>>
>>> diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c
>>> b/drivers/staging/fsl-mc/bus/dprc-driver.c
>>> index 06df528..7265431 100644
>>> --- a/drivers/staging/fsl-mc/bus/dprc-driver.c
>>> +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
>>> @@ -206,7 +206,8 @@ static void dprc_add_new_devices(struct
>> fsl_mc_device *mc_bus_dev,
>>> * dprc_scan_objects - Discover objects in a DPRC
>>> *
>>> * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC
>>> object
>>> - * @total_irq_count: total number of IRQs needed by objects in the DPRC.
>>> + * @total_irq_count: If argument is provided the function populates
>>> + the
>>> + * total number of IRQs created by objects in the DPRC.
>>
>> As a side node, after a cursory look i noticed that this total_irq_count
>> parameter is used only for some sanity checks. I'm thinking of dropping it in a
>> follow-up cleanup patch.
>
> How you will ensure that number of IRQ needed are not sufficient for devices in the container?
> Do you think we need to either not enable additional devices or add irqs to irq-pool ?
In the current implementation we allocate a pool of
FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS (= 256) no mater what total_irq_count is.
I think this is enough for our current scenarios, but if in the future
we ever hit this limit we can think of a mechanism along the lines of
your example. Adding another chunk of irqs to the pool seems to me like
a good idea in the future.
---
Best Regards, Laurentiu
next prev parent reply other threads:[~2017-12-06 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 16:18 Nipun Gupta
2017-12-06 13:30 ` Laurentiu Tudor
2017-12-06 14:03 ` Bharat Bhushan
2017-12-06 14:23 ` Laurentiu Tudor [this message]
2017-12-07 13:18 ` Nipun Gupta
2017-12-07 13:55 ` Laurentiu Tudor
2017-12-06 16:18 ` [PATCH 2/2] staging: fsl-mc: do not print error in case of defer probe error Nipun Gupta
2017-12-06 11:16 ` Greg KH
2017-12-07 3:55 ` Nipun Gupta
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=5A27FD70.7040208@nxp.com \
--to=laurentiu.tudor@nxp.com \
--cc=arnd@arndb.de \
--cc=bharat.bhushan@nxp.com \
--cc=bretth256@gmail.com \
--cc=cakturk@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nipun.gupta@nxp.com \
--cc=stuyoder@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome