Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp714504lqs; Fri, 14 Jun 2024 03:42:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBrPnz+syzjnQyVpwPpjjOvEC6125R9K7PePvHrdQHlMGHqlCawT6NN1uOy54TOZZgcEw3DWdY8SkGzRKPP0ivCb6H0njdQ6uAvXodAw== X-Google-Smtp-Source: AGHT+IFHkoS4g3OvMc9KeFhsGyOypJNfXzQVsGVIiJyzx2WEPYiYqnmnYteC03zvF91BodetieCI X-Received: by 2002:a05:6a20:3d81:b0:1b6:db6c:11ea with SMTP id adf61e73a8af0-1bae7e895d8mr2969989637.26.1718361766064; Fri, 14 Jun 2024 03:42:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718361766; cv=pass; d=google.com; s=arc-20160816; b=OL1sE+JDK9z5g9zv8Ijzc0wDAm6o1wTvi7v4am6XmthQuCl4hDEXYp3U7C1+cwI1NT OqodnYA7MMdhdCM05OAVATom5tbCmtXtoAwC/Wk1NJPT0tSWCGUsw5MOH/F5z5+7NWkp Z9u1Vb9h6hFkwnnBnUGEwLjdDb1BnR2q2BF8bkxiHrQCwEWEVIrk+4XO3S41laEZ9/Le Rydx1Kdb+Nk2JcnhC/3Mf2xn+l8xC+idTJeUHVX2KVNk60A91SdT6ELiRlOf+pCn3T4P RMjRaBAZb5tGuDOjyiMkWA1qkax3RMHnCfTrlg+5PqBGxJR2isqbbmyI1ljyDB2xcQPK 1hbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=jlwM44KfJXXmlV7qBcE4B5AolBhhXAHiWfp6+tG6k2s=; fh=6MfDlrX4IWj6w4/0mET5DKS+xxIy0dVXR7EciTCdkdM=; b=QKsOKPuAHKBLL6y8Bod/1V80rOMAGD4/9luXQ0zGBbi9QnltoxlvonnbdvuQI+A5ZX rcJ32jhfO3+u+pKRm0YtiOZNM94do2D65l21VjQL62RL9eK2G5PiKrbInBomXfH6pvra ahoHG32l3zvfFFwfljCb0YnqHNphMu5Bfi2p5q4kLg9G+Tiw6ti/FMwoaPtbVi3l2TFq 5SAQlWPSEqAbrqZOXBrwrUUBpWljJj9+aXFrIikwZ+hBRQVpZ0xcitUq3eY7ZhXA7qVV +pfKm7MdnxCJbELkI+KeBceXM1Icu9lHWlfOYdA4LmQNbnzvbcwWyEQjI0irl/gsftmc DE9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yFky7UdK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-214788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee4b14si33367885ad.394.2024.06.14.03.42.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 03:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yFky7UdK; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-214788-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214788-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BF65E290B56 for ; Fri, 14 Jun 2024 10:31:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41DA319EED1; Fri, 14 Jun 2024 10:26:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yFky7UdK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wwHrV34f" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAA5919EEA5; Fri, 14 Jun 2024 10:26:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718360770; cv=none; b=fyNhSUiHi26PrTEX6EGLi4zxUG+zPL6/AAMSdY6xOj7PRp2CDQbUmHuS9XeiK+9S76a55W5ZA7CtTTpUVMFPx4zatV0AbrPjrJHJwrhdCSQiXmmiQgWPdWz9l6WZjJqMUlFHH/b7C8cS+577vcLxODXH+5wj2jt5qvozxrXvprc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718360770; c=relaxed/simple; bh=MVrQ8vFdz8KrvafTvYlWpAfOt5noLfh4IiMY+gu30rU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eZaQCEGv2oOEvGVySkDLMr39oE1+enOJHb9dgyOv6LGGSVIcf3wxV0CQxqAbDTYiJY7NkblGBhWvLeUaJaZg0BHPaKBLJzVakx5zSjIkLDw2vIsKTSUjwskcUu4amcCX5hFDE4PSDGtaWFuA6zSeqnv3jeRv+RlIbCJQ9fHb1kg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yFky7UdK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wwHrV34f; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Shivamurthy Shastri DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718360767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jlwM44KfJXXmlV7qBcE4B5AolBhhXAHiWfp6+tG6k2s=; b=yFky7UdK80kPkSR6wKGxyMPcFUqoBR1IS9mdGWRjedZ7oolxeYHEGjUWQlIvoRaVjbUu8Q wXnKeKAxcML+atLg97NYOrCg9bjy8xDqDpVcuiFz/AhewedM4cQC8sHiBg46haf6s7MPUG QImTb0fguZe2/mE6NyAI1bhKHorAJg7OIT7YN5Y32OjobsmJ6PDnbpc5fJ1XiSkHlNoXFX p+RWD8zf4GPb/qMshEmT0owo5/QXIgnPvaxZy7BvDHotXFEHoir0rmmPe0Ys7m31JhnuuA xMioKJQlk+C1gsB76lOVh0YSt5C6U5q6TvW+hJc4z7/MseZpp1+Tw4SOA5HzRQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718360767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jlwM44KfJXXmlV7qBcE4B5AolBhhXAHiWfp6+tG6k2s=; b=wwHrV34fukJ+/cxgP5f7ZnVp0W9y1680sBEiZIvyW4ug/H3TguDVwJtkczi+UXw+t1aWJy dDKS54YQ8vFuZ7Dw== To: linux-kernel@vger.kernel.org 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 v3 24/24] genirq/msi: Move msi_device_data to core Date: Fri, 14 Jun 2024 12:24:03 +0200 Message-Id: <20240614102403.13610-25-shivamurthy.shastri@linutronix.de> In-Reply-To: <20240614102403.13610-1-shivamurthy.shastri@linutronix.de> References: <20240614102403.13610-1-shivamurthy.shastri@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.34.1