public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	 Oded Gabbay <ogabbay@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-xe@lists.freedesktop.org,  dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xe: avoid using writeq() on 32-bit
Date: Wed, 28 Feb 2024 15:44:14 +0100	[thread overview]
Message-ID: <cde2ba78716ae4903f9893f018796c79554bb168.camel@linux.intel.com> (raw)
In-Reply-To: <20240228122746.3091608-1-arnd@kernel.org>

Hi, Arnd,

On Wed, 2024-02-28 at 13:27 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.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>


      reply	other threads:[~2024-02-28 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 12:27 [PATCH] xe: avoid using writeq() on 32-bit Arnd Bergmann
2024-02-28 14:44 ` Thomas Hellström [this message]

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=cde2ba78716ae4903f9893f018796c79554bb168.camel@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=mripard@kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=tzimmermann@suse.de \
    /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