summaryrefslogtreecommitdiffstats
path: root/include/linux/pds
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@amd.com>2023-08-07 13:57:50 -0700
committerAlex Williamson <alex.williamson@redhat.com>2023-08-16 10:53:11 -0600
commitb021d05e106e14b603a584b38ce62720e7d0f363 (patch)
tree07724d38b7f73a5f346b7729fc53c7b92cf2d733 /include/linux/pds
parent38fe3975b4c2c5eeefb543e09f9620da18b0d069 (diff)
downloadlinux-b021d05e106e14b603a584b38ce62720e7d0f363.tar.gz
linux-b021d05e106e14b603a584b38ce62720e7d0f363.tar.bz2
linux-b021d05e106e14b603a584b38ce62720e7d0f363.zip
pds_core: Require callers of register/unregister to pass PF drvdata
Pass a pointer to the PF's private data structure rather than bouncing in and out of the PF's PCI function address. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20230807205755.29579-4-brett.creeley@amd.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/pds')
-rw-r--r--include/linux/pds/pds_common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/pds/pds_common.h b/include/linux/pds/pds_common.h
index 435c8e8161c2..04427dcc0a59 100644
--- a/include/linux/pds/pds_common.h
+++ b/include/linux/pds/pds_common.h
@@ -41,9 +41,11 @@ enum pds_core_vif_types {
#define PDS_VDPA_DEV_NAME PDS_CORE_DRV_NAME "." PDS_DEV_TYPE_VDPA_STR
+struct pdsc;
+
int pdsc_register_notify(struct notifier_block *nb);
void pdsc_unregister_notify(struct notifier_block *nb);
void *pdsc_get_pf_struct(struct pci_dev *vf_pdev);
-int pds_client_register(struct pci_dev *pf_pdev, char *devname);
-int pds_client_unregister(struct pci_dev *pf_pdev, u16 client_id);
+int pds_client_register(struct pdsc *pf, char *devname);
+int pds_client_unregister(struct pdsc *pf, u16 client_id);
#endif /* _PDS_COMMON_H_ */