From mboxrd@z Thu Jan 1 00:00:00 1970 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 92DC9D462AC for ; Wed, 13 Nov 2024 14:26:38 +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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mB9TjiXv4R3MRLh5OOnXnEtLAhAqWK6bZ2IIrsnekB0=; b=RkiA4gQwdL8Gku40GSQjz/x7XV iyBnT42CWrJQBnTT1JC3AutFkIGNBMRuvCq59j1s86U2w7k2Uw3AEItB5fpm67ctVtScy0vy3BRRa QsTvH2sXfBJ6j3TPIdjEHxBc2Ey8ptN++uXRRqhVfIcduFDJb/fwJMVQFYDEpm1b94pNqpdrAlYw2 45IkGCmAoKU72N6O6BZkpryhXtv2oYFuDFHVbG0UX+BiGmgLJoN8yJl89ORpyLGF+jfSGmNRM412r ZMzGVtRuXHVsXB30u1dqxN+tYguW1jnIRp1RDp6y58CizBxL0rT6iqwf5q9WTtxGT6aH46avdr6sR lMBF+D0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tBEKK-000000077ou-34o5; Wed, 13 Nov 2024 14:26:36 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBEKG-000000077ln-1YLc for linux-nvme@lists.infradead.org; Wed, 13 Nov 2024 14:26:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 452EC5C0214; Wed, 13 Nov 2024 14:25:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF306C4CEC3; Wed, 13 Nov 2024 14:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731507991; bh=80LDPDpX9fi8j9wcH0xhw1xU3ocXiJTjjmEwdiRjBuY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Q5gmVPGM5cZYvYsjszUPnVvC2YTs+vxd72MMdYs7VzgiwucoXKMZYWyNIBug1gLFc 3tVJ+3rte9AcGHpgunbV+WIrrjIFyTV8uPNBk1xzvvZGGriL3qfYAhC2G3hsBxXpb1 /tHNTz3B0MAsAJ1n7Cp6Df13/S+u2N8ogdI9DMqPSpEWEztftCfkbpsu5Ks+jKEDXJ UTdi8t0o1BiPOByiyyf6TfvVKmS0zKd/nOIYANlS8DlmGJdAQ4yHlxYeriRYYqHgNR wj7nSuuGLYoI99/JUYtsR4rh+wDa17Oda3bJYTMjFq2Hukld+zzBfkdO0W3Ntx8k3C 94mp34sGbuVBA== From: Daniel Wagner Date: Wed, 13 Nov 2024 15:26:15 +0100 Subject: [PATCH v4 01/10] driver core: bus: add irq_get_affinity callback to bus_type MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241113-refactor-blk-affinity-helpers-v4-1-dd3baa1e267f@kernel.org> References: <20241113-refactor-blk-affinity-helpers-v4-0-dd3baa1e267f@kernel.org> In-Reply-To: <20241113-refactor-blk-affinity-helpers-v4-0-dd3baa1e267f@kernel.org> To: Jens Axboe , Bjorn Helgaas , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , "Martin K. Petersen" , Keith Busch , Christoph Hellwig , Sagi Grimberg , John Garry , Greg Kroah-Hartman , Hannes Reinecke Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev, linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com, mpi3mr-linuxdrv.pdl@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, storagedev@microchip.com, linux-nvme@lists.infradead.org, Daniel Wagner X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241113_062632_488092_FDD562CF X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-nvme@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-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org Introducing a callback in struct bus_type so that a subsystem can hook up the getters directly. This approach avoids exposing random getters in any subsystems APIs. Acked-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner --- include/linux/device/bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index cdc4757217f9bb4b36b5c3b8a48bab45737e44c5..b18658bce2c3819fc1cbeb38fb98391d56ec3317 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -48,6 +48,7 @@ struct fwnode_handle; * will never get called until they do. * @remove: Called when a device removed from this bus. * @shutdown: Called at shut-down time to quiesce the device. + * @irq_get_affinity: Get IRQ affinity mask for the device on this bus. * * @online: Called to put the device back online (after offlining it). * @offline: Called to put the device offline for hot-removal. May fail. @@ -87,6 +88,8 @@ struct bus_type { void (*sync_state)(struct device *dev); void (*remove)(struct device *dev); void (*shutdown)(struct device *dev); + const struct cpumask *(*irq_get_affinity)(struct device *dev, + unsigned int irq_vec); int (*online)(struct device *dev); int (*offline)(struct device *dev); -- 2.47.0