Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcC3L2g (ORCPT ); Wed, 30 Mar 2016 07:28:36 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33349 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751393AbcC3L2e (ORCPT ); Wed, 30 Mar 2016 07:28:34 -0400 Date: Wed, 30 Mar 2016 13:28:37 +0200 From: Daniel Vetter To: Borislav Petkov Cc: X86 ML , intel-gfx@lists.freedesktop.org, LKML Subject: Re: [Intel-gfx] [PATCH 08/10] x86/cpufeature: Kill cpu_has_pat Message-ID: <20160330112837.GG2510@phenom.ffwll.local> Mail-Followup-To: Borislav Petkov , X86 ML , intel-gfx@lists.freedesktop.org, LKML References: <1459266123-21878-1-git-send-email-bp@alien8.de> <1459266123-21878-9-git-send-email-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459266123-21878-9-git-send-email-bp@alien8.de> X-Operating-System: Linux phenom 4.4.0-1-amd64 User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2885 Lines: 82 On Tue, Mar 29, 2016 at 05:42:01PM +0200, Borislav Petkov wrote: > From: Borislav Petkov > > Signed-off-by: Borislav Petkov > Cc: intel-gfx@lists.freedesktop.org Acked-by: Daniel Vetter > --- > > @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