lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 14 Feb 2024 22:46:54 +0100
From: Michal Wajdeczko <michal.wajdeczko@...el.com>
To: linux-kernel@...r.kernel.org
Cc: Michal Wajdeczko <michal.wajdeczko@...el.com>,
	Rodrigo Vivi <rodrigo.vivi@...el.com>,
	Jani Nikula <jani.nikula@...el.com>
Subject: [PATCH 2/2] drm/xe: Prefer make_u64_from_u32() over local macro

Stop using private make_u64() macro if there is a generic one.

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

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;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ