[Skiboot] [PATCH 2/2] phb4: Disable nodal scoped DMA accesses when PB pump mode is enabled
Alistair Popple
alistair at popple.id.au
Tue Jul 17 13:34:26 AEST 2018
When pump mode is enabled on the PowerBus each chip is in a different group
rather than a different node so disable nodal broadcasts when pump mode is
enabled. This provides a performance boost on some systems, particularly
those utilising GPU direct with NVLink2.
Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
hw/phb4.c | 11 +++++++++++
include/phb4-regs.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/hw/phb4.c b/hw/phb4.c
index 7f188684..8ba3eb78 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3983,6 +3983,17 @@ static int64_t enable_capi_mode(struct phb4 *p, uint64_t pe_number,
XPEC_NEST_PBCQ_HW_CONFIG_PBINIT,
XPEC_NEST_PBCQ_HW_CONFIG_PBINIT);
+ /* If pump mode is enabled don't do nodal broadcasts.
+ */
+ xscom_read(p->chip_id, PB_CENT_HP_MODE_CURR, ®);
+ if (reg & PB_CFG_PUMP_MODE) {
+ reg = XPEC_NEST_PBCQ_HW_CONFIG_DIS_NODAL;
+ reg |= XPEC_NEST_PBCQ_HW_CONFIG_DIS_RNNN;
+ xscom_write_mask(p->chip_id,
+ p->pe_xscom + XPEC_NEST_PBCQ_HW_CONFIG,
+ reg, reg);
+ }
+
/* PEC Phase 4 (PHB) registers adjustment
* Inbound CAPP traffic: The CAPI can send both CAPP packets and
* I/O packets. A PCIe packet is indentified as a CAPP packet in
diff --git a/include/phb4-regs.h b/include/phb4-regs.h
index e7a190ee..d7b551f3 100644
--- a/include/phb4-regs.h
+++ b/include/phb4-regs.h
@@ -344,6 +344,8 @@
#define XPEC_NEST_PBCQ_HW_CONFIG 0x0
#define XPEC_NEST_PBCQ_HW_CONFIG_PBINIT PPC_BIT(12)
#define XPEC_NEST_PBCQ_HW_CONFIG_CH_STR PPC_BIT(33)
+#define XPEC_NEST_PBCQ_HW_CONFIG_DIS_NODAL PPC_BIT(50)
+#define XPEC_NEST_PBCQ_HW_CONFIG_DIS_RNNN PPC_BIT(52)
#define XPEC_NEST_CAPP_CNTL 0x7
/* Nest base per-stack registers */
--
2.11.0
More information about the Skiboot
mailing list