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] [day] [month] [year] [list]
Message-ID: <cde2ba78716ae4903f9893f018796c79554bb168.camel@linux.intel.com>
Date: Wed, 28 Feb 2024 15:44:14 +0100
From: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
To: Arnd Bergmann <arnd@...nel.org>, Lucas De Marchi
 <lucas.demarchi@...el.com>,  Oded Gabbay <ogabbay@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Maarten Lankhorst
 <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
 Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
 Daniel Vetter <daniel@...ll.ch>, Rodrigo Vivi <rodrigo.vivi@...el.com>,
 Matt Roper <matthew.d.roper@...el.com>, Matthew Auld
 <matthew.auld@...el.com>, Matthew Brost <matthew.brost@...el.com>, Michal
 Wajdeczko <michal.wajdeczko@...el.com>, intel-xe@...ts.freedesktop.org, 
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xe: avoid using writeq() on 32-bit

Hi, Arnd,

On Wed, 2024-02-28 at 13:27 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> 32-bit kernels do not provide a writeq(), failing the build:
> 
> drivers/gpu/drm/xe/xe_ggtt.c:78:2: error: use of undeclared
> identifier 'writeq'
>    78 |         writeq(pte, &ggtt->gsm[addr >> XE_PTE_SHIFT]);
> 
> Using lo_hi_writeq() instead will write the lower 32 bits to the
> address
> before writing the upper 32 bits to the following word, which is
> likely
> the correct replacement to do on 32-bit targets.
> 
> Include the linux/io-64-nonatomic-lo-hi.h header to automatically
> pick
> the regular writeq() on 64-bit machines but fall back to
> lo_hi_writeq()
> on 32-bit ones.
> 
> Fixes: 237412e45390 ("drm/xe: Enable 32bits build")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks for the patch.
We have a patch already on the list pending review comments that fixes
this.

https://patchwork.freedesktop.org/patch/579781/?series=130347&rev=1

/Thomas


> ---
>  drivers/gpu/drm/xe/xe_ggtt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c
> b/drivers/gpu/drm/xe/xe_ggtt.c
> index 5d46958e3144..1ffcc63ca86d 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -6,6 +6,7 @@
>  #include "xe_ggtt.h"
>  
>  #include <linux/sizes.h>
> +#include <linux/io-64-nonatomic-lo-hi.h>
>  
>  #include <drm/drm_managed.h>
>  #include <drm/i915_drm.h>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ