All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: intel-xe@lists.freedesktop.org,
	maarten.lankhorst@linux.intel.com, philippe.lecluse@intel.com,
	mchehab@kernel.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-xe] [PATCH 07/20] drm/xe/mmio: Use non-atomic writeq/readq variant for 32b
Date: Fri, 20 Jan 2023 15:44:13 -0500	[thread overview]
Message-ID: <20230120204426.68104-8-rodrigo.vivi@intel.com> (raw)
In-Reply-To: <20230120204426.68104-1-rodrigo.vivi@intel.com>

From: Lucas De Marchi <lucas.demarchi@intel.com>

writeq() and readq() and other functions working on 64 bit variables
are not provided by 32b arch. For that it's needed to choose between
linux/io-64-nonatomic-hi-lo.h and linux/io-64-nonatomic-lo-hi.h,
spliting the read/write in 2 accesses. For xe driver, it doesn't matter
much, so just choose one and include in xe_mmio.h.

This also removes some ifdef CONFIG_64BIT we had around because of the
missing 64bit functions.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/xe_mmio.c | 7 -------
 drivers/gpu/drm/xe/xe_mmio.h | 1 +
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 372ee632898f..30efe3569b5c 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -51,7 +51,6 @@ static int xe_set_dma_info(struct xe_device *xe)
 	return err;
 }
 
-#ifdef CONFIG_64BIT
 static int
 _resize_bar(struct xe_device *xe, int resno, resource_size_t size)
 {
@@ -135,9 +134,6 @@ static int xe_resize_lmem_bar(struct xe_device *xe, resource_size_t lmem_size)
 	pci_write_config_dword(pdev, PCI_COMMAND, pci_cmd);
 	return ret;
 }
-#else
-static int xe_resize_lmem_bar(struct xe_device *xe, resource_size_t lmem_size) { return 0; }
-#endif
 
 static bool xe_pci_resource_valid(struct pci_dev *pdev, int bar)
 {
@@ -239,10 +235,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
 		drm_warn(&xe->drm, "Restricting VRAM size to PCI resource size (0x%llx->0x%llx)\n",
 			 lmem_size, (u64)xe->mem.vram.size);
 
-#ifdef CONFIG_64BIT
 	xe->mem.vram.mapping = ioremap_wc(xe->mem.vram.io_start, xe->mem.vram.size);
-#endif
-
 	xe->mem.vram.size = min_t(u64, xe->mem.vram.size, usable_size);
 
 	drm_info(&xe->drm, "TOTAL VRAM: %pa, %pa\n", &xe->mem.vram.io_start, &xe->mem.vram.size);
diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index 7e7149c8d5ec..1bb7badf5898 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -7,6 +7,7 @@
 #define _XE_MMIO_H_
 
 #include <linux/delay.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
 
 #include "xe_gt_types.h"
 
-- 
2.39.0



  parent reply	other threads:[~2023-01-20 20:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 20:44 [Intel-xe] [PATCH 00/20] Catching up - round 2 Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 01/20] drm/xe/migrate: Update emit_pte to cope with a size level than 4k Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 02/20] drm/xe/fbc: set compressed_fb to NULL on error Rodrigo Vivi
2023-01-31 19:20   ` Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 03/20] drm/xe/pcode: fix pcode error check Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 04/20] drm/xe: fix xe_mmio_total_vram_size Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 05/20] drm/xe/ggtt: Use BIT_ULL() for 64bit Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 06/20] drm/xe: Fix some log messages on 32b Rodrigo Vivi
2023-01-20 20:44 ` Rodrigo Vivi [this message]
2023-01-20 20:44 ` [Intel-xe] [PATCH 08/20] drm/xe: Fix tracepoints " Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 09/20] drm/xe/gt: Fix min() with u32 and u64 Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 10/20] drm/xe: Add documentation for mem_type Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 11/20] drm/xe/ext: Dont call intel_display_power_is_enabled from irq install/remove Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 12/20] ]65; 7002; 1cdrm/xe: Add min config for kunit integration ARCH=um Rodrigo Vivi
2023-01-20 22:58   ` Mauro Carvalho Chehab
2023-01-24 23:13   ` Lucas De Marchi
2023-01-31 19:30     ` Rodrigo Vivi
2023-01-31 19:23   ` Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 13/20] drm/xe/Kconfig.debug: select DEBUG_FS for KUnit runs Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 14/20] drm/xe: KUnit tests depend on CONFIG_DRM_FBDEV_EMULATION Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 15/20] drm/xe: fix XE_DISPLAY dependency on ACPI Rodrigo Vivi
2023-01-24 16:02   ` Lecluse, Philippe
2023-01-20 20:44 ` [Intel-xe] [PATCH 16/20] drm/xe: allow building XE_DISPLAY without ACPI Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 17/20] drm/xe: fix DRM_FBDEV_EMULATION dependencies Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 18/20] drm/xe/gt: Enable interrupt while initializing root gt Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 19/20] drm/xe: Fix Meteor Lake rsa issue on guc loading Rodrigo Vivi
2023-01-20 20:44 ` [Intel-xe] [PATCH 20/20] drm/xe/guc_pc: Fix Meteor Lake registers Rodrigo Vivi

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=20230120204426.68104-8-rodrigo.vivi@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mchehab@kernel.org \
    --cc=philippe.lecluse@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.