lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 8/9] vfio/pci: export nvlink2 support into vendor vfio_pci drivers
From
Date


On 11/03/2021 00:02, Jason Gunthorpe wrote:
> On Wed, Mar 10, 2021 at 02:57:57PM +0200, Max Gurtovoy wrote:
>
>>>> +    .err_handler        = &vfio_pci_core_err_handlers,
>>>> +};
>>>> +
>>>> +#ifdef CONFIG_VFIO_PCI_DRIVER_COMPAT
>>>> +struct pci_driver *get_nvlink2gpu_vfio_pci_driver(struct pci_dev *pdev)
>>>> +{
>>>> +    if (pci_match_id(nvlink2gpu_vfio_pci_driver.id_table, pdev))
>>>> +        return &nvlink2gpu_vfio_pci_driver;
>>>
>>>
>>> Why do we need matching PCI ids here instead of looking at the FDT which
>>> will work better?
>>
>> what is FDT ? any is it better to use it instead of match_id ?
>
> This is emulating the device_driver match for the pci_driver.


No it is not, it is a device tree info which lets to skip the linux PCI
discovery part (the firmware does it anyway) but it tells nothing about
which drivers to bind.


> I don't think we can combine FDT matching with pci_driver, can we?

It is a c function calling another c function, all within vfio-pci, this
is not called by the generic pci code.



--
Alexey

\
 
 \ /
  Last update: 2021-03-10 15:27    [W:0.103 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site