summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-09-13 11:53:17 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-09-13 11:53:17 +0000
commit7c24d456bba7b0456f58a1b0fa01497fc5ed434e (patch)
treead6a20a8404f9079469539dcf8f2dbc46b41ed26 /sys/dev/pci/drm
parent4fbdfac128ca3db37fe934ae30cbf755b331b1dc (diff)
add an ipi for wbinvd and a linux style wbinvd_on_all_cpus() function
ok kettenis@ deraadt@
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/i915/gt/agp_intel_gtt.c2
-rw-r--r--sys/dev/pci/drm/include/asm/smp.h12
2 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c b/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c
index 92aa77fedae..0e02d264eff 100644
--- a/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c
+++ b/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c
@@ -201,7 +201,7 @@ intel_gtt_chipset_flush(void)
#define I830_HIC 0x70
i915_reg_t hic = _MMIO(I830_HIC);
- wbinvd();
+ wbinvd_on_all_cpus();
I915_WRITE(hic, (I915_READ(hic) | (1<<31)));
for (i = 1000; i; i--) {
diff --git a/sys/dev/pci/drm/include/asm/smp.h b/sys/dev/pci/drm/include/asm/smp.h
index a50485db7f5..cfed96723c7 100644
--- a/sys/dev/pci/drm/include/asm/smp.h
+++ b/sys/dev/pci/drm/include/asm/smp.h
@@ -4,17 +4,7 @@
#define _ASM_SMP_H
#if defined(__i386__) || defined(__amd64__)
-
-#include <machine/cpu.h>
-
-static inline int
-wbinvd_on_all_cpus(void)
-{
- /* XXX single cpu only */
- wbinvd();
- return 0;
-}
-
+#include <machine/cpu.h> /* for wbinvd_on_all_cpus() */
#endif
#endif