From patchwork Wed Feb 14 21:46:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wajdeczko X-Patchwork-Id: 201138 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:9f94:b0:17a:e0d6:c84d with SMTP id fy20csp125976rwb; Wed, 14 Feb 2024 13:48:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX3QI2RRbZXtOeIPLzgx25Idmqqnoux8qBbSVjh9AGk0pxLcOro0B2Y+zwmwiX4wPY13LWm0c7bH5gmZy6DZWWpQvStWA== X-Google-Smtp-Source: AGHT+IGlfGpB+EMCWPf9FjhPItoatEI/UWzJAl+PJM6Ch5E7C2qYXFGHFTZBt1Olg5kcGIs15zhr X-Received: by 2002:a0c:e213:0:b0:68c:9db6:e178 with SMTP id q19-20020a0ce213000000b0068c9db6e178mr3724340qvl.39.1707947280225; Wed, 14 Feb 2024 13:48:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707947280; cv=pass; d=google.com; s=arc-20160816; b=04r8M1fWtrzWODWG4NjjT8xv/EaRaIts225ZQ/0HkEKhAG6Cn8BU1Cbna+qQMyQx8J 7/dO3NyJsE4J1rG8s7BHRUZXg1DP6P0hEIn+K2gmmHqUQt3lWgQAoVUnJ2mkGo9v/7ji M97TTTOZfUQFuARMLTZL+vcEcvv2QdDViE8jUElfxkYt7lSeqEAyms57e0XyFG0LAh6p hZv6mCYojbFD0RvGmDIdaeemmLT8O6IqzPW8QUv74+AongphlPOguuS2tP0h33Q5BSKu ZyH5fCu/lRycdmhKHN3CTKapjd+IIrfYGARQ7h1tBLI8FPwGT8MJwNVmRWI5I8A40a9I LFgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=D/r2LybBzCemI4WieWJRY/FXFKx8dcGmNQ7hfyHCeHM=; fh=u+BsW6vFV0ByePZY5GI0ayK65q/zmLCURI9EwMUbv+w=; b=UTDs6wi78YRw88I2Ic6yCnMaEtfvVD1eYRAOCOeCPBAl5xU5dGOhD2WPWfe1BdD+7h jPNaNySk2XLM5YGoQjYJ697xPmcfqFGvT6UvJllscIDKoVh0/ckz9A/PLyz27D4RYQqO enwrdYDrNT9PgkdKozVt1Fp8oQMMsyKRWwSanuyPOfennyexVKgUzMlldpq9nWxYrH1E yHQcw9p58U69woJ/OaPJ9CxqWlSZ/GI27MXT/4wixUEFQu3pJmwiOK+9Xu2QCObt0kaD Q5YPhZGhXDWTASX0HyzOJza36vhlBGRbvimn7s3FBKpmESowp47VJCJFRGv2A95H0/is rPhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gw98g07M; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66007-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66007-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUzjrrWKelVae4flJGy1185bIvDo5/c0/RwUIEhRFGjKnfhOLw334ivCW9h+0Hw2mmCWddl+v0iN1aPfiyDAF7xkSaaQQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v16-20020a0ccd90000000b0068f02efccc1si1832934qvm.226.2024.02.14.13.48.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 13:48:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66007-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gw98g07M; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66007-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66007-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0CBA61C21C2C for ; Wed, 14 Feb 2024 21:48:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70A271419A2; Wed, 14 Feb 2024 21:47:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Gw98g07M" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DA17612EB for ; Wed, 14 Feb 2024 21:47:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707947252; cv=none; b=D2gvaoUmtVC6+dEWqG+8D81TTbBC+lFwV8D9+GwaN3ccZ3bcZY+3G1SJ3ITuZmLLWwHs7UP13coT8qaNJBMTxeF/qj4cDbAweUkdeANXWEK7Fg/w+JVjDjz9JrszqNEDywejr1hH2SRDQIAVRIBzxtbM9D+b2FQfErbyODqGcSk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707947252; c=relaxed/simple; bh=6XaV0/TrdVyOdwiVu+94yfFg+0tQa+h6v1Ux4vv2N3w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aOUL7futdD2Jw+YQE8DzlArNNrFt55IsLIzAvEDUHz7VQiW3Ekb8Vfcz8zjtwKGNpun9FX3+KlfVdWVOg9IK9qSLFy5BX8U0rcKDnJaPGB/MTYCOtOnDQoIdsNEG84X3u+vP3LjYxjkFUyNGLfP6+twtcxI3kmwdAalI8Ep+x5Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Gw98g07M; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707947251; x=1739483251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6XaV0/TrdVyOdwiVu+94yfFg+0tQa+h6v1Ux4vv2N3w=; b=Gw98g07MPycTgnYDkympml7BZlgAGj2DEj7Q53oT+okd+ZCtct6S21/E 48DbOpMlS/89z31qIg90bunp9ayoJt6WNTHllZuXOOX9knv/cs7NKLM2v zgTi2yLcdifmRBN1dH7bWMsATXLmrFcrh540Ca66PpYkVzP1MNTpfCq0U HpzN+wvTRPB2Uqbfy5iBG/h7/JKXBn2l/WAbc8o+sJGU/HYVUhQazDd4E 993SETIVp5SVOQgnCMQBX3IW5xcMvyphG0yph03j2pnYSI0OCN8kBMfSU TkrRbhV19IYrod4QvyunkItqQHHFUlfieLcZmJw6HBpLf4nn04ACNoIT2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="1895080" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="1895080" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 13:47:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="7932111" Received: from mwajdecz-mobl.ger.corp.intel.com ([10.249.138.241]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 13:47:29 -0800 From: Michal Wajdeczko To: linux-kernel@vger.kernel.org Cc: Michal Wajdeczko , Rodrigo Vivi , Jani Nikula Subject: [PATCH 2/2] drm/xe: Prefer make_u64_from_u32() over local macro Date: Wed, 14 Feb 2024 22:46:54 +0100 Message-Id: <20240214214654.1700-2-michal.wajdeczko@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20240214214654.1700-1-michal.wajdeczko@intel.com> References: <20240214214654.1700-1-michal.wajdeczko@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790912527318704251 X-GMAIL-MSGID: 1790912527318704251 Stop using private make_u64() macro if there is a generic one. Signed-off-by: Michal Wajdeczko --- Cc: Rodrigo Vivi Cc: Jani Nikula --- 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 #include +#include #include #include @@ -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;