From patchwork Mon Dec 6 22:39: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: 12660201 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DD4BC433EF for ; Mon, 6 Dec 2021 22:48:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.240062.416354 (Exim 4.92) (envelope-from ) id 1muMmE-00045T-Ul; Mon, 06 Dec 2021 22:48:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 240062.416354; Mon, 06 Dec 2021 22:48:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMmE-00040S-GR; Mon, 06 Dec 2021 22:48:06 +0000 Received: by outflank-mailman (input) for mailman id 240062; Mon, 06 Dec 2021 22:48:02 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1muMdj-0004ul-02 for xen-devel@lists.xenproject.org; Mon, 06 Dec 2021 22:39:19 +0000 Received: from galois.linutronix.de (galois.linutronix.de [193.142.43.55]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 590abf77-56e5-11ec-8a4d-196798b21f7b; Mon, 06 Dec 2021 23:39:18 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 590abf77-56e5-11ec-8a4d-196798b21f7b Message-ID: <20211206210438.364897376@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638830357; 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=lfwGVAEBcyklXLRbPUy5y5GselbZO14/n/aq+dgdtbc=; b=j5c3qESX9iBdKToldLXBE4mBiWWAKKPkYIDGM4CivqyqRgWtM2cKGyevuhXVf4+HIOVj8Q uFcTY3R24ZImom1z6RqeCXCb6yWXrMHG+qyZ+eZqau2JrqWTtlLIKZuaLDpk5+6fWXaVkN zlJdKJEEHNFGXgVT+uAychPQsmGEDwINyyH7moxf9SQkQwQT0+n/dnCqgd5Jk3uI4XxsNa lVL4PW2MBwfna8zZ7jo8QaeSVwu128+xqM7vH7CSpqxqPyWgl6PBq3bDqOLBbr+/I7iyDD DT11PndTjBvCPLPvVluOl7MWdNjWcKhSTv3uGUyJqmuE4tWaIf6I9k52Vih+PQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638830357; 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=lfwGVAEBcyklXLRbPUy5y5GselbZO14/n/aq+dgdtbc=; b=JSs01xY7YCRCdnomelvSKAC22yikmnenmgcpV5rsCfrz12HIIi3qNeX/mh2zqXJLNltFEQ nnWFosI79rPNqfBw== 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 , xen-devel@lists.xenproject.org, Juergen Gross , Greg Kroah-Hartman , Will Deacon , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, Vinod Koul , Mark Rutland , Robin Murphy , Sinan Kaya Subject: [patch V2 13/36] genirq/msi: Consolidate MSI descriptor data References: <20211206210307.625116253@linutronix.de> MIME-Version: 1.0 Date: Mon, 6 Dec 2021 23:39:17 +0100 (CET) All non PCI/MSI usage variants have data structures in struct msi_desc with only one member: xxx_index. PCI/MSI has a entry_nr member. Add a common msi_index member to struct msi_desc so all implementations can share it which allows further consolidation. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- include/linux/msi.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -142,6 +142,7 @@ struct ti_sci_inta_msi_desc { * address or data changes * @write_msi_msg_data: Data parameter for the callback. * + * @msi_index: Index of the msi descriptor * @pci: [PCI] PCI speficic msi descriptor data * @platform: [platform] Platform device specific msi descriptor data * @fsl_mc: [fsl-mc] FSL MC device specific msi descriptor data @@ -162,6 +163,7 @@ struct msi_desc { void (*write_msi_msg)(struct msi_desc *entry, void *data); void *write_msi_msg_data; + u16 msi_index; union { struct pci_msi_desc pci; struct platform_msi_desc platform;