public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Michael Cheng <michael.cheng@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: michael.cheng@intel.com, lucas.demarchi@intel.com,
	dri-devel@lists.freedesktop.org, siva.mullati@intel.com
Subject: [Intel-gfx] [PATCH v2 1/3] drm_cache: Add logic for wbvind_on_all_cpus
Date: Thu, 17 Feb 2022 12:26:42 -0800	[thread overview]
Message-ID: <20220217202644.122937-2-michael.cheng@intel.com> (raw)
In-Reply-To: <20220217202644.122937-1-michael.cheng@intel.com>

Add logic for wbvind_on_all_cpus for non-x86 platforms.

v2(Michael Cheng): Change logic to if platform is not x86, then
		   we add pr_warn for calling wbvind_on_all_cpus.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
---
 drivers/gpu/drm/drm_cache.c | 2 --
 include/drm/drm_cache.h     | 6 ++++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 66597e411764..722e3931d68a 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -40,8 +40,6 @@
 #define MEMCPY_BOUNCE_SIZE 128
 
 #if defined(CONFIG_X86)
-#include <asm/smp.h>
-
 /*
  * clflushopt is an unordered instruction which needs fencing with mfence or
  * sfence to avoid ordering issues.  For drm_clflush_page this fencing happens
diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h
index 22deb216b59c..24fcf6be1419 100644
--- a/include/drm/drm_cache.h
+++ b/include/drm/drm_cache.h
@@ -34,6 +34,12 @@
 #define _DRM_CACHE_H_
 
 #include <linux/scatterlist.h>
+#include <asm/smp.h>
+
+#if !defined(CONFIG_x86)
+#define wbinvd_on_all_cpus() \
+	pr_warn("Missing cache flush in %s\n", __func__)
+#endif
 
 struct iosys_map;
 
-- 
2.25.1


  reply	other threads:[~2022-02-17 20:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 20:26 [Intel-gfx] [PATCH v2 0/3] Move #define wbvind_on_all_cpus Michael Cheng
2022-02-17 20:26 ` Michael Cheng [this message]
2022-02-17 20:26 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus Michael Cheng
2022-02-17 20:26 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/: Add drm_cache.h Michael Cheng
2022-02-18  3:43 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Move #define wbvind_on_all_cpus (rev2) Patchwork
2022-02-18  3:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-18  4:15 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-02-18 23:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Move #define wbvind_on_all_cpus (rev3) Patchwork
2022-02-18 23:05 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-18 23:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

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=20220217202644.122937-2-michael.cheng@intel.com \
    --to=michael.cheng@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=siva.mullati@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