/linux/arch/powerpc/platforms/powernv/ |
H A D | pci-ioda.c | 120 phb->ioda.pe_array[pe_no].phb = phb; in pnv_ioda_init_pe() 189 struct pnv_phb *phb = pe->phb; in pnv_ioda_free_pe() local 1212 struct pnv_phb *phb = pe->phb; in pnv_pci_ioda2_tce_invalidate_pe() local 1229 struct pnv_phb *phb = pe->phb; in pnv_pci_ioda2_tce_invalidate() local 1282 struct pnv_phb *phb = pe->phb; in pnv_pci_ioda2_set_window() local 1461 struct pnv_phb *phb = pe->phb; in pnv_pci_ioda2_unset_window() local 1986 struct pnv_phb *phb = pe->phb; in pnv_ioda_setup_pe_res() local 2382 struct pnv_phb *phb = pe->phb; in pnv_ioda_free_pe_seg() local 2403 struct pnv_phb *phb = pe->phb; in pnv_ioda_release_pe_seg() local 2413 struct pnv_phb *phb = pe->phb; in pnv_ioda_release_pe() local [all …]
|
H A D | eeh-powernv.c | 207 if (phb->has_dbgfs || !phb->dbgfs) in pnv_eeh_post_init() 484 phb->freeze_pe(phb, pe->addr); in pnv_eeh_set_option() 501 return phb->unfreeze_pe(phb, pe->addr, opt); in pnv_eeh_set_option() 516 struct pnv_phb *phb = pe->phb->private_data; in pnv_eeh_get_phb_diag() local 528 struct pnv_phb *phb = pe->phb->private_data; in pnv_eeh_get_phb_state() local 567 struct pnv_phb *phb = pe->phb->private_data; in pnv_eeh_get_pe_state() local 592 fstate = phb->get_pe_state(phb, pe->addr); in pnv_eeh_get_pe_state() 655 phb->freeze_pe(phb, pe->addr); in pnv_eeh_get_pe_state() 1367 phb->freeze_pe(phb, pe_no); in pnv_eeh_get_pe() 1386 phb->freeze_pe(phb, dev_pe->addr); in pnv_eeh_get_pe() [all …]
|
H A D | pci-sriov.c | 156 mul = phb->ioda.total_pe_num; in pnv_pci_ioda_fixup_iov_resources() 287 struct pnv_phb *phb; in pnv_pci_vf_release_m64() local 290 phb = pci_bus_to_pnvhb(pdev->bus); in pnv_pci_vf_release_m64() 404 phb->ioda.m64_bar_idx + 1, 0); in pnv_pci_alloc_m64_bar() 418 struct pnv_phb *phb; in pnv_pci_vf_assign_m64() local 426 phb = pci_bus_to_pnvhb(pdev->bus); in pnv_pci_vf_assign_m64() 477 struct pnv_phb *phb; in pnv_ioda_release_vf_PE() local 616 struct pnv_phb *phb; in pnv_ioda_setup_vf_PE() local 637 pe->phb = phb; in pnv_ioda_setup_vf_PE() 678 struct pnv_phb *phb; in pnv_pci_sriov_enable() local [all …]
|
H A D | pci-cxl.c | 16 struct pnv_phb *phb = hose->private_data; in pnv_phb_to_cxl_mode() local 42 struct pnv_phb *phb = hose->private_data; in pnv_cxl_alloc_hwirqs() local 50 return phb->msi_base + hwirq; in pnv_cxl_alloc_hwirqs() 57 struct pnv_phb *phb = hose->private_data; in pnv_cxl_release_hwirqs() local 59 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq - phb->msi_base, num); in pnv_cxl_release_hwirqs() 67 struct pnv_phb *phb = hose->private_data; in pnv_cxl_release_hwirq_ranges() local 76 hwirq = irqs->offset[i] - phb->msi_base; in pnv_cxl_release_hwirq_ranges() 87 struct pnv_phb *phb = hose->private_data; in pnv_cxl_alloc_hwirq_ranges() local 104 irqs->offset[i] = phb->msi_base + hwirq; in pnv_cxl_alloc_hwirq_ranges() 125 return phb->msi_bmp.irq_count; in pnv_cxl_get_irq_count() [all …]
|
H A D | pci.c | 496 rc = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag_data, in pnv_pci_handle_eeh_config() 502 ret = phb->unfreeze_pe(phb, in pnv_pci_handle_eeh_config() 525 pnv_pci_dump_phb_diag_data(phb->hose, phb->diag_data); in pnv_pci_handle_eeh_config() 532 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_config_check_eeh() local 553 fstate = phb->get_pe_state(phb, pe_no); in pnv_pci_config_check_eeh() 579 phb->freeze_pe(phb, pe_no); in pnv_pci_config_check_eeh() 588 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_read() local 624 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_write() local 650 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_check() local 693 phb = pdn->phb->private_data; in pnv_pci_read_config() [all …]
|
H A D | pci.h | 57 struct pnv_phb *phb; member 126 int (*init_m64)(struct pnv_phb *phb); 127 int (*get_pe_state)(struct pnv_phb *phb, int pe_no); 128 void (*freeze_pe)(struct pnv_phb *phb, int pe_no); 129 int (*unfreeze_pe)(struct pnv_phb *phb, int pe_no, int opt); 196 return (r->start >= phb->ioda.m64_base && in pnv_pci_is_m64() 197 r->start < (phb->ioda.m64_base + phb->ioda.m64_size)); in pnv_pci_is_m64() 207 int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe); 208 int pnv_ioda_deconfigure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe); 213 struct pnv_ioda_pe *pnv_ioda_alloc_pe(struct pnv_phb *phb, int count); [all …]
|
/linux/drivers/misc/cxl/ |
H A D | vphb.c | 30 struct pci_controller *phb; in cxl_pci_enable_device_hook() local 84 return phb ? phb->private_data : NULL; in pci_bus_to_afu() 231 if (!phb) in cxl_pci_vphb_add() 235 phb->parent = parent; in cxl_pci_vphb_add() 239 phb->cfg_addr = NULL; in cxl_pci_vphb_add() 240 phb->cfg_data = NULL; in cxl_pci_vphb_add() 246 if (phb->bus == NULL) in cxl_pci_vphb_add() 252 (void *) phb); in cxl_pci_vphb_add() 263 afu->phb = phb; in cxl_pci_vphb_add() 276 phb = afu->phb; in cxl_pci_vphb_remove() [all …]
|
/linux/arch/powerpc/platforms/pseries/ |
H A D | pci_dlpar.c | 24 struct pci_controller *phb; in init_phb_dynamic() local 42 if (!phb) in init_phb_dynamic() 44 rtas_setup_phb(phb); in init_phb_dynamic() 48 pci_devs_phb_init_dynamic(phb); in init_phb_dynamic() 52 ppc_iommu_register_device(phb); in init_phb_dynamic() 55 eeh_phb_pe_create(phb); in init_phb_dynamic() 60 pcibios_scan_phb(phb); in init_phb_dynamic() 63 return phb; in init_phb_dynamic() 70 struct pci_bus *b = phb->bus; in remove_phb_dynamic() 85 res = &phb->io_resource; in remove_phb_dynamic() [all …]
|
H A D | eeh_pseries.c | 104 struct pci_controller *phb = pdn->phb; in pseries_eeh_get_pe_config_addr() local 114 BUID_LO(phb->buid), 1); in pseries_eeh_get_pe_config_addr() 121 BUID_LO(phb->buid), 0); in pseries_eeh_get_pe_config_addr() 134 BUID_LO(phb->buid), 0); in pseries_eeh_get_pe_config_addr() 206 BUID_LO(phb->buid)); in pseries_eeh_phb_configure_bridge() 434 pe.phb = pdn->phb; in pseries_eeh_init_edev() 563 BUID_LO(pe->phb->buid)); in pseries_eeh_get_state() 569 BUID_LO(pe->phb->buid)); in pseries_eeh_get_state() 645 BUID_HI(pe->phb->buid), BUID_LO(pe->phb->buid), in pseries_eeh_get_log() 706 buid = pdn->phb->buid; in pseries_send_allow_unfreeze() [all …]
|
H A D | msi.c | 40 buid = pdn->phb->buid; in rtas_change_msi() 101 buid = pdn->phb->buid; in rtas_query_irq_number() 617 if (!phb->fwnode) in __pseries_msi_allocate_domains() 621 phb->fwnode, in __pseries_msi_allocate_domains() 625 phb->dn, phb->global_number); in __pseries_msi_allocate_domains() 630 phb->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(phb->dn), in __pseries_msi_allocate_domains() 635 phb->dn, phb->global_number); in __pseries_msi_allocate_domains() 650 phb->dn, phb->global_number); in pseries_msi_allocate_domains() 659 if (phb->msi_domain) in pseries_msi_free_domains() 661 if (phb->dev_domain) in pseries_msi_free_domains() [all …]
|
H A D | iommu.c | 589 if (phb->dma_window_base_cur + phb->dma_window_size > SZ_2G) { in iommu_table_setparms() 594 node = phb->dn; in iommu_table_setparms() 603 iommu_table_setparms_common(tbl, phb->bus->number, 0, phb->dma_window_base_cur, in iommu_table_setparms() 610 phb->dma_window_base_cur += phb->dma_window_size; in iommu_table_setparms() 669 pci->phb->dma_window_size >>= 1; in pci_dma_bus_setup_pSeries() 671 pci->phb->dma_window_size); in pci_dma_bus_setup_pSeries() 696 pci->phb->dma_window_size >>= 1; in pci_dma_bus_setup_pSeries() 907 struct pci_controller *phb = PCI_DN(dn)->phb; in pci_dma_dev_setup_pSeries() local 1211 buid = pdn->phb->buid; in query_ddw() 1259 buid = pdn->phb->buid; in create_ddw() [all …]
|
/linux/arch/powerpc/kernel/ |
H A D | of_platform.c | 35 struct pci_controller *phb; in of_pci_phb_probe() local 45 if (!phb) in of_pci_phb_probe() 49 phb->parent = &dev->dev; in of_pci_phb_probe() 52 if (ppc_md.pci_setup_phb(phb)) { in of_pci_phb_probe() 53 pcibios_free_controller(phb); in of_pci_phb_probe() 61 pci_devs_phb_init_dynamic(phb); in of_pci_phb_probe() 64 eeh_phb_pe_create(phb); in of_pci_phb_probe() 67 pcibios_scan_phb(phb); in of_pci_phb_probe() 68 if (phb->bus == NULL) in of_pci_phb_probe() 75 pcibios_claim_one_bus(phb->bus); in of_pci_phb_probe() [all …]
|
H A D | msi.c | 14 struct pci_controller *phb = pci_bus_to_host(dev->bus); in arch_setup_msi_irqs() local 16 if (!phb->controller_ops.setup_msi_irqs || in arch_setup_msi_irqs() 17 !phb->controller_ops.teardown_msi_irqs) { in arch_setup_msi_irqs() 26 return phb->controller_ops.setup_msi_irqs(dev, nvec, type); in arch_setup_msi_irqs() 31 struct pci_controller *phb = pci_bus_to_host(dev->bus); in arch_teardown_msi_irqs() local 37 if (phb->controller_ops.teardown_msi_irqs) in arch_teardown_msi_irqs() 38 phb->controller_ops.teardown_msi_irqs(dev); in arch_teardown_msi_irqs()
|
H A D | rtas_pci.c | 63 buid = pdn->phb->buid; in rtas_pci_dn_read_config() 114 buid = pdn->phb->buid; in rtas_pci_dn_write_config() 206 if (of_address_to_resource(phb, 0, &r)) in get_phb_buid() 212 struct pci_controller *phb) in phb_set_bus_ranges() argument 222 phb->first_busno = be32_to_cpu(bus_range[0]); in phb_set_bus_ranges() 223 phb->last_busno = be32_to_cpu(bus_range[1]); in phb_set_bus_ranges() 228 int rtas_setup_phb(struct pci_controller *phb) in rtas_setup_phb() argument 230 struct device_node *dev = phb->dn; in rtas_setup_phb() 235 if (phb_set_bus_ranges(dev, phb)) in rtas_setup_phb() 238 phb->ops = &rtas_pci_ops; in rtas_setup_phb() [all …]
|
H A D | pci-hotplug.c | 43 if (!pdn || !pdn->phb || !pdn->phb->bus) in pci_find_bus_by_node() 46 return find_bus_among_children(pdn->phb->bus, dn); in pci_find_bus_by_node() 58 struct pci_controller *phb = pci_bus_to_host(dev->bus); in pcibios_release_device() local 61 if (phb->controller_ops.release_device) in pcibios_release_device() 62 phb->controller_ops.release_device(dev); in pcibios_release_device() 141 struct pci_controller *phb; in pci_hp_add_devices() local 144 phb = pci_bus_to_host(bus); in pci_hp_add_devices() 147 if (phb->controller_ops.probe_mode) in pci_hp_add_devices() 148 mode = phb->controller_ops.probe_mode(bus); in pci_hp_add_devices()
|
H A D | io-workarounds.c | 35 struct pci_controller *phb = bus->phb; in iowa_pci_find() local 38 vstart = (unsigned long)phb->io_base_virt; in iowa_pci_find() 39 vend = vstart + phb->pci_io_size - 1; in iowa_pci_find() 46 res = &phb->mem_resources[j]; in iowa_pci_find() 170 void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops, in iowa_register_bus() argument 174 struct device_node *np = phb->dn; in iowa_register_bus() 185 bus->phb = phb; in iowa_register_bus()
|
H A D | pci-common.c | 126 struct pci_controller *phb; in pcibios_alloc_controller() local 129 if (phb == NULL) in pcibios_alloc_controller() 138 phb->dn = of_node_get(dev); in pcibios_alloc_controller() 147 PHB_SET_NODE(phb, nid); in pcibios_alloc_controller() 150 return phb; in pcibios_alloc_controller() 161 of_node_put(phb->dn); in pcibios_free_controller() 162 list_del(&phb->list_node); in pcibios_free_controller() 165 if (phb->is_dynamic) in pcibios_free_controller() 166 kfree(phb); in pcibios_free_controller() 200 pr_debug("domain %d, dynamic %d\n", phb->global_number, phb->is_dynamic); in pcibios_free_controller_deferred() [all …]
|
H A D | pci_dn.c | 141 edev->controller = pdn->phb; in eeh_dev_init() 161 pdn->phb = parent->phb; in add_one_sriov_vf_pdn() 297 pdn->phb = hose; in pci_add_device_node_info() 369 pdev = pci_get_domain_bus_and_slot(pdn->phb->global_number, in pci_remove_device_node_info() 467 void pci_devs_phb_init_dynamic(struct pci_controller *phb) in pci_devs_phb_init_dynamic() argument 469 struct device_node *dn = phb->dn; in pci_devs_phb_init_dynamic() 473 pdn = pci_add_device_node_info(phb, dn); in pci_devs_phb_init_dynamic() 477 pdn->phb = phb; in pci_devs_phb_init_dynamic() 478 phb->pci_data = pdn; in pci_devs_phb_init_dynamic() 482 pci_traverse_device_nodes(dn, add_pdn, phb); in pci_devs_phb_init_dynamic()
|
H A D | eeh_pe.c | 47 static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type) in eeh_pe_alloc() argument 64 pe->phb = phb; in eeh_pe_alloc() 80 int eeh_phb_pe_create(struct pci_controller *phb) in eeh_phb_pe_create() argument 85 pe = eeh_pe_alloc(phb, EEH_PE_PHB); in eeh_phb_pe_create() 94 pr_debug("EEH: Add PE for PHB#%x\n", phb->global_number); in eeh_phb_pe_create() 158 struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb) in eeh_phb_pe_get() argument 168 if ((pe->type & EEH_PE_PHB) && pe->phb == phb) in eeh_phb_pe_get() 287 struct eeh_pe *eeh_pe_get(struct pci_controller *phb, int pe_no) in eeh_pe_get() argument 289 struct eeh_pe *root = eeh_phb_pe_get(phb); in eeh_pe_get() 855 return pe->phb->bus; in eeh_pe_bus_get()
|
/linux/drivers/pci/hotplug/ |
H A D | rpadlpar_core.c | 141 struct pci_controller *phb = pdn->phb; in dlpar_pci_add_bus() local 166 pcibios_finish_adding_to_bus(phb->bus); in dlpar_pci_add_bus() 172 struct pci_controller *phb; in dlpar_add_pci_slot() local 181 phb = PCI_DN(dn)->phb; in dlpar_add_pci_slot() 223 BUG_ON(!pdn || !pdn->phb); in dlpar_remove_phb() 224 rc = remove_phb_dynamic(pdn->phb); in dlpar_remove_phb() 228 pdn->phb = NULL; in dlpar_remove_phb() 235 struct pci_controller *phb; in dlpar_add_phb() local 237 if (PCI_DN(dn) && PCI_DN(dn)->phb) { in dlpar_add_phb() 242 phb = init_phb_dynamic(dn); in dlpar_add_phb() [all …]
|
/linux/arch/powerpc/include/asm/ |
H A D | ppc-pci.h | 31 extern void pci_devs_phb_init_dynamic(struct pci_controller *phb); 35 extern void ppc_iommu_register_device(struct pci_controller *phb); 36 extern void ppc_iommu_unregister_device(struct pci_controller *phb); 38 static inline void ppc_iommu_register_device(struct pci_controller *phb) { } in ppc_iommu_register_device() argument 39 static inline void ppc_iommu_unregister_device(struct pci_controller *phb) { } in ppc_iommu_unregister_device() argument 46 extern int rtas_setup_phb(struct pci_controller *phb);
|
/linux/arch/powerpc/platforms/pasemi/ |
H A D | msi.c | 137 struct pci_controller *phb; in mpic_pasemi_msi_init() local 155 list_for_each_entry(phb, &hose_list, list_node) { in mpic_pasemi_msi_init() 156 WARN_ON(phb->controller_ops.setup_msi_irqs); in mpic_pasemi_msi_init() 157 phb->controller_ops.setup_msi_irqs = pasemi_msi_setup_msi_irqs; in mpic_pasemi_msi_init() 158 phb->controller_ops.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs; in mpic_pasemi_msi_init()
|
/linux/arch/powerpc/platforms/cell/ |
H A D | spider-pci.c | 68 static int __init spiderpci_pci_setup_chip(struct pci_controller *phb, in spiderpci_pci_setup_chip() argument 98 dummy_page_da = dma_map_single(phb->parent, dummy_page_va, in spiderpci_pci_setup_chip() 100 if (dma_mapping_error(phb->parent, dummy_page_da)) { in spiderpci_pci_setup_chip() 115 struct device_node *np = bus->phb->dn; in spiderpci_iowa_init() 142 if (spiderpci_pci_setup_chip(bus->phb, regs)) in spiderpci_iowa_init()
|
H A D | setup.c | 116 static int cell_setup_phb(struct pci_controller *phb) in cell_setup_phb() argument 121 int rc = rtas_setup_phb(phb); in cell_setup_phb() 125 phb->controller_ops = cell_pci_controller_ops; in cell_setup_phb() 127 np = phb->dn; in cell_setup_phb() 136 iowa_register_bus(phb, &spiderpci_ops, &spiderpci_iowa_init, in cell_setup_phb()
|
/linux/arch/powerpc/sysdev/ |
H A D | mpic_u3msi.c | 176 struct pci_controller *phb; in mpic_u3msi_init() local 189 list_for_each_entry(phb, &hose_list, list_node) { in mpic_u3msi_init() 190 WARN_ON(phb->controller_ops.setup_msi_irqs); in mpic_u3msi_init() 191 phb->controller_ops.setup_msi_irqs = u3msi_setup_msi_irqs; in mpic_u3msi_init() 192 phb->controller_ops.teardown_msi_irqs = u3msi_teardown_msi_irqs; in mpic_u3msi_init()
|