[17/22] xive/p9: use predefined bitmasks to manipulate EQ addresses
diff mbox series

Message ID 20190903170413.4373-18-clg@kaod.org
State New
Headers show
Series
  • xive: new interfaces, fixes and cleanups in a new driver
Related show

Checks

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

Commit Message

Cédric Le Goater Sept. 3, 2019, 5:04 p.m. UTC
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/xive-p9.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/hw/xive-p9.c b/hw/xive-p9.c
index dd923c51eda9..1c4cd400bb3d 100644
--- a/hw/xive-p9.c
+++ b/hw/xive-p9.c
@@ -3763,7 +3763,7 @@  static int64_t opal_xive_get_queue_info(uint64_t vp, uint32_t prio,
 	if (out_qpage) {
 		if (eq->w0 & EQ_W0_ENQUEUE)
 			*out_qpage =
-				(((uint64_t)(eq->w2 & 0x0fffffff)) << 32) | eq->w3;
+				(((uint64_t)(eq->w2 & EQ_W2_OP_DESC_HI)) << 32) | eq->w3;
 		else
 			*out_qpage = 0;
 	}
@@ -3848,8 +3848,8 @@  static int64_t opal_xive_set_queue_info(uint64_t vp, uint32_t prio,
 		case 16:
 		case 21:
 		case 24:
-			eq.w3 = ((uint64_t)qpage) & 0xffffffff;
-			eq.w2 = (((uint64_t)qpage)) >> 32 & 0x0fffffff;
+			eq.w3 = ((uint64_t)qpage) & EQ_W3_OP_DESC_LO;
+			eq.w2 = (((uint64_t)qpage) >> 32) & EQ_W2_OP_DESC_HI;
 			eq.w0 |= EQ_W0_ENQUEUE;
 			eq.w0 = SETFIELD(EQ_W0_QSIZE, eq.w0, qsize - 12);
 			break;