linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, intel-gfx@lists.freedesktop.org
Subject: [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat
Date: Tue, 29 Mar 2016 17:42:01 +0200	[thread overview]
Message-ID: <1459266123-21878-9-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1459266123-21878-1-git-send-email-bp@alien8.de>

From: Borislav Petkov <bp@suse.de>

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: intel-gfx@lists.freedesktop.org
---

@tip guys, the pat_bsp_init() and pat_ap_init() hunk will conflict with

  d63dcf49cf5a ("x86/mm/pat: Replace cpu_has_pat with boot_cpu_has()")

in tip/x86:mm. Let me know how you wanna handle it. Or you can simply
delete those hunks below when applying after merging the above branch.
Or I can send this patch later... Yadda yadda.

 arch/x86/include/asm/cpufeature.h | 1 -
 arch/x86/mm/pat.c                 | 4 ++--
 drivers/gpu/drm/i915/i915_gem.c   | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 5e02bc2e8444..ad480c5fb27c 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -128,7 +128,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
 #define cpu_has_aes		boot_cpu_has(X86_FEATURE_AES)
 #define cpu_has_avx		boot_cpu_has(X86_FEATURE_AVX)
 #define cpu_has_avx2		boot_cpu_has(X86_FEATURE_AVX2)
-#define cpu_has_pat		boot_cpu_has(X86_FEATURE_PAT)
 #define cpu_has_xsave		boot_cpu_has(X86_FEATURE_XSAVE)
 #define cpu_has_xsaves		boot_cpu_has(X86_FEATURE_XSAVES)
 /*
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index faec01e7a17d..6df20ac83ec3 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -202,7 +202,7 @@ static void pat_bsp_init(u64 pat)
 {
 	u64 tmp_pat;
 
-	if (!cpu_has_pat) {
+	if (!boot_cpu_has(X86_FEATURE_PAT)) {
 		pat_disable("PAT not supported by CPU.");
 		return;
 	}
@@ -227,7 +227,7 @@ static void pat_ap_init(u64 pat)
 	if (!pat_enabled())
 		return;
 
-	if (!cpu_has_pat) {
+	if (!boot_cpu_has(X86_FEATURE_PAT)) {
 		/*
 		 * If this happens we are on a secondary CPU, but switched to
 		 * PAT on the boot CPU. We have no way to undo PAT.
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3d31d3ac589e..aaec8aef9fd4 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -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);
-- 
2.7.3

  parent reply	other threads:[~2016-03-29 15:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 15:41 [PATCH 00/10] x86/cpu: Some more cpu_has_YYY removal Borislav Petkov
2016-03-29 15:41 ` [PATCH 01/10] x86/cpufeature: Kill cpu_has_arch_perfmon Borislav Petkov
2016-03-31 13:01   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_arch_perfmon tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 02/10] x86/cpufeature: Kill cpu_has_hypervisor Borislav Petkov
2016-03-29 18:03   ` Kershner, David A
2016-03-31 13:01   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_hypervisor tip-bot for Borislav Petkov
2016-04-01  7:40   ` [tip:x86/cpu] x86/cpufeature: Fix build bug caused by merge artifact with the removal of cpu_has_hypervisor tip-bot for Ingo Molnar
2016-04-01  7:51     ` Borislav Petkov
2016-03-29 15:41 ` [PATCH 03/10] x86/cpufeature: Kill cpu_has_osxsave Borislav Petkov
2016-03-31 13:01   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_osxsave tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 04/10] x86/cpufeature: Kill cpu_has_x2apic Borislav Petkov
2016-03-29 16:16   ` Luck, Tony
2016-03-31 13:02   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_x2apic tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 05/10] x86/cpufeature: Kill cpu_has_gbpages Borislav Petkov
2016-03-31 13:02   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_gbpages tip-bot for Borislav Petkov
2016-03-29 15:41 ` [PATCH 06/10] x86/cpufeature: Kill cpu_has_clflush Borislav Petkov
2016-03-31 13:03   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_clflush tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 07/10] x86/cpufeature: Kill cpu_has_xmm2 Borislav Petkov
2016-03-31 13:03   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_xmm2 tip-bot for Borislav Petkov
2016-03-29 15:42 ` Borislav Petkov [this message]
2016-03-30 11:28   ` [Intel-gfx] [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Daniel Vetter
2016-03-31 13:00   ` [tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 09/10] x86/cpufeature: Kill cpu_has_pge Borislav Petkov
2016-03-31 13:03   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pge tip-bot for Borislav Petkov
2016-03-29 15:42 ` [PATCH 10/10] x86/cpufeature: Kill cpu_has_pse Borislav Petkov
2016-03-31 13:04   ` [tip:x86/cpu] x86/cpufeature: Remove cpu_has_pse tip-bot for Borislav Petkov

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=1459266123-21878-9-git-send-email-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).