Lines Matching refs:phb

51 	struct pnv_phb *phb = hose->private_data;  in pnv_setup_msi_irqs()  local
58 if (WARN_ON(!phb) || !phb->msi_bmp.bitmap) in pnv_setup_msi_irqs()
61 if (pdev->no_64bit_msi && !phb->msi32_support) in pnv_setup_msi_irqs()
65 if (!entry->msi_attrib.is_64 && !phb->msi32_support) { in pnv_setup_msi_irqs()
70 hwirq = msi_bitmap_alloc_hwirqs(&phb->msi_bmp, 1); in pnv_setup_msi_irqs()
76 virq = irq_create_mapping(NULL, phb->msi_base + hwirq); in pnv_setup_msi_irqs()
80 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1); in pnv_setup_msi_irqs()
83 rc = phb->msi_setup(phb, pdev, phb->msi_base + hwirq, in pnv_setup_msi_irqs()
88 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1); in pnv_setup_msi_irqs()
100 struct pnv_phb *phb = hose->private_data; in pnv_teardown_msi_irqs() local
104 if (WARN_ON(!phb)) in pnv_teardown_msi_irqs()
113 msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq - phb->msi_base, 1); in pnv_teardown_msi_irqs()
328 static void pnv_pci_handle_eeh_config(struct pnv_phb *phb, u32 pe_no) in pnv_pci_handle_eeh_config() argument
333 spin_lock_irqsave(&phb->lock, flags); in pnv_pci_handle_eeh_config()
336 rc = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag.blob, in pnv_pci_handle_eeh_config()
341 if (phb->unfreeze_pe) { in pnv_pci_handle_eeh_config()
342 ret = phb->unfreeze_pe(phb, in pnv_pci_handle_eeh_config()
346 rc = opal_pci_eeh_freeze_clear(phb->opal_id, in pnv_pci_handle_eeh_config()
352 __func__, rc, phb->hose->global_number, in pnv_pci_handle_eeh_config()
365 pnv_pci_dump_phb_diag_data(phb->hose, phb->diag.blob); in pnv_pci_handle_eeh_config()
367 spin_unlock_irqrestore(&phb->lock, flags); in pnv_pci_handle_eeh_config()
372 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_config_check_eeh() local
385 if (phb->type == PNV_PHB_P5IOC2) in pnv_pci_config_check_eeh()
388 pe_no = phb->ioda.reserved_pe; in pnv_pci_config_check_eeh()
395 if (phb->get_pe_state) { in pnv_pci_config_check_eeh()
396 fstate = phb->get_pe_state(phb, pe_no); in pnv_pci_config_check_eeh()
398 rc = opal_pci_eeh_freeze_status(phb->opal_id, in pnv_pci_config_check_eeh()
405 __func__, rc, phb->hose->global_number, pe_no); in pnv_pci_config_check_eeh()
421 if (phb->freeze_pe) in pnv_pci_config_check_eeh()
422 phb->freeze_pe(phb, pe_no); in pnv_pci_config_check_eeh()
424 pnv_pci_handle_eeh_config(phb, pe_no); in pnv_pci_config_check_eeh()
431 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_read() local
438 rc = opal_pci_config_read_byte(phb->opal_id, bdfn, where, &v8); in pnv_pci_cfg_read()
444 rc = opal_pci_config_read_half_word(phb->opal_id, bdfn, where, in pnv_pci_cfg_read()
451 rc = opal_pci_config_read_word(phb->opal_id, bdfn, where, &v32); in pnv_pci_cfg_read()
467 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_write() local
474 opal_pci_config_write_byte(phb->opal_id, bdfn, where, val); in pnv_pci_cfg_write()
477 opal_pci_config_write_half_word(phb->opal_id, bdfn, where, val); in pnv_pci_cfg_write()
480 opal_pci_config_write_word(phb->opal_id, bdfn, where, val); in pnv_pci_cfg_write()
493 struct pnv_phb *phb = pdn->phb->private_data; in pnv_pci_cfg_check() local
496 if (!(phb->flags & PNV_PHB_FLAG_EEH)) in pnv_pci_cfg_check()
524 struct pnv_phb *phb; in pnv_pci_read_config() local
536 phb = pdn->phb->private_data; in pnv_pci_read_config()
537 if (phb->flags & PNV_PHB_FLAG_EEH && pdn->edev) { in pnv_pci_read_config()
553 struct pnv_phb *phb; in pnv_pci_write_config() local
564 phb = pdn->phb->private_data; in pnv_pci_write_config()
565 if (!(phb->flags & PNV_PHB_FLAG_EEH)) in pnv_pci_write_config()
669 struct pnv_phb *phb = hose->private_data; in pnv_pci_dma_dev_setup() local
678 list_for_each_entry(pe, &phb->ioda.pe_list, list) { in pnv_pci_dma_dev_setup()
689 if (phb && phb->dma_dev_setup) in pnv_pci_dma_dev_setup()
690 phb->dma_dev_setup(phb, pdev); in pnv_pci_dma_dev_setup()
696 struct pnv_phb *phb = hose->private_data; in pnv_pci_dma_set_mask() local
698 if (phb && phb->dma_set_mask) in pnv_pci_dma_set_mask()
699 return phb->dma_set_mask(phb, pdev, dma_mask); in pnv_pci_dma_set_mask()
706 struct pnv_phb *phb = hose->private_data; in pnv_pci_dma_get_required_mask() local
708 if (phb && phb->dma_get_required_mask) in pnv_pci_dma_get_required_mask()
709 return phb->dma_get_required_mask(phb, pdev); in pnv_pci_dma_get_required_mask()
719 struct pnv_phb *phb = hose->private_data; in pnv_pci_shutdown() local
721 if (phb && phb->shutdown) in pnv_pci_shutdown()
722 phb->shutdown(phb); in pnv_pci_shutdown()