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 6C47CC4321E for ; Fri, 10 Dec 2021 22:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345333AbhLJWYf (ORCPT ); Fri, 10 Dec 2021 17:24:35 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:50238 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344748AbhLJWWt (ORCPT ); Fri, 10 Dec 2021 17:22:49 -0500 Message-ID: <20211210221814.350967317@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639174753; 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=OiOpnus/jgb4RvtQJgk+f5PDfD1lWJHYgR9yAXQeu2I=; b=GqNHND5vQFfn8YzyhGofKZeaI5YQY13nUcIcEAnApVoYxde41u4gvkSMQaoDkklgWgL6Zk wHK3PJ2ZfWbYxMme7FaxL39snJIf0wZL5rHbzsTnJnEy6rOrqOZLuFMip60nKRVfr+lj/W BHXCzw1n2FEVbVuPbkWSyTdPAv+7+HaOx4FixB2V+JT0YpatDIYYDU4l+QGR4JfC9ST/QQ ngLKa+qq7x59ird4H3MCqjWV28aq/HayJ/tjTE/75JamD316Ym4S0uX+2lXQI9IZaj0SWh AKr8ZMfxglw+5yokSrUK5V9ferJK273x0+5I6KMvkrEpEnp1TSxk47w6CwmNQA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639174753; 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=OiOpnus/jgb4RvtQJgk+f5PDfD1lWJHYgR9yAXQeu2I=; b=HkiV41WymK0ae47Xnth9tBZ2L/9zjtZHSoLnNC/O478xU6oHNx8HK4b2wxQ3RzFd2wVYMW SUUWu6Lvp/P2vTDQ== 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 , Juergen Gross , xen-devel@lists.xenproject.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, 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 19/35] genirq/msi: Consolidate MSI descriptor data References: <20211210221642.869015045@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 10 Dec 2021 23:19:12 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner 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 @@ -143,6 +143,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 @@ -163,6 +164,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;