From: Ming Lei <ming.lei@redhat.com>
To: Daniel Wagner <wagi@kernel.org>
Cc: "Jens Axboe" <axboe@kernel.dk>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Keith Busch" <kbusch@kernel.org>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"John Garry" <john.g.garry@oracle.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Hannes Reinecke" <hare@suse.de>,
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
Subject: Re: [PATCH v4 02/10] driver core: add irq_get_affinity callback device_driver
Date: Thu, 14 Nov 2024 09:52:55 +0800 [thread overview]
Message-ID: <ZzVX92YaqVpW9cPw@fedora> (raw)
In-Reply-To: <20241113-refactor-blk-affinity-helpers-v4-2-dd3baa1e267f@kernel.org>
On Wed, Nov 13, 2024 at 03:26:16PM +0100, Daniel Wagner wrote:
> Introducing a callback in struct device_driver so that a device driver
> can hook up the getters directly. This approach avoids exposing random
> getters in drivers.
>
> Signed-off-by: Daniel Wagner <wagi@kernel.org>
> ---
> include/linux/device/driver.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
> index 5c04b8e3833b995f9fd4d65b8732b3dfce2eba7e..0d1aee423f6c076ae102bdd0536233c259947fac 100644
> --- a/include/linux/device/driver.h
> +++ b/include/linux/device/driver.h
> @@ -74,6 +74,7 @@ enum probe_type {
> * @suspend: Called to put the device to sleep mode. Usually to a
> * low power state.
> * @resume: Called to bring a device from sleep mode.
> + * @irq_get_affinity: Get IRQ affinity mask for the device.
> * @groups: Default attributes that get created by the driver core
> * automatically.
> * @dev_groups: Additional attributes attached to device instance once
> @@ -112,6 +113,8 @@ struct device_driver {
> void (*shutdown) (struct device *dev);
> int (*suspend) (struct device *dev, pm_message_t state);
> int (*resume) (struct device *dev);
> + const struct cpumask *(*irq_get_affinity)(struct device *dev,
> + unsigned int irq_vec);
> const struct attribute_group **groups;
> const struct attribute_group **dev_groups;
The patch looks fine, but if you put 1, 2 and 5 into single patch,
it will become much easier to review, anyway:
Reviewed-by: Ming Lei <ming.lei@redhat.com>
--
Ming
next prev parent reply other threads:[~2024-11-14 1:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 14:26 [PATCH v4 00/10] blk: refactor queue affinity helpers Daniel Wagner
2024-11-13 14:26 ` [PATCH v4 01/10] driver core: bus: add irq_get_affinity callback to bus_type Daniel Wagner
2024-11-14 1:45 ` Ming Lei
2024-11-13 14:26 ` [PATCH v4 02/10] driver core: add irq_get_affinity callback device_driver Daniel Wagner
2024-11-14 1:52 ` Ming Lei [this message]
2024-11-14 7:06 ` Daniel Wagner
2024-11-13 14:26 ` [PATCH v4 03/10] PCI: hookup irq_get_affinity callback Daniel Wagner
2024-11-14 1:53 ` Ming Lei
2024-11-13 14:26 ` [PATCH v4 04/10] virtio: " Daniel Wagner
2024-11-14 1:54 ` Ming Lei
2024-11-13 14:26 ` [PATCH v4 05/10] blk-mq: introduce blk_mq_hctx_map_queues Daniel Wagner
2024-11-14 1:58 ` Ming Lei
2024-11-14 7:54 ` Daniel Wagner
2024-11-14 9:12 ` Ming Lei
2024-11-14 12:06 ` Daniel Wagner
2024-11-14 12:11 ` Christoph Hellwig
2024-11-14 12:20 ` John Garry
2024-11-13 14:26 ` [PATCH v4 06/10] scsi: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues Daniel Wagner
2024-11-13 14:26 ` [PATCH v4 07/10] scsi: hisi_sas: use blk_mq_hctx_map_queues to map queues Daniel Wagner
2024-11-14 0:36 ` kernel test robot
2024-11-14 7:08 ` Daniel Wagner
2024-11-14 3:28 ` kernel test robot
2024-11-13 14:26 ` [PATCH v4 08/10] nvme: replace blk_mq_pci_map_queues with blk_mq_hctx_map_queues Daniel Wagner
2024-11-13 14:26 ` [PATCH v4 09/10] virtio: blk/scsi: replace blk_mq_virtio_map_queues " Daniel Wagner
2024-11-13 14:26 ` [PATCH v4 10/10] blk-mq: remove unused queue mapping helpers Daniel Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZzVX92YaqVpW9cPw@fedora \
--to=ming.lei@redhat.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=eperezma@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jasowang@redhat.com \
--cc=john.g.garry@oracle.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@broadcom.com \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=mst@redhat.com \
--cc=sagi@grimberg.me \
--cc=storagedev@microchip.com \
--cc=virtualization@lists.linux.dev \
--cc=wagi@kernel.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).