Skip to content

Commit

Permalink
drm_cache: Add logic for wbvind_on_all_cpus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
michaelonchrome authored and intel-lab-lkp committed Feb 22, 2022
1 parent 55223c3 commit 3aaa40c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/drm_cache.c
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions include/drm/drm_cache.h
Expand Up @@ -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;

Expand Down

0 comments on commit 3aaa40c

Please sign in to comment.