mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: linux-kernel@vger.kernel.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH 2/2] drm/xe: Prefer make_u64_from_u32() over local macro
Date: Wed, 14 Feb 2024 22:46:54 +0100	[thread overview]
Message-ID: <20240214214654.1700-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240214214654.1700-1-michal.wajdeczko@intel.com>

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(-)

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


  reply	other threads:[~2024-02-14 21:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 21:46 [PATCH 1/2] wordpart.h: Helpers for making u16/u32/u64 values Michal Wajdeczko
2024-02-14 21:46 ` Michal Wajdeczko [this message]
2024-02-14 22:09 ` Kees Cook
2024-02-15 20:40   ` Michal Wajdeczko
2024-02-15 22:47     ` Kees Cook
2024-03-26 17:58       ` Michal Wajdeczko
2024-04-08 13:24         ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240214214654.1700-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®