x86/mm/pat, x86/cpufeature: Remove cpu_has_pat
authorBorislav Petkov <bp@suse.de>
Tue, 29 Mar 2016 15:42:01 +0000 (17:42 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 Mar 2016 11:32:43 +0000 (13:32 +0200)
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: intel-gfx@lists.freedesktop.org
Link: http://lkml.kernel.org/r/1459266123-21878-9-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/cpufeature.h
drivers/gpu/drm/i915/i915_gem.c

index 3636ec06c88758ccf13793dd6a1d14c31bb7fc4e..7a3fa7d70bd7783335700e044e7f736487069409 100644 (file)
@@ -132,7 +132,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
 #define cpu_has_clflush                boot_cpu_has(X86_FEATURE_CLFLUSH)
 #define cpu_has_gbpages                boot_cpu_has(X86_FEATURE_GBPAGES)
 #define cpu_has_arch_perfmon   boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
-#define cpu_has_pat            boot_cpu_has(X86_FEATURE_PAT)
 #define cpu_has_x2apic         boot_cpu_has(X86_FEATURE_X2APIC)
 #define cpu_has_xsave          boot_cpu_has(X86_FEATURE_XSAVE)
 #define cpu_has_xsaves         boot_cpu_has(X86_FEATURE_XSAVES)
index 3d31d3ac589e8a10f4c446294a738ee10955f581..aaec8aef9fd4c122f1359a5a5cb08bf27474dbc0 100644 (file)
@@ -1732,7 +1732,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
        if (args->flags & ~(I915_MMAP_WC))
                return -EINVAL;
 
-       if (args->flags & I915_MMAP_WC && !cpu_has_pat)
+       if (args->flags & I915_MMAP_WC && !boot_cpu_has(X86_FEATURE_PAT))
                return -ENODEV;
 
        obj = drm_gem_object_lookup(dev, file, args->handle);