From patchwork Sat Nov 27 01:20:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12693798 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 3D2D5C433F5 for ; Sat, 27 Nov 2021 01:33:19 +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=c5vXQQpa0nY+Tjd0H+BDBKulH+lIICURhzOftTlo3zY=; b=W4ibuRfgjcZ9W6 178TkmNEoVYCOldIiaqeRiB+ZFrKyiBN9a8VksYCp2kUG34McayjpDEuRMGn8o2woEYGWH3aWGvdk l4b/eaIAasdL99O9PvEYcXv7irq3I8A17v/DsX6Dys+TqDt3od96XhKi4ovGA/AYODbCTualyS773 3DWWomcj99BWwR4ZXVpxRhnwzX4KiQr1Un/PAjhSWsmCLoEjarzruF9QoI83sIjpcvlxUrGQOd17W EqQv/Okkh9k/U4eeYv+5HL5bW/XimPd7eLy+Pz7teKTGGEHzEL+jq/9sd4wC32rpI64o0J50KGdax x339tjVhs5zLzxlXxizQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqmYn-00CGDf-De; Sat, 27 Nov 2021 01:31: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 1mqmOF-00C9QL-Jj for linux-arm-kernel@lists.infradead.org; Sat, 27 Nov 2021 01:20:35 +0000 Message-ID: <20211126230524.778704986@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976030; 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=Ehi/wwF9q+UnZyXX27wliNOB9+x0r0rx0yUOBA3VcWA=; b=VTMtOkbqzmfdwZwSBeV1FD5w52HS+b6Mgrcwr6QflvuBj7vnE4RYJ5rfk7qUTp+bji6JcK cVF5asbiqIvHDtduDdJIVLWmIVbgaq4ZDaKaXvzsESAoYczDrJm1r9uU84ox0DXw2hgOWd v12BvM3GjC7FmjS2O5X26UVGzu4p++bPBOdwcy6pkI7nqcz9nxHWnLNfIWc36CYE5KfXcz ZHui/U+6dWfSZPfPp2tCvzujaLDyunWyL/85kPslmw2e9t7h551TfehRds9qz8pHN4Zasp Nl+4uuqVBbimdRkb8y6iysOMYBA7U92UU3CXWyKlYGoqa9HtUT7oEixfcn037w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976030; 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=Ehi/wwF9q+UnZyXX27wliNOB9+x0r0rx0yUOBA3VcWA=; b=i6NWrHDPAtxe6JmljqOrt1HMZj0MXlU06z+oRNVp0rjhliRvqguewklbZVYvPlSgSsUf7Q tlJFP458IFEstdCg== 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, Greg Kroah-Hartman , 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, x86@kernel.org, Vinod Koul , Mark Rutland , Will Deacon , Sinan Kaya Subject: [patch 14/37] genirq/msi: Consolidate MSI descriptor data References: <20211126224100.303046749@linutronix.de> MIME-Version: 1.0 Date: Sat, 27 Nov 2021 02:20:29 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_172031_872623_D8A99C29 X-CRM114-Status: UNSURE ( 8.33 ) 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 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 --- 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;