From patchwork Mon Nov 21 14:40:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 13051256 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 8593AC4332F for ; Mon, 21 Nov 2022 15:10:05 +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=7OEslOVvUd8fjVXcA7dzA7CcsXbcf/qUbh4t4JBnEqY=; b=TSxq5thBZ0hlux /wZlmwfWhEGdY4IZJDb94X+LLxqi/hw+Hz8gBaNIyrNyyxve549eLQVOASV09kRPcHQJDC/LCvCOj bXJC4gbhzfSCtjxub/80nrKsQVdNrPenEcinyK+id2OZ7hWKg+ekj2OAJH2lEMK9WoyXxFt2bxJT9 /070dcUaKFT2PO8NGtmPf50IJFiJvHzTbBtvQZo0ZLot9tdMyvBMg/4KFw6FSFWusRnjLfcKwZcLb VwVf3KsXNpKdf3WY5Q5m5wUyB87pZPvEWU/BqZ0roUtuC6cM/dvigd+G84hxDfDdIffoA9h9jokQH NlLwkQyQ1O1WaJzlle0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox8Pb-00F0nd-Iq; Mon, 21 Nov 2022 15:08:43 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox7y8-00EjDj-8y for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2022 14:40:22 +0000 Message-ID: <20221121140050.832658030@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041618; 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=A01rDYLdDvEdsWawPTU2MFDnHSxCHYrfBjArC+9zM5k=; b=3sGZwrP7BHCmXcJ+qf3v40n2omf1oHAszj/1xHl6Kg1X461MsUlsAP37AbpTnZzZouvoUH SUCwCld4zKmQ5+NnqhbmMS5r7ORH9dhJHGBC9c792QmlCZ7PL0AKiaENw0ydlWEvQenG6U xWG+PH3xFf6vpNiEcRjehjI4JHDZr0TDFr5cpsYbbHcjQH7rqBIlN9hrB5sJX9Xu8cHp2n AntpJfk+tMZ/ipSRozoRp/jwjZbiEA0pnfOQNn9MzEIxlRetiExSBAl7YBRlUe8OopveGd UMqFBpwo3VCfWcyfZHUjAhmUD/6okVqX/8ETCDP+kKA2N8sXU8HSJ8ku7EI7ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041618; 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=A01rDYLdDvEdsWawPTU2MFDnHSxCHYrfBjArC+9zM5k=; b=cCzTM/DDirCnDp3dnaeR/HDx5fiJc1DQ5Sr9zw9+PjVfvcVUuZwpGeICQAxP3WiEryK2VH Rj7e1wXY1BrfSoDw== From: Thomas Gleixner To: LKML Cc: Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ammar Faizi , Robin Murphy , Lorenzo Pieralisi , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , Sinan Kaya , Andy Gross , Bjorn Andersson , Mark Rutland , Shameerali Kolothum Thodi , Zenghui Yu , Shawn Guo , Sascha Hauer , Fabio Estevam Subject: [patch V2 40/40] genirq/msi: Move msi_device_data to core References: <20221121135653.208611233@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:40:18 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221121_064020_502802_02980AB8 X-CRM114-Status: GOOD ( 12.60 ) 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 Now that the platform MSI hack is gone, nothing needs to know about struct msi_device_data outside of the core code. Signed-off-by: Thomas Gleixner --- include/linux/msi.h | 22 ---------------------- kernel/irq/msi.c | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 24 deletions(-) --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -21,11 +21,7 @@ #include #include #include -#include -#include -#include #include -#include #include @@ -212,24 +208,6 @@ enum msi_desc_filter { MSI_DESC_ASSOCIATED, }; -/** - * msi_device_data - MSI per device data - * @properties: MSI properties which are interesting to drivers - * @mutex: Mutex protecting the MSI descriptor store - * @__store: Xarray for storing MSI descriptor pointers - * @__iter_idx: Index to search the next entry for iterators - * @__iter_max: Index to limit the search - * @__irqdomains: Per device interrupt domains - */ -struct msi_device_data { - unsigned long properties; - struct mutex mutex; - struct xarray __store; - unsigned long __iter_idx; - unsigned long __iter_max; - struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS]; -}; - int msi_setup_device_data(struct device *dev); void msi_lock_descs(struct device *dev); --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -8,18 +8,38 @@ * This file contains common code to support Message Signaled Interrupts for * PCI compatible and non PCI compatible devices. */ -#include #include #include #include #include +#include +#include #include #include -#include +#include +#include #include "internals.h" /** + * msi_device_data - MSI per device data + * @properties: MSI properties which are interesting to drivers + * @mutex: Mutex protecting the MSI descriptor store + * @__store: Xarray for storing MSI descriptor pointers + * @__iter_idx: Index to search the next entry for iterators + * @__iter_max: Index to limit the search + * @__irqdomains: Per device interrupt domains + */ +struct msi_device_data { + unsigned long properties; + struct mutex mutex; + struct xarray __store; + unsigned long __iter_idx; + unsigned long __iter_max; + struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS]; +}; + +/** * struct msi_ctrl - MSI internal management control structure * @domid: ID of the domain on which management operations should be done * @first: First (hardware) slot index to operate on