From patchwork Fri Dec 10 22:19:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12671131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9EDC433EF for ; Fri, 10 Dec 2021 22:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345066AbhLJWYP (ORCPT ); Fri, 10 Dec 2021 17:24:15 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:50628 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344782AbhLJWWz (ORCPT ); Fri, 10 Dec 2021 17:22:55 -0500 Message-ID: <20211210221814.540704224@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639174758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=cN4mOxuY7Okg1M+dlth8hthNIkx8L2iGPoOR+S+w+us=; b=M1tVjk6yFiMKXjz8z9rtje5UmZy1dz0aDWkX81TwRD2eOEBGMMOd4HQQbrePJuaH6+UMRX J8wzTS/tTtQdxXfph9XF969YPmB4Y9GtozG9J4einOdMXxZg3dQjYwxFmbcAJrBgo1kHEs PbCl/WQUGX4eNaP010LwWx1i2cL5DMz8+7ISg/FfzlYFm65Wyqm9T6dyF1sj5FioiD3VX+ 3iHK8Lyh2m73JkSmCPZRxgV4hdZQVdwIcMAKKbwxgrB6ifMNHS/T+pXh+isLvhLB4AByf+ ekRKlayeNgYLRRrhODOIIyqUXowDIwjE4RArqa+pNuDaWoQqOOLWRwNBHeCs1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639174758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=cN4mOxuY7Okg1M+dlth8hthNIkx8L2iGPoOR+S+w+us=; b=zq6e6vgOvTOBpv83YKIBY7AfdQR37XhK0GNGPBYF4MooJaZ9kRON5kPCk5FJ8SFotmH1vC 0TG1lB8qM5PsBWAg== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , Greg Kroah-Hartman , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Juergen Gross , xen-devel@lists.xenproject.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , Stuart Yoder , Laurentiu Tudor , Vinod Koul , dmaengine@vger.kernel.org, Mark Rutland , Will Deacon , Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org, Jassi Brar , Peter Ujfalusi , Sinan Kaya Subject: [patch V3 22/35] soc: ti: ti_sci_inta_msi: Use msi_desc::msi_index References: <20211210221642.869015045@linutronix.de> MIME-Version: 1.0 Date: Fri, 10 Dec 2021 23:19:17 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Thomas Gleixner Use the common msi_index member and get rid of the pointless wrapper struct. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Acked-by: Nishanth Menon --- drivers/irqchip/irq-ti-sci-inta.c | 2 +- drivers/soc/ti/ti_sci_inta_msi.c | 6 +++--- include/linux/msi.h | 16 ++-------------- 3 files changed, 6 insertions(+), 18 deletions(-) --- a/drivers/irqchip/irq-ti-sci-inta.c +++ b/drivers/irqchip/irq-ti-sci-inta.c @@ -595,7 +595,7 @@ static void ti_sci_inta_msi_set_desc(msi struct platform_device *pdev = to_platform_device(desc->dev); arg->desc = desc; - arg->hwirq = TO_HWIRQ(pdev->id, desc->inta.dev_index); + arg->hwirq = TO_HWIRQ(pdev->id, desc->msi_index); } static struct msi_domain_ops ti_sci_inta_msi_ops = { --- a/drivers/soc/ti/ti_sci_inta_msi.c +++ b/drivers/soc/ti/ti_sci_inta_msi.c @@ -84,7 +84,7 @@ static int ti_sci_inta_msi_alloc_descs(s return -ENOMEM; } - msi_desc->inta.dev_index = res->desc[set].start + i; + msi_desc->msi_index = res->desc[set].start + i; INIT_LIST_HEAD(&msi_desc->list); list_add_tail(&msi_desc->list, dev_to_msi_list(dev)); count++; @@ -96,7 +96,7 @@ static int ti_sci_inta_msi_alloc_descs(s return -ENOMEM; } - msi_desc->inta.dev_index = res->desc[set].start_sec + i; + msi_desc->msi_index = res->desc[set].start_sec + i; INIT_LIST_HEAD(&msi_desc->list); list_add_tail(&msi_desc->list, dev_to_msi_list(dev)); count++; @@ -154,7 +154,7 @@ unsigned int ti_sci_inta_msi_get_virq(st struct msi_desc *desc; for_each_msi_entry(desc, dev) - if (desc->inta.dev_index == dev_index) + if (desc->msi_index == dev_index) return desc->irq; return -ENODEV; --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -107,14 +107,6 @@ struct pci_msi_desc { }; /** - * ti_sci_inta_msi_desc - TISCI based INTA specific msi descriptor data - * @dev_index: TISCI device index - */ -struct ti_sci_inta_msi_desc { - u16 dev_index; -}; - -/** * struct msi_desc - Descriptor structure for MSI based interrupts * @list: List head for management * @irq: The base interrupt number @@ -128,8 +120,7 @@ struct ti_sci_inta_msi_desc { * @write_msi_msg_data: Data parameter for the callback. * * @msi_index: Index of the msi descriptor - * @pci: [PCI] PCI speficic msi descriptor data - * @inta: [INTA] TISCI based INTA specific msi descriptor data + * @pci: PCI specific msi descriptor data */ struct msi_desc { /* Shared device/bus type independent data */ @@ -147,10 +138,7 @@ struct msi_desc { void *write_msi_msg_data; u16 msi_index; - union { - struct pci_msi_desc pci; - struct ti_sci_inta_msi_desc inta; - }; + struct pci_msi_desc pci; }; /**