Skip to content

Commit 5ec9039

Browse files
igawgregkh
authored andcommitted
driver core: bus: add irq_get_affinity callback to bus_type
[ Upstream commit fea4952 ] 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> Stable-dep-of: a2d5a00 ("scsi: smartpqi: Use is_kdump_kernel() to check for kdump") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6884cb2 commit 5ec9039

File tree

1 file changed

+3
-0
lines changed
  • include/linux/device

1 file changed

+3
-0
lines changed

include/linux/device/bus.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct fwnode_handle;
4848
* will never get called until they do.
4949
* @remove: Called when a device removed from this bus.
5050
* @shutdown: Called at shut-down time to quiesce the device.
51+
* @irq_get_affinity: Get IRQ affinity mask for the device on this bus.
5152
*
5253
* @online: Called to put the device back online (after offlining it).
5354
* @offline: Called to put the device offline for hot-removal. May fail.
@@ -87,6 +88,8 @@ struct bus_type {
8788
void (*sync_state)(struct device *dev);
8889
void (*remove)(struct device *dev);
8990
void (*shutdown)(struct device *dev);
91+
const struct cpumask *(*irq_get_affinity)(struct device *dev,
92+
unsigned int irq_vec);
9093

9194
int (*online)(struct device *dev);
9295
int (*offline)(struct device *dev);

0 commit comments

Comments
 (0)