Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751748AbdLFNaX (ORCPT ); Wed, 6 Dec 2017 08:30:23 -0500 Received: from mail-db5eur01on0088.outbound.protection.outlook.com ([104.47.2.88]:46336 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751208AbdLFNaV (ORCPT ); Wed, 6 Dec 2017 08:30:21 -0500 From: Laurentiu Tudor To: Nipun Gupta , "stuyoder@gmail.com" , Bharat Bhushan , "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 Thread-Topic: [PATCH 1/2] staging: fsl-mc: Allocate IRQ's before scanning DPRC objects Thread-Index: AQHTbnlt2BNJ65h210adI9tnCdVqlqM2T7oA Date: Wed, 6 Dec 2017 13:30:17 +0000 Message-ID: <5A27F0E2.6010403@nxp.com> References: <1512577087-5345-1-git-send-email-nipun.gupta@nxp.com> In-Reply-To: <1512577087-5345-1-git-send-email-nipun.gupta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=laurentiu.tudor@nxp.com; x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0401MB2559;6:lU4bypVReKhEZpUAhon+cQnhrgCUCJo9DkpHomM0WnTrRnC7tuJx+OhddyNsoGxFynCA05fHmkDQ5h/uL4JaMWnQMTUPwJBoWAWxUY5QmNpXkDXkaSkF+YY7RIWOX/ETBVxRG8m8YwL6A1WaiWm2OJVIMz7Wisc3E3xofxPDIbVHaQKYK9Qd/wnBEo1/JWRVEgy4xHMQ1+se++SFbj3pTYZ+Do3S0MPzV4z2UF6Cew1+FVoZI6lEHpavQQ/NmqjrSppzdGUgtcA9yYmE4Y13owqICvLR6Hr/55uni0fzUgCzLhU71OgJk+aB4jW+sfZd2+eJseuP18n4W7Ht/qpNs5UJeyYULnLX+jP0qClm6fg=;5:tU2pAqVNQDTeZAQvFShUm1D6IODT5J7M3YJVJZS7+uzVqcTEU/WthGzC05V8IzwBClf2OXLTNJcqnTIK+EG8SMoJvuLFMW7eXpasju7LeI0bNdVkauQWAVLPgd0viZAlCk72kE7f8RiTmip/b63O/K/Wf7URLcIBAS8r+t6HyiY=;24:o9Cz4+3glLn+gnsn5YluFH9MuWHmBT2vgnBssyQjUU28ToNAtHGkfazabgasb+XZayo09NCXM6PettGvJOj3Kjj574TlM2+3BssOrAkvFGI=;7:99xgbj5vUoXTlZ3wXZa3dCiLK0U4nm19N/43lWa3jj8e8pUf9JT87QAupMYyfe/AP2uTONnQP3LaCZdSK539pV+iuctVKKyxSfUXRSlPmQBvVc4iz3F86IU/91Cj5hYWITpSfRiK4lqN9/0A4MwCd5/1fcZG3coNVMTjWrFnpUDf8FmlO1riS5gvRSJqOOYc2JFYp2xayej0Q3SYyXaEXp6picxi77QtEGtP1xsavsiLr2ZiwAD3lssUHDW2ag13 x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10009020)(346002)(376002)(366004)(39860400002)(189003)(199004)(24454002)(2201001)(5250100002)(110136005)(54906003)(36756003)(66066001)(59896002)(102836003)(3846002)(6116002)(316002)(2900100001)(6486002)(6436002)(6506006)(53936002)(39060400002)(99286004)(6246003)(97736004)(65816011)(87266011)(76176011)(4326008)(2501003)(6512007)(81156014)(5660300001)(8676002)(101416001)(229853002)(478600001)(2950100002)(81166006)(14454004)(53546010)(7736002)(33656002)(80316001)(25786009)(86362001)(106356001)(8936002)(68736007)(105586002)(3660700001)(2906002)(3280700002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2559;H:VI1PR0401MB1856.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 8fb3f018-f8b9-4238-224a-08d53cad7d95 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603286);SRVR:VI1PR0401MB2559; x-ms-traffictypediagnostic: VI1PR0401MB2559: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(3231022)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:VI1PR0401MB2559;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:VI1PR0401MB2559; x-forefront-prvs: 05134F8B4F spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <825E481E7F15244E9AE2AE96CC621778@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fb3f018-f8b9-4238-224a-08d53cad7d95 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2017 13:30:17.1258 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2559 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vB6DUSOX006347 Content-Length: 1783 Lines: 44 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 > --- > 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. --- Best Regards, Laurentiu