[Skiboot] [PATCH v2 14/17] xive/p9: introduce NVT_SHIFT

Cédric Le Goater clg at kaod.org
Fri Sep 13 03:22:15 AEST 2019


This defines the size of our VP space.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 hw/xive.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/xive.c b/hw/xive.c
index 6572a45f57be..8c92a612a5fa 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -189,7 +189,10 @@
  *
  * XXX Adjust that based on BAR value ?
  */
-#define MAX_VP_ORDER		19	/* 512k */
+
+#define NVT_SHIFT		19	/* in sync with EQ_W6_NVT_INDEX */
+
+#define MAX_VP_ORDER		NVT_SHIFT /* 512k */
 #define MAX_VP_COUNT		(1ul << MAX_VP_ORDER)
 #define VP_PER_PAGE		(0x10000 / 64) // Use sizeof ?
 #define IND_VP_TABLE_SIZE	((MAX_VP_COUNT / VP_PER_PAGE) * 8)
@@ -4042,7 +4045,7 @@ static int64_t opal_xive_get_vp_info(uint64_t vp_id,
 	}
 
 	if (out_cam_value)
-		*out_cam_value = (blk << 19) | idx;
+		*out_cam_value = (blk << NVT_SHIFT) | idx;
 
 	if (out_report_cl_pair) {
 		*out_report_cl_pair = ((uint64_t)(vp->w6 & 0x0fffffff)) << 32;
-- 
2.21.0



More information about the Skiboot mailing list