diff mbox series

[15/22] xive/p9: introduce NVT_SHIFT

Message ID 20190903170413.4373-16-clg@kaod.org
State Superseded
Headers show
Series xive: new interfaces, fixes and cleanups in a new driver | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (7b12d5489fcfd73ef7ec0cb27eff7f8a5f13b238)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Cédric Le Goater Sept. 3, 2019, 5:04 p.m. UTC
This defines the size of our VP space.

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

Patch

diff --git a/hw/xive-p9.c b/hw/xive-p9.c
index a4d0916e6c2e..d61df6a5e973 100644
--- a/hw/xive-p9.c
+++ b/hw/xive-p9.c
@@ -197,7 +197,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)
@@ -4055,7 +4058,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;