Home
last modified time | relevance | path

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

123

/Linux-v4.19/arch/powerpc/kernel/
Dpci_dn.c47 struct pci_dn *pdn; in pci_bus_to_pdn() local
66 pdn = dn ? PCI_DN(dn) : NULL; in pci_bus_to_pdn()
68 return pdn; in pci_bus_to_pdn()
75 struct pci_dn *parent, *pdn; in pci_get_pdn_by_devfn() local
90 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn_by_devfn()
91 if (pdn) in pci_get_pdn_by_devfn()
92 return pdn; in pci_get_pdn_by_devfn()
99 list_for_each_entry(pdn, &parent->child_list, list) { in pci_get_pdn_by_devfn()
100 if (pdn->busno == bus->number && in pci_get_pdn_by_devfn()
101 pdn->devfn == devfn) in pci_get_pdn_by_devfn()
[all …]
Deeh_pe.c302 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_pe_get_parent() local
310 pdn = pci_get_pdn(edev->physfn); in eeh_pe_get_parent()
312 pdn = pdn ? pdn->parent : NULL; in eeh_pe_get_parent()
313 while (pdn) { in eeh_pe_get_parent()
315 parent = pdn_to_eeh_dev(pdn); in eeh_pe_get_parent()
322 pdn = pdn->parent; in eeh_pe_get_parent()
340 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_add_to_parent_pe() local
341 int config_addr = (pdn->busno << 8) | (pdn->devfn); in eeh_add_to_parent_pe()
346 __func__, config_addr, pdn->phb->global_number); in eeh_add_to_parent_pe()
356 pe = eeh_pe_get(pdn->phb, edev->pe_config_addr, config_addr); in eeh_add_to_parent_pe()
[all …]
Drtas_pci.c58 int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) in rtas_read_config() argument
64 if (!pdn) in rtas_read_config()
66 if (!config_access_valid(pdn, where)) in rtas_read_config()
69 if (pdn->edev && pdn->edev->pe && in rtas_read_config()
70 (pdn->edev->pe->state & EEH_PE_CFG_BLOCKED)) in rtas_read_config()
74 addr = rtas_config_addr(pdn->busno, pdn->devfn, where); in rtas_read_config()
75 buid = pdn->phb->buid; in rtas_read_config()
94 struct pci_dn *pdn; in rtas_pci_read_config() local
99 pdn = pci_get_pdn_by_devfn(bus, devfn); in rtas_pci_read_config()
102 ret = rtas_read_config(pdn, where, size, val); in rtas_pci_read_config()
[all …]
Deeh.c166 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_dump_dev_log() local
173 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log()
174 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in eeh_dump_dev_log()
176 pdn->phb->global_number, pdn->busno, in eeh_dump_dev_log()
177 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in eeh_dump_dev_log()
179 eeh_ops->read_config(pdn, PCI_VENDOR_ID, 4, &cfg); in eeh_dump_dev_log()
183 eeh_ops->read_config(pdn, PCI_COMMAND, 4, &cfg); in eeh_dump_dev_log()
189 eeh_ops->read_config(pdn, PCI_SEC_STATUS, 2, &cfg); in eeh_dump_dev_log()
193 eeh_ops->read_config(pdn, PCI_BRIDGE_CONTROL, 2, &cfg); in eeh_dump_dev_log()
201 eeh_ops->read_config(pdn, cap, 4, &cfg); in eeh_dump_dev_log()
[all …]
Deeh_dev.c51 struct eeh_dev *eeh_dev_init(struct pci_dn *pdn) in eeh_dev_init() argument
61 pdn->edev = edev; in eeh_dev_init()
62 edev->pdn = pdn; in eeh_dev_init()
Deeh_cache.c173 struct pci_dn *pdn; in __eeh_addr_cache_insert_dev() local
177 pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn); in __eeh_addr_cache_insert_dev()
178 if (!pdn) { in __eeh_addr_cache_insert_dev()
184 edev = pdn_to_eeh_dev(pdn); in __eeh_addr_cache_insert_dev()
280 struct pci_dn *pdn; in eeh_addr_cache_build() local
287 pdn = pci_get_pdn_by_devfn(dev->bus, dev->devfn); in eeh_addr_cache_build()
288 if (!pdn) in eeh_addr_cache_build()
291 edev = pdn_to_eeh_dev(pdn); in eeh_addr_cache_build()
Dpci-hotplug.c44 struct pci_dn *pdn = PCI_DN(dn); in pci_find_bus_by_node() local
46 if (!pdn || !pdn->phb || !pdn->phb->bus) in pci_find_bus_by_node()
49 return find_bus_among_children(pdn->phb->bus, dn); in pci_find_bus_by_node()
Deeh_driver.c473 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_add_virt_device() local
477 __func__, pdn->phb->global_number, pdn->busno, in eeh_add_virt_device()
478 PCI_SLOT(pdn->devfn), PCI_FUNC(pdn->devfn)); in eeh_add_virt_device()
492 pci_iov_add_virtfn(edev->physfn, pdn->vf_index); in eeh_add_virt_device()
549 struct pci_dn *pdn = eeh_dev_to_pdn(edev); in eeh_rmv_device() local
551 pci_iov_remove_virtfn(edev->physfn, pdn->vf_index); in eeh_rmv_device()
558 pdn->pe_number = IODA_INVALID_PE; in eeh_rmv_device()
Deeh_sysfs.c99 struct pci_dn *pdn = pci_get_pdn(pdev); in eeh_notify_resume_show() local
104 pdn = pci_get_pdn(pdev); in eeh_notify_resume_show()
105 return sprintf(buf, "%d\n", pdn->last_allow_rc); in eeh_notify_resume_show()
/Linux-v4.19/arch/powerpc/platforms/pseries/
Deeh_pseries.c61 struct pci_dn *pdn = pci_get_pdn(pdev); in pseries_pcibios_bus_add_device() local
68 pdn->device_id = pdev->device; in pseries_pcibios_bus_add_device()
69 pdn->vendor_id = pdev->vendor; in pseries_pcibios_bus_add_device()
70 pdn->class_code = pdev->class; in pseries_pcibios_bus_add_device()
76 pdn->last_allow_rc = 0; in pseries_pcibios_bus_add_device()
78 pdn->pe_number = physfn_pdn->pe_num_map[pdn->vf_index]; in pseries_pcibios_bus_add_device()
79 edev = pdn_to_eeh_dev(pdn); in pseries_pcibios_bus_add_device()
85 eeh_add_device_early(pdn); in pseries_pcibios_bus_add_device()
87 edev->pe_config_addr = (pdn->busno << 16) | (pdn->devfn << 8); in pseries_pcibios_bus_add_device()
168 static int pseries_eeh_cap_start(struct pci_dn *pdn) in pseries_eeh_cap_start() argument
[all …]
Dpci.c74 struct pci_dn *pdn; in pseries_send_map_pe() local
82 pdn = pci_get_pdn(pdev); in pseries_send_map_pe()
83 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in pseries_send_map_pe()
84 buid = pdn->phb->buid; in pseries_send_map_pe()
105 struct pci_dn *pdn; in pseries_set_pe_num() local
107 pdn = pci_get_pdn(pdev); in pseries_set_pe_num()
108 pdn->pe_num_map[vf_index] = be16_to_cpu(pe_num); in pseries_set_pe_num()
114 pdn->pe_num_map[vf_index]); in pseries_set_pe_num()
119 struct pci_dn *pdn; in pseries_associate_pes() local
129 pdn = pci_get_pdn(pdev); in pseries_associate_pes()
[all …]
Diommu.c697 struct device_node *dn, *pdn; in pci_dma_bus_setup_pSeriesLP() local
707 for (pdn = dn; pdn != NULL; pdn = pdn->parent) { in pci_dma_bus_setup_pSeriesLP()
708 dma_window = of_get_property(pdn, "ibm,dma-window", NULL); in pci_dma_bus_setup_pSeriesLP()
718 ppci = PCI_DN(pdn); in pci_dma_bus_setup_pSeriesLP()
721 pdn, ppci->table_group); in pci_dma_bus_setup_pSeriesLP()
726 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, in pci_dma_bus_setup_pSeriesLP()
843 static u64 find_existing_ddw(struct device_node *pdn) in find_existing_ddw() argument
852 if (window->device == pdn) { in find_existing_ddw()
866 struct device_node *pdn; in find_existing_ddw_windows() local
873 for_each_node_with_property(pdn, DIRECT64_PROPNAME) { in find_existing_ddw_windows()
[all …]
Dmsi.c34 static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs) in rtas_change_msi() argument
40 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_change_msi()
41 buid = pdn->phb->buid; in rtas_change_msi()
75 struct pci_dn *pdn; in rtas_disable_msi() local
77 pdn = pci_get_pdn(pdev); in rtas_disable_msi()
78 if (!pdn) in rtas_disable_msi()
84 if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) { in rtas_disable_msi()
89 if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) { in rtas_disable_msi()
95 static int rtas_query_irq_number(struct pci_dn *pdn, int offset) in rtas_query_irq_number() argument
101 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_query_irq_number()
[all …]
Dsetup.c219 struct pci_dn *pdn; in pci_dn_reconfig_notifier() local
225 pdn = parent ? PCI_DN(parent) : NULL; in pci_dn_reconfig_notifier()
226 if (pdn) in pci_dn_reconfig_notifier()
227 pci_add_device_node_info(pdn->phb, np); in pci_dn_reconfig_notifier()
232 pdn = PCI_DN(np); in pci_dn_reconfig_notifier()
233 if (pdn) in pci_dn_reconfig_notifier()
234 list_del(&pdn->list); in pci_dn_reconfig_notifier()
/Linux-v4.19/arch/powerpc/platforms/powernv/
Deeh-powernv.c48 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_pcibios_bus_add_device() local
57 eeh_add_device_early(pdn); in pnv_pcibios_bus_add_device()
292 static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap) in pnv_eeh_find_cap() argument
298 if (!pdn) in pnv_eeh_find_cap()
302 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); in pnv_eeh_find_cap()
307 pnv_pci_cfg_read(pdn, pos, 1, &pos); in pnv_eeh_find_cap()
312 pnv_pci_cfg_read(pdn, pos + PCI_CAP_LIST_ID, 1, &id); in pnv_eeh_find_cap()
327 static int pnv_eeh_find_ecap(struct pci_dn *pdn, int cap) in pnv_eeh_find_ecap() argument
329 struct eeh_dev *edev = pdn_to_eeh_dev(pdn); in pnv_eeh_find_ecap()
335 if (pnv_pci_cfg_read(pdn, pos, 4, &header) != PCIBIOS_SUCCESSFUL) in pnv_eeh_find_ecap()
[all …]
Dpci-ioda.c675 struct pci_dn *pdn = pci_get_pdn(dev); in pnv_ioda_get_pe() local
677 if (!pdn) in pnv_ioda_get_pe()
679 if (pdn->pe_number == IODA_INVALID_PE) in pnv_ioda_get_pe()
681 return &phb->ioda.pe_array[pdn->pe_number]; in pnv_ioda_get_pe()
773 struct pci_dn *pdn = pci_get_pdn(pdev); in pnv_ioda_set_peltv() local
776 if (pdn && pdn->pe_number != IODA_INVALID_PE) { in pnv_ioda_set_peltv()
777 parent = &phb->ioda.pe_array[pdn->pe_number]; in pnv_ioda_set_peltv()
841 struct pci_dn *pdn = pci_get_pdn(parent); in pnv_ioda_deconfigure_pe() local
842 if (pdn && pdn->pe_number != IODA_INVALID_PE) { in pnv_ioda_deconfigure_pe()
843 rc = opal_pci_set_peltv(phb->opal_id, pdn->pe_number, in pnv_ioda_deconfigure_pe()
[all …]
Dpci.c602 static void pnv_pci_config_check_eeh(struct pci_dn *pdn) in pnv_pci_config_check_eeh() argument
604 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_config_check_eeh()
615 pe_no = pdn->pe_number; in pnv_pci_config_check_eeh()
640 (pdn->busno << 8) | (pdn->devfn), pe_no, fstate); in pnv_pci_config_check_eeh()
657 int pnv_pci_cfg_read(struct pci_dn *pdn, in pnv_pci_cfg_read() argument
660 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_read()
661 u32 bdfn = (pdn->busno << 8) | pdn->devfn; in pnv_pci_cfg_read()
689 __func__, pdn->busno, pdn->devfn, where, size, *val); in pnv_pci_cfg_read()
693 int pnv_pci_cfg_write(struct pci_dn *pdn, in pnv_pci_cfg_write() argument
696 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_write()
[all …]
Dnpu-dma.c58 struct pci_dn *pdn = PCI_DN(dn); in get_pci_dev() local
60 return pci_get_domain_bus_and_slot(pci_domain_nr(pdn->phb->bus), in get_pci_dev()
61 pdn->busno, pdn->devfn); in get_pci_dev()
181 struct pci_dn *pdn; in get_gpu_pci_dev_and_pe() local
187 pdn = pci_get_pdn(pdev); in get_gpu_pci_dev_and_pe()
188 if (WARN_ON(!pdn || pdn->pe_number == IODA_INVALID_PE)) in get_gpu_pci_dev_and_pe()
193 pe = &phb->ioda.pe_array[pdn->pe_number]; in get_gpu_pci_dev_and_pe()
325 struct pci_dn *pdn; in pnv_npu_try_dma_set_bypass() local
335 pdn = pci_get_pdn(npdev); in pnv_npu_try_dma_set_bypass()
336 if (WARN_ON(!pdn || pdn->pe_number == IODA_INVALID_PE)) in pnv_npu_try_dma_set_bypass()
[all …]
/Linux-v4.19/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()
73 ret = hns_roce_pd_alloc(to_hr_dev(ib_dev), &pd->pdn); in hns_roce_alloc_pd()
81 struct hns_roce_ib_alloc_pd_resp uresp = {.pdn = pd->pdn}; in hns_roce_alloc_pd()
84 hns_roce_pd_free(to_hr_dev(ib_dev), pd->pdn); in hns_roce_alloc_pd()
97 hns_roce_pd_free(to_hr_dev(pd->device), to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd()
/Linux-v4.19/drivers/pci/hotplug/
Drpadlpar_core.c137 struct pci_dn *pdn = PCI_DN(dn); in dlpar_pci_add_bus() local
138 struct pci_controller *phb = pdn->phb; in dlpar_pci_add_bus()
141 eeh_add_device_tree_early(pdn); in dlpar_pci_add_bus()
144 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); in dlpar_pci_add_bus()
205 struct pci_dn *pdn; in dlpar_remove_phb() local
219 pdn = dn->data; in dlpar_remove_phb()
220 BUG_ON(!pdn || !pdn->phb); in dlpar_remove_phb()
221 rc = remove_phb_dynamic(pdn->phb); in dlpar_remove_phb()
225 pdn->phb = NULL; in dlpar_remove_phb()
/Linux-v4.19/arch/powerpc/include/asm/
Deeh.h147 struct pci_dn *pdn; /* Associated PCI device node */ member
156 return edev ? edev->pdn : NULL; in eeh_dev_to_pdn()
207 void* (*probe)(struct pci_dn *pdn, void *data);
217 int (*read_config)(struct pci_dn *pdn, int where, int size, u32 *val);
218 int (*write_config)(struct pci_dn *pdn, int where, int size, u32 val);
220 int (*restore_config)(struct pci_dn *pdn);
221 int (*notify_resume)(struct pci_dn *pdn);
288 struct eeh_dev *eeh_dev_init(struct pci_dn *pdn);
313 int eeh_restore_vf_config(struct pci_dn *pdn);
339 static inline void *eeh_dev_init(struct pci_dn *pdn, void *data) in eeh_dev_init() argument
[all …]
/Linux-v4.19/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.c60 static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn, in mlx5e_create_mkey() argument
77 MLX5_SET(mkc, mkc, pd, pdn); in mlx5e_create_mkey()
92 err = mlx5_core_alloc_pd(mdev, &res->pdn); in mlx5e_create_mdev_resources()
104 err = mlx5e_create_mkey(mdev, res->pdn, &res->mkey); in mlx5e_create_mdev_resources()
125 mlx5_core_dealloc_pd(mdev, res->pdn); in mlx5e_create_mdev_resources()
136 mlx5_core_dealloc_pd(mdev, res->pdn); in mlx5e_destroy_mdev_resources()
/Linux-v4.19/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-v4.19/include/uapi/rdma/
Dmthca-abi.h59 __u32 pdn; member
76 __u32 pdn; member

123