[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ed6e072-5ff1-4327-aee1-e6cdf673fa67@oracle.com>
Date: Wed, 13 Nov 2024 14:12:30 +0000
From: John Garry <john.g.garry@...cle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Daniel Wagner <dwagner@...e.de>, Daniel Wagner <wagi@...nel.org>,
Jens Axboe <axboe@...nel.dk>, Bjorn Helgaas <bhelgaas@...gle.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio PĂ©rez
<eperezma@...hat.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Keith Busch <kbusch@...nel.org>, Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
virtualization@...ts.linux.dev, linux-scsi@...r.kernel.org,
megaraidlinux.pdl@...adcom.com, mpi3mr-linuxdrv.pdl@...adcom.com,
MPT-FusionLinux.pdl@...adcom.com, storagedev@...rochip.com,
linux-nvme@...ts.infradead.org
Subject: Re: [PATCH v3 1/8] driver core: bus: add irq_get_affinity callback to
bus_type
On 13/11/2024 13:54, Greg Kroah-Hartman wrote:
>> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
>> b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
>> index 342d75f12051..5172af77a3f0 100644
>> --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
>> +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
>> @@ -3636,6 +3636,7 @@ static struct platform_driver hisi_sas_v2_driver = {
>> .name = DRV_NAME,
>> .of_match_table = sas_v2_of_match,
>> .acpi_match_table = ACPI_PTR(sas_v2_acpi_match),
>> + .irq_get_affinity_mask = hisi_sas_v2_get_affinity_mask,
>> },
>> };
>>
>>
>>> If no one objects, I go ahead and add the callback to struct
>>> device_driver.
>> I'd wait for Christoph and Greg to both agree. I was just wondering why we
>> use bus_type.
> bus types are good to set it at a bus level so you don't have to
> explicitly set it at each-and-every-driver. Depends on what you want
> this to be, if it is a "all drivers of this bus type will have the same
> callback" then put it on the bus. otherwise if you are going to
> mix/match on a same bus, then put it in the driver structure.
Understood, I think all drivers on same bus will use the same callback.
FWIW, most drivers of interest are pci drivers, so I thought that it
would simply be a change like this (for those drivers if we use struct
device_driver):
@@ -1442,6 +1455,7 @@ int __pci_register_driver(struct pci_driver
*drv, struct module *owner,
drv->driver.mod_name = mod_name;
drv->driver.groups = drv->groups;
drv->driver.dev_groups = drv->dev_groups;
+ drv->driver.irq_get_affinity = pci_device_irq_get_affinity;
Thanks,
John
Powered by blists - more mailing lists