Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965251AbcDMLXi (ORCPT ); Wed, 13 Apr 2016 07:23:38 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:45352 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954AbcDMLXh (ORCPT ); Wed, 13 Apr 2016 07:23:37 -0400 Subject: Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure To: Marc Zyngier , gregkh@linuxfoundation.org, robh+dt@kernel.org, frowand.list@gmail.com, grant.likely@linaro.org, German.Rivera@freescale.com, jiang.liu@linux.intel.com, tglx@linutronix.de References: <1460543456-11345-1-git-send-email-mbrugger@suse.com> <1460543456-11345-5-git-send-email-mbrugger@suse.com> <570E25DD.9070106@arm.com> Cc: treding@nvidia.com, stuart.yoder@nxp.com, jroedel@suse.de, agraf@suse.de, bp@suse.de, matthias.bgg@gmail.com, bhaktipriya96@gmail.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org From: Matthias Brugger Message-ID: <570E2C2C.6090900@suse.com> Date: Wed, 13 Apr 2016 13:23:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <570E25DD.9070106@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2155 Lines: 54 On 13/04/16 12:56, Marc Zyngier wrote: > On 13/04/16 11:30, Matthias Brugger wrote: >> From: Matthias Brugger >> >> The fsl-mc driver can't be build as a module because it uses msi_* >> functions directly. Port the driver to use the platform_msi_* >> infrastructure instead, to allow it to be build as a module. >> >> Signed-off-by: Matthias Brugger >> --- >> .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 5 +- >> drivers/staging/fsl-mc/bus/mc-allocator.c | 9 +- >> drivers/staging/fsl-mc/bus/mc-msi.c | 169 +-------------------- >> drivers/staging/fsl-mc/include/mc-sys.h | 3 + >> 4 files changed, 14 insertions(+), 172 deletions(-) >> >> diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c >> index 720e2b0..0eecb7e 100644 >> --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c >> +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c >> @@ -25,7 +25,6 @@ static struct irq_chip its_msi_irq_chip = { >> .irq_mask = irq_chip_mask_parent, >> .irq_unmask = irq_chip_unmask_parent, >> .irq_eoi = irq_chip_eoi_parent, >> - .irq_set_affinity = msi_domain_set_affinity >> }; >> >> static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, >> @@ -86,7 +85,7 @@ int __init its_fsl_mc_msi_init(void) >> continue; >> } >> >> - mc_msi_domain = fsl_mc_msi_create_irq_domain( >> + mc_msi_domain = platform_msi_create_irq_domain( >> of_node_to_fwnode(np), >> &its_fsl_mc_msi_domain_info, >> parent); > > What? We are already creating a platform MSI domain for the ITS. How is > that going to work? If you want to convert this set of drivers to > platform ITS, fine. But you can't randomly hack in the ITS code and pray > for things not to fall apart. > From what I see, the difference between irq-gic-v3-its-fsl-mc-msi and the irq-gic-v3-its-platform-msi is the way ITS specific DeviceID is created in msi_prepare. German, is there a reason why you use the ICID read from the DPRC as dev_id? Regards, Matthias