aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-31 15:00:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-31 15:00:45 -0400
commit918d80a136430aeb23659aa75f8b415090500667 (patch)
treed11d394f63ed9ea0d1830b87cae6d5200501a7cd /drivers/gpu/drm
parent26a5c0dfbc9c4b1c455821c0a0ea6d6116082397 (diff)
parent69f2366c9456d0ce784cf5aba87ee77eeadc1d5e (diff)
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpu handling changes from Ingo Molnar: "Bigger changes: - Intel CPU hardware-enablement: new vector instructions support (AVX-512), by Fenghua Yu. - Support the clflushopt instruction and use it in appropriate places. clflushopt is similar to clflush but with more relaxed ordering, by Ross Zwisler. - MSR accessor cleanups, by Borislav Petkov. - 'forcepae' boot flag for those who have way too much time to spend on way too old Pentium-M systems and want to live way too dangerously, by Chris Bainbridge" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, cpu: Add forcepae parameter for booting PAE kernels on PAE-disabled Pentium M Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC x86, intel: Make MSR_IA32_MISC_ENABLE bit constants systematic x86, Intel: Convert to the new bit access MSR accessors x86, AMD: Convert to the new bit access MSR accessors x86: Add another set of MSR accessor functions x86: Use clflushopt in drm_clflush_virt_range x86: Use clflushopt in drm_clflush_page x86: Use clflushopt in clflush_cache_range x86: Add support for the clflushopt instruction x86, AVX-512: Enable AVX-512 States Context Switch x86, AVX-512: AVX-512 Feature Detection
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/drm_cache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index bb8f58012189..534cb89b160d 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -32,6 +32,12 @@
32#include <drm/drmP.h> 32#include <drm/drmP.h>
33 33
34#if defined(CONFIG_X86) 34#if defined(CONFIG_X86)
35
36/*
37 * clflushopt is an unordered instruction which needs fencing with mfence or
38 * sfence to avoid ordering issues. For drm_clflush_page this fencing happens
39 * in the caller.
40 */
35static void 41static void
36drm_clflush_page(struct page *page) 42drm_clflush_page(struct page *page)
37{ 43{
@@ -44,7 +50,7 @@ drm_clflush_page(struct page *page)
44 50
45 page_virtual = kmap_atomic(page); 51 page_virtual = kmap_atomic(page);
46 for (i = 0; i < PAGE_SIZE; i += size) 52 for (i = 0; i < PAGE_SIZE; i += size)
47 clflush(page_virtual + i); 53 clflushopt(page_virtual + i);
48 kunmap_atomic(page_virtual); 54 kunmap_atomic(page_virtual);
49} 55}
50 56
@@ -133,7 +139,7 @@ drm_clflush_virt_range(char *addr, unsigned long length)
133 mb(); 139 mb();
134 for (; addr < end; addr += boot_cpu_data.x86_clflush_size) 140 for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
135 clflush(addr); 141 clflush(addr);
136 clflush(end - 1); 142 clflushopt(end - 1);
137 mb(); 143 mb();
138 return; 144 return;
139 } 145 }