From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FD38C433E0 for ; Tue, 21 Jul 2020 15:00:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2E8220709 for ; Tue, 21 Jul 2020 15:00:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M98YTmCx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="BVngLU/S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2E8220709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID:Subject:To:From: Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=xJU9fG2a0AjlSz2Xx907Pb9dRP1t8/babaDZ8E6Psto=; b=M98YTmCxsT6HF+9pXxhygATZy xFCKHlGkE8ryZ4RnVFZPVk50dK4pXNFa5b7O7wpu8Jp0rxTFx6KTtBI8aJswX4wOaE5YAQfvvtT1C WBgmR1KVH9JX9ea2tQOku67PIm3aoH4SmtNAFTQwEOaG7psA3G6HtMBZuV7RySVpDobhbBLmDrLJH /4ELGdfRaxgsbJHJxvxDCRqe4kRpTp4pcIBNftiFMMq/Fkz0zz2J6QYPok4ByulaQ7FZ3jbk6/AvB CRI8AOmnuQWGcc3nVrUK6jTST5XAgZGLzc75/r/tQDI6dDOB3HkpkyLWTSgnp3Dbo/tX4RZJgbRof O5NE8kbxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxtjb-0005nm-Tk; Tue, 21 Jul 2020 14:59:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxtjY-0005ma-Nl for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 14:59:09 +0000 Received: from localhost (mobile-166-175-191-139.mycingular.net [166.175.191.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7F6E20578; Tue, 21 Jul 2020 14:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595343545; bh=4IycvsYyfCQven5hmEHIv/wE1B/4BTld8UhyXIAjIwk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BVngLU/SGFKGdQVLXD0kKAx7KrJjQBCObzjMI7XXMnLPcOaJ1uDP3ToNUia1AhmTw uL3nZhL8/9Ucx6nS9GSO+uT81Lhla1RNKWihgB10H8s1NuCo6gFGz35ho5OvxTKi5S nEC7yGL7Sb2KrxySzhtgq2rk86sZt5CTTiq5xGGw= Date: Tue, 21 Jul 2020 09:59:03 -0500 From: Bjorn Helgaas To: Lorenzo Pieralisi Subject: Re: [PATCH v2 03/12] ACPI/IORT: Make iort_msi_map_rid() PCI agnostic Message-ID: <20200721145903.GA1117934@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200619082013.13661-4-lorenzo.pieralisi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_105908_925144_341D71E9 X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Marc Zyngier , Makarand Pawagi , linux-pci@vger.kernel.org, Catalin Marinas , Joerg Roedel , Hanjun Guo , "Rafael J. Wysocki" , Robin Murphy , linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , Sudeep Holla , Bjorn Helgaas , Diana Craciun , Will Deacon , linux-arm-kernel@lists.infradead.org, Laurentiu Tudor Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 19, 2020 at 09:20:04AM +0100, Lorenzo Pieralisi wrote: > There is nothing PCI specific in iort_msi_map_rid(). > > Rename the function using a bus protocol agnostic name, > iort_msi_map_id(), and convert current callers to it. > > Signed-off-by: Lorenzo Pieralisi > Cc: Will Deacon > Cc: Hanjun Guo > Cc: Bjorn Helgaas > Cc: Sudeep Holla > Cc: Catalin Marinas > Cc: Robin Murphy > Cc: "Rafael J. Wysocki" Acked-by: Bjorn Helgaas Sorry I missed this! > --- > drivers/acpi/arm64/iort.c | 12 ++++++------ > drivers/pci/msi.c | 2 +- > include/linux/acpi_iort.h | 6 +++--- > 3 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c > index 902e2aaca946..53f9ef515089 100644 > --- a/drivers/acpi/arm64/iort.c > +++ b/drivers/acpi/arm64/iort.c > @@ -568,22 +568,22 @@ static struct acpi_iort_node *iort_find_dev_node(struct device *dev) > } > > /** > - * iort_msi_map_rid() - Map a MSI requester ID for a device > + * iort_msi_map_id() - Map a MSI input ID for a device > * @dev: The device for which the mapping is to be done. > - * @req_id: The device requester ID. > + * @input_id: The device input ID. > * > - * Returns: mapped MSI RID on success, input requester ID otherwise > + * Returns: mapped MSI ID on success, input ID otherwise > */ > -u32 iort_msi_map_rid(struct device *dev, u32 req_id) > +u32 iort_msi_map_id(struct device *dev, u32 input_id) > { > struct acpi_iort_node *node; > u32 dev_id; > > node = iort_find_dev_node(dev); > if (!node) > - return req_id; > + return input_id; > > - iort_node_map_id(node, req_id, &dev_id, IORT_MSI_TYPE); > + iort_node_map_id(node, input_id, &dev_id, IORT_MSI_TYPE); > return dev_id; > } > > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index 74a91f52ecc0..77f48b95e277 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -1536,7 +1536,7 @@ u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev) > > of_node = irq_domain_get_of_node(domain); > rid = of_node ? of_msi_map_rid(&pdev->dev, of_node, rid) : > - iort_msi_map_rid(&pdev->dev, rid); > + iort_msi_map_id(&pdev->dev, rid); > > return rid; > } > diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h > index 08ec6bd2297f..e51425e083da 100644 > --- a/include/linux/acpi_iort.h > +++ b/include/linux/acpi_iort.h > @@ -28,7 +28,7 @@ void iort_deregister_domain_token(int trans_id); > struct fwnode_handle *iort_find_domain_token(int trans_id); > #ifdef CONFIG_ACPI_IORT > void acpi_iort_init(void); > -u32 iort_msi_map_rid(struct device *dev, u32 req_id); > +u32 iort_msi_map_id(struct device *dev, u32 id); > struct irq_domain *iort_get_device_domain(struct device *dev, u32 id, > enum irq_domain_bus_token bus_token); > void acpi_configure_pmsi_domain(struct device *dev); > @@ -39,8 +39,8 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev); > int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head); > #else > static inline void acpi_iort_init(void) { } > -static inline u32 iort_msi_map_rid(struct device *dev, u32 req_id) > -{ return req_id; } > +static inline u32 iort_msi_map_id(struct device *dev, u32 id) > +{ return id; } > static inline struct irq_domain *iort_get_device_domain( > struct device *dev, u32 id, enum irq_domain_bus_token bus_token) > { return NULL; } > -- > 2.26.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel