From patchwork Fri Dec 10 22:19:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12695740 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3C259C433F5 for ; Fri, 10 Dec 2021 22:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Date:MIME-Version:References:Subject:Cc :To:From:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=8UsLGFpllnH5t7w9gGUFtm7xyA0iocc3nRv7Nh82Gz8=; b=NZ6TaLEKu5AYX7 kqthxx4rWugFqSjC/Xk+SVVXnZhSUWMSCIb9dhJUO6OL2eMjWynUZ5BT3AoCBrGi/2WqdQyNTTOO1 oOpLb3yhjPhJQr/l6L9VRB6ZgKAS+abHHmre7iV+70aTr4zE9QXyI4+hsxBCr7WTQvF8GG3Wid7aD TcQ9NV5o4kYZwVDdG7TCguupJ3NwYNc1RK7CRPppeefsHbXnRry/ZIzGvedLlZwyqgKu8+o6zFrAQ ZOoEbk++Aad0LqeGwuvlmAQl3Hhi3j6hB/RDKkmgqkKjVqRmwDdIGAmNamIY/H4/Pvsdea8r0RtSz oE1eYf3lX6/FDkQe6Rig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvoTB-0045aj-K9; Fri, 10 Dec 2021 22:34:26 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvoEU-003zIV-QI for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 22:19:16 +0000 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 Date: Fri, 10 Dec 2021 23:19:12 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_141915_086298_65D433E2 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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;