Home
last modified time | relevance | path

Searched refs:pdn (Results 1 – 25 of 89) sorted by relevance

1234

/Linux-v5.4/arch/powerpc/kernel/
Dpci_dn.c34 struct pci_dn *pdn; in pci_bus_to_pdn() local
53 pdn = dn ? PCI_DN(dn) : NULL; in pci_bus_to_pdn()
55 return pdn; in pci_bus_to_pdn()
62 struct pci_dn *parent, *pdn; in pci_get_pdn_by_devfn() local
77 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn_by_devfn()
78 if (pdn) in pci_get_pdn_by_devfn()
79 return pdn; in pci_get_pdn_by_devfn()
86 list_for_each_entry(pdn, &parent->child_list, list) { in pci_get_pdn_by_devfn()
87 if (pdn->busno == bus->number && in pci_get_pdn_by_devfn()
88 pdn->devfn == devfn) in pci_get_pdn_by_devfn()
[all …]
Drtas_pci.c45 int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) in rtas_read_config() argument
51 if (!pdn) in rtas_read_config()
53 if (!config_access_valid(pdn, where)) in rtas_read_config()
56 if (pdn->edev && pdn->edev->pe && in rtas_read_config()
57 (pdn->edev->pe->state & EEH_PE_CFG_BLOCKED)) in rtas_read_config()
61 addr = rtas_config_addr(pdn->busno, pdn->devfn, where); in rtas_read_config()
62 buid = pdn->phb->buid; in rtas_read_config()
81 struct pci_dn *pdn; in rtas_pci_read_config() local
86 pdn = pci_get_pdn_by_devfn(bus, devfn); in rtas_pci_read_config()
89 ret = rtas_read_config(pdn, where, size, val); in rtas_pci_read_config()
[all …]
Deeh_pe.c332 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_pe_get_parent() local
340 pdn = pci_get_pdn(edev->physfn); in eeh_pe_get_parent()
342 pdn = pdn ? pdn->parent : NULL; in eeh_pe_get_parent()
343 while (pdn) { in eeh_pe_get_parent()
345 parent = pdn_to_eeh_dev(pdn); in eeh_pe_get_parent()
352 pdn = pdn->parent; in eeh_pe_get_parent()
370 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_add_to_parent_pe() local
371 int config_addr = (pdn->busno << 8) | (pdn->devfn); in eeh_add_to_parent_pe()
385 pe = eeh_pe_get(pdn->phb, edev->pe_config_addr, config_addr); in eeh_add_to_parent_pe()
419 pe = eeh_pe_alloc(pdn->phb, EEH_PE_VF); in eeh_add_to_parent_pe()
[all …]
Deeh_dev.c38 struct eeh_dev *eeh_dev_init(struct pci_dn *pdn) in eeh_dev_init() argument
48 pdn->edev = edev; in eeh_dev_init()
49 edev->pdn = pdn; in eeh_dev_init()
50 edev->bdfn = (pdn->busno << 8) | pdn->devfn; in eeh_dev_init()
51 edev->controller = pdn->phb; in eeh_dev_init()
Deeh.c170 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_dump_dev_log() local
176 if (!pdn) { in eeh_dump_dev_log()
182 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log()
183 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in eeh_dump_dev_log()
185 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log()
186 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in eeh_dump_dev_log()
188 eeh_ops->read_config(pdn, PCI_VENDOR_ID, 4, &cfg); in eeh_dump_dev_log()
192 eeh_ops->read_config(pdn, PCI_COMMAND, 4, &cfg); in eeh_dump_dev_log()
198 eeh_ops->read_config(pdn, PCI_SEC_STATUS, 2, &cfg); in eeh_dump_dev_log()
202 eeh_ops->read_config(pdn, PCI_BRIDGE_CONTROL, 2, &cfg); in eeh_dump_dev_log()
[all …]
Dpci-hotplug.c40 struct pci_dn *pdn = PCI_DN(dn); in pci_find_bus_by_node() local
42 if (!pdn || !pdn->phb || !pdn->phb->bus) in pci_find_bus_by_node()
45 return find_bus_among_children(pdn->phb->bus, dn); in pci_find_bus_by_node()
58 struct pci_dn *pdn = pci_get_pdn(dev); in pcibios_release_device() local
66 if (pdn && (pdn->flags & PCI_DN_FLAG_DEAD)) { in pcibios_release_device()
68 kfree(pdn); in pcibios_release_device()
Deeh_cache.c162 struct pci_dn *pdn; in __eeh_addr_cache_insert_dev() local
166 pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn); in __eeh_addr_cache_insert_dev()
167 if (!pdn) { in __eeh_addr_cache_insert_dev()
173 edev = pdn_to_eeh_dev(pdn); in __eeh_addr_cache_insert_dev()
Deeh_sysfs.c100 struct pci_dn *pdn = pci_get_pdn(pdev); in eeh_notify_resume_show() local
105 pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
106 return sprintf(buf, "%d\n", pdn->last_allow_rc); in eeh_notify_resume_show()
/Linux-v5.4/arch/powerpc/platforms/pseries/
Deeh_pseries.c47 struct pci_dn *pdn = pci_get_pdn(pdev); in pseries_pcibios_bus_add_device() local
57 pdn->device_id = pdev->device; in pseries_pcibios_bus_add_device()
58 pdn->vendor_id = pdev->vendor; in pseries_pcibios_bus_add_device()
59 pdn->class_code = pdev->class; in pseries_pcibios_bus_add_device()
65 pdn->last_allow_rc = 0; in pseries_pcibios_bus_add_device()
67 pdn->pe_number = physfn_pdn->pe_num_map[pdn->vf_index]; in pseries_pcibios_bus_add_device()
70 eeh_add_device_early(pdn); in pseries_pcibios_bus_add_device()
74 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pseries_pcibios_bus_add_device()
76 edev->pe_config_addr = (pdn->busno << 16) | (pdn->devfn << 8); in pseries_pcibios_bus_add_device()
155 static int pseries_eeh_cap_start(struct pci_dn *pdn) in pseries_eeh_cap_start() argument
[all …]
Dpci.c62 struct pci_dn *pdn; in pseries_send_map_pe() local
70 pdn = pci_get_pdn(pdev); in pseries_send_map_pe()
71 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in pseries_send_map_pe()
72 buid = pdn->phb->buid; in pseries_send_map_pe()
93 struct pci_dn *pdn; in pseries_set_pe_num() local
95 pdn = pci_get_pdn(pdev); in pseries_set_pe_num()
96 pdn->pe_num_map[vf_index] = be16_to_cpu(pe_num); in pseries_set_pe_num()
102 pdn->pe_num_map[vf_index]); in pseries_set_pe_num()
107 struct pci_dn *pdn; in pseries_associate_pes() local
117 pdn = pci_get_pdn(pdev); in pseries_associate_pes()
[all …]
Diommu.c663 struct device_node *dn, *pdn; in pci_dma_bus_setup_pSeriesLP() local
673 for (pdn = dn; pdn != NULL; pdn = pdn->parent) { in pci_dma_bus_setup_pSeriesLP()
674 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_bus_setup_pSeriesLP()
684 ppci = PCI_DN(pdn); in pci_dma_bus_setup_pSeriesLP()
687 pdn, ppci->table_group); in pci_dma_bus_setup_pSeriesLP()
692 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, in pci_dma_bus_setup_pSeriesLP()
805 static u64 find_existing_ddw(struct device_node *pdn) in find_existing_ddw() argument
814 if (window->device == pdn) { in find_existing_ddw()
828 struct device_node *pdn; in find_existing_ddw_windows() local
835 for_each_node_with_property(pdn, DIRECT64_PROPNAME) { in find_existing_ddw_windows()
[all …]
Dmsi.c29 static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs) in rtas_change_msi() argument
35 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_change_msi()
36 buid = pdn->phb->buid; in rtas_change_msi()
70 struct pci_dn *pdn; in rtas_disable_msi() local
72 pdn = pci_get_pdn(pdev); in rtas_disable_msi()
73 if (!pdn) in rtas_disable_msi()
79 if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) { in rtas_disable_msi()
84 if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) { in rtas_disable_msi()
90 static int rtas_query_irq_number(struct pci_dn *pdn, int offset) in rtas_query_irq_number() argument
96 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_query_irq_number()
[all …]
Dsetup.c243 struct pci_dn *pdn; in pci_dn_reconfig_notifier() local
249 pdn = parent ? PCI_DN(parent) : NULL; in pci_dn_reconfig_notifier()
250 if (pdn) in pci_dn_reconfig_notifier()
251 pci_add_device_node_info(pdn->phb, np); in pci_dn_reconfig_notifier()
256 pdn = PCI_DN(np); in pci_dn_reconfig_notifier()
257 if (pdn) in pci_dn_reconfig_notifier()
258 list_del(&pdn->list); in pci_dn_reconfig_notifier()
/Linux-v5.4/arch/powerpc/platforms/powernv/
Deeh-powernv.c43 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_pcibios_bus_add_device() local
45 if (!pdn || eeh_has_flag(EEH_FORCE_DISABLED)) in pnv_pcibios_bus_add_device()
49 eeh_add_device_early(pdn); in pnv_pcibios_bus_add_device()
285 static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap) in pnv_eeh_find_cap() argument
291 if (!pdn) in pnv_eeh_find_cap()
295 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); in pnv_eeh_find_cap()
300 pnv_pci_cfg_read(pdn, pos, 1, &pos); in pnv_eeh_find_cap()
305 pnv_pci_cfg_read(pdn, pos + PCI_CAP_LIST_ID, 1, &id); in pnv_eeh_find_cap()
320 static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) in pnv_eeh_find_ecap() argument
322 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_find_ecap()
[all …]
Dpci.c596 static void pnv_pci_config_check_eeh(struct pci_dn *pdn) in pnv_pci_config_check_eeh() argument
598 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_config_check_eeh()
609 pe_no = pdn->pe_number; in pnv_pci_config_check_eeh()
634 (pdn->busno << 8) | (pdn->devfn), pe_no, fstate); in pnv_pci_config_check_eeh()
651 int pnv_pci_cfg_read(struct pci_dn *pdn, in pnv_pci_cfg_read() argument
654 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_read()
655 u32 bdfn = (pdn->busno << 8) | pdn->devfn; in pnv_pci_cfg_read()
683 __func__, pdn->busno, pdn->devfn, where, size, *val); in pnv_pci_cfg_read()
687 int pnv_pci_cfg_write(struct pci_dn *pdn, in pnv_pci_cfg_write() argument
690 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_write()
[all …]
Dpci-ioda.c667 struct pci_dn *pdn = pci_get_pdn(dev); in pnv_ioda_get_pe() local
669 if (!pdn) in pnv_ioda_get_pe()
671 if (pdn->pe_number == IODA_INVALID_PE) in pnv_ioda_get_pe()
673 return &phb->ioda.pe_array[pdn->pe_number]; in pnv_ioda_get_pe()
764 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_ioda_set_peltv() local
767 if (pdn && pdn->pe_number != IODA_INVALID_PE) { in pnv_ioda_set_peltv()
768 parent = &phb->ioda.pe_array[pdn->pe_number]; in pnv_ioda_set_peltv()
832 struct pci_dn *pdn = pci_get_pdn(parent); in pnv_ioda_deconfigure_pe() local
833 if (pdn && pdn->pe_number != IODA_INVALID_PE) { in pnv_ioda_deconfigure_pe()
834 rc = opal_pci_set_peltv(phb->opal_id, pdn->pe_number, in pnv_ioda_deconfigure_pe()
[all …]
Dnpu-dma.c24 struct pci_dn *pdn = PCI_DN(dn); in get_pci_dev() local
27 pdev = pci_get_domain_bus_and_slot(pci_domain_nr(pdn->phb->bus), in get_pci_dev()
28 pdn->busno, pdn->devfn); in get_pci_dev()
104 struct pci_dn *pdn; in get_gpu_pci_dev_and_pe() local
110 pdn = pci_get_pdn(pdev); in get_gpu_pci_dev_and_pe()
111 if (WARN_ON(!pdn || pdn->pe_number == IODA_INVALID_PE)) in get_gpu_pci_dev_and_pe()
116 pe = &phb->ioda.pe_array[pdn->pe_number]; in get_gpu_pci_dev_and_pe()
/Linux-v5.4/drivers/infiniband/hw/hns/
Dhns_roce_pd.c38 static int hns_roce_pd_alloc(struct hns_roce_dev *hr_dev, unsigned long *pdn) in hns_roce_pd_alloc() argument
40 return hns_roce_bitmap_alloc(&hr_dev->pd_bitmap, pdn) ? -ENOMEM : 0; in hns_roce_pd_alloc()
43 static void hns_roce_pd_free(struct hns_roce_dev *hr_dev, unsigned long pdn) in hns_roce_pd_free() argument
45 hns_roce_bitmap_free(&hr_dev->pd_bitmap, pdn, BITMAP_NO_RR); in hns_roce_pd_free()
68 ret = hns_roce_pd_alloc(to_hr_dev(ib_dev), &pd->pdn); in hns_roce_alloc_pd()
75 struct hns_roce_ib_alloc_pd_resp uresp = {.pdn = pd->pdn}; in hns_roce_alloc_pd()
78 hns_roce_pd_free(to_hr_dev(ib_dev), pd->pdn); in hns_roce_alloc_pd()
89 hns_roce_pd_free(to_hr_dev(pd->device), to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd()
/Linux-v5.4/drivers/pci/hotplug/
Drpadlpar_core.c139 struct pci_dn *pdn = PCI_DN(dn); in dlpar_pci_add_bus() local
140 struct pci_controller *phb = pdn->phb; in dlpar_pci_add_bus()
143 eeh_add_device_tree_early(pdn); in dlpar_pci_add_bus()
146 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); in dlpar_pci_add_bus()
207 struct pci_dn *pdn; in dlpar_remove_phb() local
221 pdn = dn->data; in dlpar_remove_phb()
222 BUG_ON(!pdn || !pdn->phb); in dlpar_remove_phb()
223 rc = remove_phb_dynamic(pdn->phb); in dlpar_remove_phb()
227 pdn->phb = NULL; in dlpar_remove_phb()
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/
Dpd.c39 int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn) in mlx5_core_alloc_pd() argument
48 *pdn = MLX5_GET(alloc_pd_out, out, pd); in mlx5_core_alloc_pd()
53 int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn) in mlx5_core_dealloc_pd() argument
59 MLX5_SET(dealloc_pd_in, in, pd, pdn); in mlx5_core_dealloc_pd()
Den_common.c64 static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn, in mlx5e_create_mkey() argument
81 MLX5_SET(mkc, mkc, pd, pdn); in mlx5e_create_mkey()
96 err = mlx5_core_alloc_pd(mdev, &res->pdn); in mlx5e_create_mdev_resources()
108 err = mlx5e_create_mkey(mdev, res->pdn, &res->mkey); in mlx5e_create_mdev_resources()
130 mlx5_core_dealloc_pd(mdev, res->pdn); in mlx5e_create_mdev_resources()
141 mlx5_core_dealloc_pd(mdev, res->pdn); in mlx5e_destroy_mdev_resources()
/Linux-v5.4/arch/powerpc/include/asm/
Deeh.h148 struct pci_dn *pdn; /* Associated PCI device node */ member
167 return edev ? edev->pdn : NULL; in eeh_dev_to_pdn()
218 void* (*probe)(struct pci_dn *pdn, void *data);
227 int (*read_config)(struct pci_dn *pdn, int where, int size, u32 *val);
228 int (*write_config)(struct pci_dn *pdn, int where, int size, u32 val);
230 int (*restore_config)(struct pci_dn *pdn);
231 int (*notify_resume)(struct pci_dn *pdn);
296 struct eeh_dev *eeh_dev_init(struct pci_dn *pdn);
321 int eeh_restore_vf_config(struct pci_dn *pdn);
347 static inline void *eeh_dev_init(struct pci_dn *pdn, void *data) in eeh_dev_init() argument
[all …]
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx4/
Dpd.c47 int mlx4_pd_alloc(struct mlx4_dev *dev, u32 *pdn) in mlx4_pd_alloc() argument
51 *pdn = mlx4_bitmap_alloc(&priv->pd_bitmap); in mlx4_pd_alloc()
52 if (*pdn == -1) in mlx4_pd_alloc()
59 void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn) in mlx4_pd_free() argument
61 mlx4_bitmap_free(&mlx4_priv(dev)->pd_bitmap, pdn, MLX4_USE_RR); in mlx4_pd_free()
/Linux-v5.4/include/uapi/rdma/
Dmthca-abi.h59 __u32 pdn; member
76 __u32 pdn; member
/Linux-v5.4/drivers/infiniband/hw/efa/
Defa_com_cmd.h89 u16 pdn; member
100 u16 pdn; member
213 u16 pdn; member
217 u16 pdn; member

1234