[2/2] drm/xe: Prefer make_u64_from_u32() over local macro

Message ID 20240214214654.1700-2-michal.wajdeczko@intel.com
State New
Headers
Series [1/2] wordpart.h: Helpers for making u16/u32/u64 values |

Commit Message

Michal Wajdeczko Feb. 14, 2024, 9:46 p.m. UTC
  Stop using private make_u64() macro if there is a generic one.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/xe/xe_gt_pagefault.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
index 59a70d2e0a7a..ac90eda39ceb 100644
--- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
+++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
@@ -7,6 +7,7 @@ 
 
 #include <linux/bitfield.h>
 #include <linux/circ_buf.h>
+#include <linux/wordpart.h>
 
 #include <drm/drm_exec.h>
 #include <drm/drm_managed.h>
@@ -549,8 +550,6 @@  static int handle_acc(struct xe_gt *gt, struct acc *acc)
 	return ret;
 }
 
-#define make_u64(hi__, low__)  ((u64)(hi__) << 32 | (u64)(low__))
-
 #define ACC_MSG_LEN_DW        4
 
 static bool get_acc(struct acc_queue *acc_queue, struct acc *acc)
@@ -571,8 +570,8 @@  static bool get_acc(struct acc_queue *acc_queue, struct acc *acc)
 		acc->asid =  FIELD_GET(ACC_ASID, desc->dw1);
 		acc->vfid =  FIELD_GET(ACC_VFID, desc->dw2);
 		acc->access_type = FIELD_GET(ACC_TYPE, desc->dw0);
-		acc->va_range_base = make_u64(desc->dw3 & ACC_VIRTUAL_ADDR_RANGE_HI,
-					      desc->dw2 & ACC_VIRTUAL_ADDR_RANGE_LO);
+		acc->va_range_base = make_u64_from_u32(desc->dw3 & ACC_VIRTUAL_ADDR_RANGE_HI,
+						       desc->dw2 & ACC_VIRTUAL_ADDR_RANGE_LO);
 
 		acc_queue->head = (acc_queue->head + ACC_MSG_LEN_DW) %
 				  ACC_QUEUE_NUM_DW;