[Skiboot] [PATCH] capi: Enable channel tag streaming for PHB in CAPP mode

Vaibhav Jain vaibhav at linux.vnet.ibm.com
Wed Jan 31 17:52:28 AEDT 2018

We re-enable channel tag streaming for PHB in CAPP mode as without it
PEC was waiting for cresp for each DMA write command before sending a
new DMA write command on the Powerbus. This resulted in much lower DMA
write performance than expected.

The patch updates enable_capi_mode() to remove the masking of
channel_streaming_en bit in PBCQ Hardware Configuration Register. Also
does some re-factoring of the code that updates this register to use
xscom_write_mask instead of xscom_read followed by a xscom_write.

Cc: stable
Signed-off-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
 hw/phb4.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index ff912e1f..4906caf4 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3793,14 +3793,10 @@ static int64_t enable_capi_mode(struct phb4 *p, uint64_t pe_number,
 	reg |= dma_eng;
 	xscom_write(p->chip_id, p->pe_xscom + XPEC_NEST_CAPP_CNTL, reg);
-	/* PCI to PB data movement ignores the PB init signal.
-	 * Disable streaming.
-	 */
-	xscom_read(p->chip_id, p->pe_xscom + XPEC_NEST_PBCQ_HW_CONFIG, &reg);
-	if (p->index == CAPP0_PHB_INDEX)
-	xscom_write(p->chip_id, p->pe_xscom + XPEC_NEST_PBCQ_HW_CONFIG, reg);
+	/* PCI to PB data movement ignores the PB init signal. */
+	xscom_write_mask(p->chip_id, p->pe_xscom + XPEC_NEST_PBCQ_HW_CONFIG,
 	/* PEC Phase 4 (PHB) registers adjustment
 	 * Inbound CAPP traffic: The CAPI can send both CAPP packets and

More information about the Skiboot mailing list