diff options
author | Andrew Donnellan <andrew.donnellan@au1.ibm.com> | 2016-07-07 17:22:11 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-25 12:04:24 +1000 |
commit | 9484d469fa9da4eb8089d82aa2c112c73e0cf50b (patch) | |
tree | 6cd4e8ffffb50810504dfe70097f3d8c97c6f069 /hw | |
parent | adf9e624585547f32fcf111c9a8008544fcc77c1 (diff) | |
download | talos-skiboot-9484d469fa9da4eb8089d82aa2c112c73e0cf50b.tar.gz talos-skiboot-9484d469fa9da4eb8089d82aa2c112c73e0cf50b.zip |
hw/phb3: Increase AIB TX command credit for DMA read in CAPP DMA mode
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@us.ibm.com>
Reported-by: Ricardo Mata <ricmata@us.ibm.com>
Reported-by: Michael Perez <perezma@us.ibm.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/phb3.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3344,8 +3344,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); |