Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1366408 > unrolled thread

[PATCH 08/10] x86/cpufeature: Kill cpu_has_pat

Started byBorislav Petkov <bp@alien8.de>
First post2016-03-29 17:50 +0200
Last post2016-03-31 15:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Borislav Petkov <bp@alien8.de> - 2016-03-29 17:50 +0200
    Re: [Intel-gfx] [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Daniel Vetter <daniel@ffwll.ch> - 2016-03-30 13:30 +0200
    [tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-03-31 15:10 +0200

#1366408 — [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat

FromBorislav Petkov <bp@alien8.de>
Date2016-03-29 17:50 +0200
Subject[PATCH 08/10] x86/cpufeature: Kill cpu_has_pat
Message-ID<ri443-8nF-39@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1367114 — Re: [Intel-gfx] [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat

FromDaniel Vetter <daniel@ffwll.ch>
Date2016-03-30 13:30 +0200
SubjectRe: [Intel-gfx] [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat
Message-ID<rimtY-4Cw-19@gated-at.bofh.it>
In reply to#1366408
On Tue, Mar 29, 2016 at 05:42:01PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: intel-gfx@lists.freedesktop.org

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
> 
> @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
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1368288 — [tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat

Fromtip-bot for Borislav Petkov <tipbot@zytor.com>
Date2016-03-31 15:10 +0200
Subject[tip:x86/mm] x86/mm/pat, x86/cpufeature: Remove cpu_has_pat
Message-ID<riKwj-5yc-37@gated-at.bofh.it>
In reply to#1366408
Commit-ID:  568a58e5dfbcb88011cad7f87ed046aa00f19d1a
Gitweb:     http://git.kernel.org/tip/568a58e5dfbcb88011cad7f87ed046aa00f19d1a
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Tue, 29 Mar 2016 17:42:01 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 31 Mar 2016 13:32:43 +0200

x86/mm/pat, x86/cpufeature: Remove cpu_has_pat

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 | 1 -
 drivers/gpu/drm/i915/i915_gem.c   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
index 3636ec0..7a3fa7d 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -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)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3d31d3a..aaec8ae 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);

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web