[Skiboot] [PATCH] hw/phb3: Increase AIB TX command credit for DMA read in CAPP DMA mode
Andrew Donnellan
andrew.donnellan at au1.ibm.com
Thu Jul 7 17:22:11 AEST 2016
When enabling CAPI in DMA mode, set the AIB TX command credits for channel
2 (DMA read) to 28, rather than 1. This significantly improves DMA read
performance in CAPI DMA mode.
Fixes: 5477148a439f ("phb3: Add support for CAPP DMA mode")
Reported-by: John Walthour <jwalthour at us.ibm.com>
Reported-by: Ricardo Mata <ricmata at us.ibm.com>
Reported-by: Michael Perez <perezma at us.ibm.com>
Cc: Ian Munsie <imunsie at au1.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
---
hw/phb3.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/phb3.c b/hw/phb3.c
index 905fdf4..153eb64 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -3352,8 +3352,17 @@ static int64_t enable_capi_mode(struct phb3 *p, uint64_t pe_number, bool dma_mod
/* aib tx cmd cred */
xscom_read(p->chip_id, p->pci_xscom + 0xd, ®);
- reg &= ~PPC_BITMASK(42,46);
- reg |= PPC_BIT(47);
+ if (dma_mode) {
+ /*
+ * In DMA mode, increase AIB credit value for ch 2 (DMA read)
+ * for performance reasons
+ */
+ reg &= ~PPC_BITMASK(42, 47);
+ reg |= PPC_BITMASK(43, 45);
+ } else {
+ reg &= ~PPC_BITMASK(42, 46);
+ reg |= PPC_BIT(47);
+ }
xscom_write(p->chip_id, p->pci_xscom + 0xd, reg);
xscom_write(p->chip_id, p->pci_xscom + 0xc, 0xff00000000000000ull);
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com IBM Australia Limited
More information about the Skiboot
mailing list