aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-09-02 15:07:07 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-02 15:14:46 +1000
commit71660c407a0dbebc8ee9a818bf0d69dd7f1aefb3 (patch)
tree864fd2a5190334c3984b3fe0a98d4828b8478698 /hw/phb3.c
parent6f59b4960c5a391c247585cbbb99a2210f84b7b3 (diff)
parent147f3e45efb26152a53acecef15ea7096e3ff9db (diff)
downloadskiboot-71660c407a0dbebc8ee9a818bf0d69dd7f1aefb3.zip
skiboot-71660c407a0dbebc8ee9a818bf0d69dd7f1aefb3.tar.gz
skiboot-71660c407a0dbebc8ee9a818bf0d69dd7f1aefb3.tar.bz2
Merge branch 'update-2.1.1.1'
merge in CAPI fixes from Ian and Daniel
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 134fc62..5fd0130 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -1037,7 +1037,7 @@ static int64_t phb3_map_pe_dma_window_real(struct phb *phb,
static void phb3_pci_msi_check_q(struct phb3 *p, uint32_t ive_num)
{
- uint64_t ive, ivc, ffi;
+ uint64_t ive, ivc, ffi, state;
uint8_t *q_byte;
/* Each IVE has 16-bytes or 128-bytes */
@@ -1061,9 +1061,13 @@ static void phb3_pci_msi_check_q(struct phb3 *p, uint32_t ive_num)
}
/* Lock FFI and send interrupt */
- while (in_be64(p->regs + PHB_FFI_LOCK))
- /* XXX Handle fences ! */
- ;
+ while (1) {
+ state = in_be64(p->regs + PHB_FFI_LOCK);
+ if (!state)
+ break;
+ if (state == ~0ULL) /* PHB Fenced */
+ return;
+ }
/* Clear Q bit and update IVC */
*q_byte = 0;
@@ -3272,7 +3276,7 @@ static int64_t phb3_set_capi_mode(struct phb *phb, uint64_t mode,
xscom_read(p->chip_id, 0x9013c03, &reg);
if (reg & PPC_BIT(0)) {
- PHBDBG(p, "CAPP: Already in CAPP mode\n");
+ PHBDBG(p, "Already in CAPP mode\n");
}
/* poll cqstat */