From patchwork Sun Mar 31 12:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hawa, Hanna" X-Patchwork-Id: 10878739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BF291390 for ; Sun, 31 Mar 2019 12:36:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50D5628956 for ; Sun, 31 Mar 2019 12:36:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43F9828952; Sun, 31 Mar 2019 12:36:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE34128952 for ; Sun, 31 Mar 2019 12:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H5FlyUc0/LDHADbDAZNIPcCDCPSGrez4aDN69KqmRbI=; b=WAX/nfPnwbV0f3 9ZgLOE3hpV+vjWrw/CfQ3CWIiSN9yp7vGq7ZaH++iEpRyJz3WD4kwr+8mSBjl3ig9EDLIxTaG6OQc vLMurJFmhr9E/U7nFQUN+bSIhz42fT4eRDSJPWweGt6X4FGtU+3yT4EQ+8XMZweCFaxgr+sAg6/R3 eolYLUVX8O633W9w7ZTL42RLDmGOi/amtuI+Sdtl9XY9Ypbjbvor7PXlb0XchLg0hbfcdm4lY8zGw u99aiqXgqTuf2vbYzlcZH4agWFWltBiJi7n7EZr5Pn2pQ+CTmygibAhMV3TEdrBj7pdjGsF30AmPZ kzSprPf5ViWNmeWD4raQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAZh3-0007Gi-EZ; Sun, 31 Mar 2019 12:36:09 +0000 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAZgU-0006lv-Su for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2019 12:35:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1554035734; x=1585571734; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=6IZK+5tanW/xUNL8pm7VpvQzsJDgY+GHrhJhRxnWkmQ=; b=LpSUkQYu5MieB+DRlw9YhVMDpeE6iGM7l3s68ej131YZrpxs4pxwmrJU 70l68HQcOo8BUXQlSzeTkoy7MoxUO8HyrWlzQOzc44NCdUSf6FW21qWzR R1kBlZESkIl7oGdsuWXHjHdIak1zwqshw//sCEe3SHuMBFFaeFtGv+Q87 c=; X-IronPort-AV: E=Sophos;i="5.60,292,1549929600"; d="scan'208";a="796653353" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-69849ee2.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 31 Mar 2019 12:35:34 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-69849ee2.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id x2VCZR9r093438 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Sun, 31 Mar 2019 12:35:32 GMT Received: from EX13D19EUB003.ant.amazon.com (10.43.166.69) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 31 Mar 2019 12:35:31 +0000 Received: from ub6d44c9ce3e25c.ant.amazon.com (10.43.160.69) by EX13D19EUB003.ant.amazon.com (10.43.166.69) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 31 Mar 2019 12:35:21 +0000 From: Hanna Hawa To: , , , , , , , , , Subject: [PATCH 4/7] irqchip/al-msi: Update wrong parameter naming Date: Sun, 31 Mar 2019 15:34:12 +0300 Message-ID: <1554035655-11352-5-git-send-email-hhhawa@amazon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554035655-11352-1-git-send-email-hhhawa@amazon.com> References: <1554035655-11352-1-git-send-email-hhhawa@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.160.69] X-ClientProxiedBy: EX13P01UWA003.ant.amazon.com (10.43.160.197) To EX13D19EUB003.ant.amazon.com (10.43.166.69) Precedence: Bulk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190331_053535_438045_C94EAFD5 X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, barakw@amazon.com, hhhawa@amazon.com, vaerov@amazon.com, linux-kernel@vger.kernel.org, hanochu@amazon.com, linux-acpi@vger.kernel.org, zeev@amazon.com, dwmw@amazon.co.uk, jonnyc@amazon.com, ronenk@amazon.com, talel@amazon.com, alisaidi@amazon.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Update the naming of sgi parameter to be spi, and fix comments. The message interrupts target the SPIs in the target GIC, and not the SGIs. No functional change in this patch. Signed-off-by: Hanna Hawa --- drivers/irqchip/irq-al-msi.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/irqchip/irq-al-msi.c b/drivers/irqchip/irq-al-msi.c index a1bbefc..f04a311c 100644 --- a/drivers/irqchip/irq-al-msi.c +++ b/drivers/irqchip/irq-al-msi.c @@ -28,8 +28,8 @@ struct al_msix_data { spinlock_t msi_map_lock; phys_addr_t addr; - u32 spi_first; /* The SGI number that MSIs start */ - u32 num_spis; /* The number of SGIs for MSIs */ + u32 spi_first; /* The SPI number that MSIs start */ + u32 num_spis; /* The number of SPIs for MSIs */ unsigned long *msi_map; }; @@ -53,7 +53,7 @@ static struct irq_chip al_msix_irq_chip = { .irq_set_affinity = irq_chip_set_affinity_parent, }; -static int al_msix_allocate_sgi(struct al_msix_data *priv, int num_req) +static int al_msix_allocate_spi(struct al_msix_data *priv, int num_req) { int first; @@ -73,10 +73,10 @@ static int al_msix_allocate_sgi(struct al_msix_data *priv, int num_req) return priv->spi_first + first; } -static void al_msix_free_sgi(struct al_msix_data *priv, unsigned int sgi, +static void al_msix_free_spi(struct al_msix_data *priv, unsigned int spi, int num_req) { - int first = sgi - priv->spi_first; + int first = spi - priv->spi_first; spin_lock(&priv->msi_map_lock); @@ -119,7 +119,7 @@ static struct irq_chip middle_irq_chip = { }; static int al_msix_gic_domain_alloc(struct irq_domain *domain, - unsigned int virq, int sgi) + unsigned int virq, int spi) { struct irq_fwspec fwspec; struct irq_data *d; @@ -131,7 +131,7 @@ static int al_msix_gic_domain_alloc(struct irq_domain *domain, fwspec.fwnode = domain->parent->fwnode; fwspec.param_count = 3; fwspec.param[0] = 0; - fwspec.param[1] = sgi; + fwspec.param[1] = spi; fwspec.param[2] = IRQ_TYPE_EDGE_RISING; ret = irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec); @@ -149,27 +149,27 @@ static int al_msix_middle_domain_alloc(struct irq_domain *domain, unsigned int nr_irqs, void *args) { struct al_msix_data *priv = domain->host_data; - int sgi, err, i; + int spi, err, i; - sgi = al_msix_allocate_sgi(priv, nr_irqs); - if (sgi < 0) - return sgi; + spi = al_msix_allocate_spi(priv, nr_irqs); + if (spi < 0) + return spi; for (i = 0; i < nr_irqs; i++) { - err = al_msix_gic_domain_alloc(domain, virq + i, sgi + i); + err = al_msix_gic_domain_alloc(domain, virq + i, spi + i); if (err) - goto err_sgi; + goto err_spi; - irq_domain_set_hwirq_and_chip(domain, virq + i, sgi + i, + irq_domain_set_hwirq_and_chip(domain, virq + i, spi + i, &middle_irq_chip, priv); } return 0; -err_sgi: +err_spi: while (--i >= 0) irq_domain_free_irqs_parent(domain, virq, i); - al_msix_free_sgi(priv, sgi, nr_irqs); + al_msix_free_spi(priv, spi, nr_irqs); return err; } @@ -181,7 +181,7 @@ static void al_msix_middle_domain_free(struct irq_domain *domain, struct al_msix_data *priv = irq_data_get_irq_chip_data(d); irq_domain_free_irqs_parent(domain, virq, nr_irqs); - al_msix_free_sgi(priv, d->hwirq, nr_irqs); + al_msix_free_spi(priv, d->hwirq, nr_irqs); } static const struct irq_domain_ops al_msix_middle_domain_ops = {