diff options
| author | Daniel Wagner <wagi@kernel.org> | 2024-12-02 17:00:09 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-12-23 18:17:23 +0300 |
| commit | fea4952df0eeec4e1a295ebaac9f61c0065fae87 (patch) | |
| tree | 1f53aebe112a1298c935149015210b66b3ad8d32 /include/linux/device | |
| parent | 0e20669a91306540ce76710c12201a73b1c3612a (diff) | |
| download | linux-fea4952df0eeec4e1a295ebaac9f61c0065fae87.tar.xz | |
driver core: bus: add irq_get_affinity callback to bus_type
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 <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-1-27211e9c2cd5@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/device')
| -rw-r--r-- | include/linux/device/bus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index cdc4757217f9..b18658bce2c3 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); |
