aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-08-04 12:51:25 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-06 12:29:25 +0530
commit62e050f2d9c6fefc52166e2e2e1df462893dbe63 (patch)
treec9fe74f6fbfa33961118a78dedc8ede497bf4604 /hw
parent7f92751f688e364fd3f1e0b2f193ca0563f5c995 (diff)
downloadskiboot-62e050f2d9c6fefc52166e2e2e1df462893dbe63.zip
skiboot-62e050f2d9c6fefc52166e2e2e1df462893dbe63.tar.gz
skiboot-62e050f2d9c6fefc52166e2e2e1df462893dbe63.tar.bz2
xive/p10: Change alignment of the queue overflow pages
The Memory Coherence Directory uses 16M "granule" to track shared copies of a cache line. If any cache line within the 16M range gets touched by someone outside of the group, the MCD forces accesses to any cache line within the range to include everyone that might have a shared copy. Allocate the queue overflow pages and use a 16M alignment to avoid sharing with other structures and reduce traffic on the PowerBus. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xive2.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/hw/xive2.c b/hw/xive2.c
index 2e4e75c..05c5273 100644
--- a/hw/xive2.c
+++ b/hw/xive2.c
@@ -1491,6 +1491,8 @@ static bool xive_configure_bars(struct xive *x)
xive_dbg(x, "NVP: %14p [0x%012llx]\n", x->nvp_base, x->nvp_size);
xive_dbg(x, "ESB: %14p [0x%012llx]\n", x->esb_base, x->esb_size);
xive_dbg(x, "END: %14p [0x%012llx]\n", x->end_base, x->end_size);
+ xive_dbg(x, "OVF: %14p [0x%012x]\n", x->q_ovf,
+ VC_QUEUE_COUNT * PAGE_SIZE);
return true;
}
@@ -1897,8 +1899,22 @@ static bool xive_prealloc_tables(struct xive *x)
return false;
}
- /* Allocate the queue overflow pages */
- x->q_ovf = local_alloc(x->chip_id, VC_QUEUE_COUNT * PAGE_SIZE, PAGE_SIZE);
+ /*
+ * The Memory Coherence Directory uses 16M "granule" to track
+ * shared copies of a cache line. If any cache line within the
+ * 16M range gets touched by someone outside of the group, the
+ * MCD forces accesses to any cache line within the range to
+ * include everyone that might have a shared copy.
+ */
+#define QUEUE_OVF_ALIGN (16 << 20) /* MCD granule size */
+
+ /*
+ * Allocate the queue overflow pages and use a 16M alignment
+ * to avoid sharing with other structures and reduce traffic
+ * on the PowerBus.
+ */
+ x->q_ovf = local_alloc(x->chip_id, VC_QUEUE_COUNT * PAGE_SIZE,
+ QUEUE_OVF_ALIGN);
if (!x->q_ovf) {
xive_err(x, "Failed to allocate queue overflow\n");
return false;