From patchwork Sun Jun 23 15:19:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 13708684 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 6CF8BC27C4F for ; Sun, 23 Jun 2024 16:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Content-Type: MIME-Version:References:Subject:Cc:To:From:Message-ID:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=ayz7/gapo7J2KsRn3pIvCx1gxgs6k+vCGWQXeJ/y15w=; b=hbc541fmqoyoXR 4IVovIAG33ofd2Ez5jxvRnjRkCIHmzeKiUlV1vre7FlCP+u2XjeakRnO0apbslkEfhTimBxZo8ZJt PPGIMfdjut1xBg0p95rdej2P9NS/zWn+qZ9kQHSkk2eYVt3UL99b0d/jpHhAPF85BojcYKhbdTJFS iOtuKdoTrPnBXjQL+b3fSsAia+jDwGFk+e0Ol6RkbQR7rXGoxq0Et7dEbZjL2yM6ju6vxN6w2aTLi 5GnbrtuGcV8Mvjy8dL1BqngoqAITbeP3XfukoXIB179Q7mudW4h2FCWxptE1WCfLk7ia8NcOwnuhX PGlPAEoMmvlp3opE0pRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLQ6k-0000000ENc0-21n4; Sun, 23 Jun 2024 16:30:26 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLP07-0000000EGWD-2hYx for linux-arm-kernel@bombadil.infradead.org; Sun, 23 Jun 2024 15:19:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Date:Content-Type:MIME-Version: References:Subject:Cc:To:From:Message-ID:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To; bh=ayz7/gapo7J2KsRn3pIvCx1gxgs6k+vCGWQXeJ/y15w=; b=FkQrXg5MiyUFFp54ziUi8TmMLv 3lorazwBAopxbIyPtg6UupwxIUa42HNVVTP8PWlynLuoJmJsRP/ElWxBF/oT5ZIJ8vy8La+i21dYa yEdH93F0RyjhHf9nyYiZ+wZnQagtWC/Gz9EXdbdjHuPMjGsVYNhQgiBx71OaTN3jtgRG7eqQv2NV7 5F/0i6Q5/CO82/BgB95WjmxgOOfOKsOnuuxQ64BbtZD/svnSkYgK+8i8CPSe1TmjybuMe60acj1wd aHVPFDxJqHvLn16qM/BwJOjMYXyQ8TLa/wkXp5yeW8HAt3X864aofMRheEleYlnx17i0TSkvfFN5P +27g598A==; Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLOzr-000000083eg-1bQS for linux-arm-kernel@lists.infradead.org; Sun, 23 Jun 2024 15:19:27 +0000 Message-ID: <20240623142236.003295177@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1719155947; 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=ayz7/gapo7J2KsRn3pIvCx1gxgs6k+vCGWQXeJ/y15w=; b=P2WoZlu3h/zBcEdVYrNc5xi4sNCYI+hCGzWB0vRZ9NigE4zon4nR7IspWgGnP2lhwte6/f vJk08K1OimEUrncEhrXNSMzAQk2WQR+DVjSx4UlE8cVEoOlmlGXYr6Z0oyiEa7sVyYguN3 8+GcaaHhgrxCEhQiYQea+dL23HasZfJn4x0ZCtdeK/TPmSTdzqbhB3Itha7wKTDwla11xd kOPGj5zY5M2d2AqXM7xsePY8IHjaEud1uIrasRC0/HQcpKesvzyIfzBZM2Qh8ZoShCuP6V FaK6qr/1YkKLkZ8teiAlI2DJQOkvPyYgPtYr0YBlKeF1x+0p6NCV+6BZ1f1gKg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1719155947; 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=ayz7/gapo7J2KsRn3pIvCx1gxgs6k+vCGWQXeJ/y15w=; b=siYTR3zwA6ww5leVHOjIeXB6U+VYY+4n8khlgdrNC83FSu16TuOuY78u/5Smnss4vzBHwh ZIzCInAUMp3H2JCg== From: Thomas Gleixner To: LKML Cc: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, maz@kernel.org, tglx@linutronix.de, anna-maria@linutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, bhelgaas@google.com, rdunlap@infradead.org, vidyas@nvidia.com, ilpo.jarvinen@linux.intel.com, apatel@ventanamicro.com, kevin.tian@intel.com, nipun.gupta@amd.com, den@valinux.co.jp, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, gregkh@linuxfoundation.org, rafael@kernel.org, alex.williamson@redhat.com, will@kernel.org, lorenzo.pieralisi@arm.com, jgg@mellanox.com, ammarfaizi2@gnuweeb.org, robin.murphy@arm.com, lpieralisi@kernel.org, nm@ti.com, kristo@kernel.org, vkoul@kernel.org, okaya@kernel.org, agross@kernel.org, andersson@kernel.org, mark.rutland@arm.com, shameerali.kolothum.thodi@huawei.com, yuzenghui@huawei.com, shivamurthy.shastri@linutronix.de Subject: [patch V4 21/21] genirq/msi: Move msi_device_data to core References: <20240623142137.448898081@linutronix.de> MIME-Version: 1.0 Date: Sun, 23 Jun 2024 17:19:07 +0200 (CEST) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240623_161921_126227_07888AF4 X-CRM114-Status: GOOD ( 14.41 ) 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 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 Signed-off-by: Anna-Maria Behnsen Signed-off-by: Shivamurthy Shastri Signed-off-by: Thomas Gleixner --- v3: fixed warning by kernel test robot warning: cannot understand function prototype: 'struct msi_device_data ' --- include/linux/msi.h | 18 ------------------ kernel/irq/msi.c | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/include/linux/msi.h b/include/linux/msi.h index 4c3462a6a97b..369367ecae5e 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -21,11 +21,7 @@ #include #include #include -#include -#include -#include #include -#include #include @@ -227,20 +223,6 @@ struct msi_dev_domain { struct irq_domain *domain; }; -/** - * msi_device_data - MSI per device data - * @properties: MSI properties which are interesting to drivers - * @mutex: Mutex protecting the MSI descriptor store - * @__domains: Internal data for per device MSI domains - * @__iter_idx: Index to search the next entry for iterators - */ -struct msi_device_data { - unsigned long properties; - struct mutex mutex; - struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS]; - unsigned long __iter_idx; -}; - int msi_setup_device_data(struct device *dev); void msi_lock_descs(struct device *dev); diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 8314b1d4a903..5fa0547ece0c 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -8,17 +8,33 @@ * 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" +/** + * struct msi_device_data - MSI per device data + * @properties: MSI properties which are interesting to drivers + * @mutex: Mutex protecting the MSI descriptor store + * @__domains: Internal data for per device MSI domains + * @__iter_idx: Index to search the next entry for iterators + */ +struct msi_device_data { + unsigned long properties; + struct mutex mutex; + struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS]; + unsigned long __iter_idx; +}; + /** * struct msi_ctrl - MSI internal management control structure * @domid: ID of the domain on which management operations should be done