Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752103AbcCLPQr (ORCPT ); Sat, 12 Mar 2016 10:16:47 -0500 Received: from torg.zytor.com ([198.137.202.12]:35990 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750734AbcCLPQi (ORCPT ); Sat, 12 Mar 2016 10:16:38 -0500 Date: Sat, 12 Mar 2016 07:15:59 -0800 From: tip-bot for Dave Hansen Message-ID: Cc: dave.hansen@linux.intel.com, hpa@zytor.com, kirill.shutemov@linux.intel.com, tglx@linutronix.de, dave@sr71.net, torvalds@linux-foundation.org, bp@suse.de, linux-kernel@vger.kernel.org, mingo@kernel.org, luto@kernel.org, peterz@infradead.org Reply-To: peterz@infradead.org, luto@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, bp@suse.de, dave@sr71.net, tglx@linutronix.de, kirill.shutemov@linux.intel.com, dave.hansen@linux.intel.com, hpa@zytor.com In-Reply-To: <20160310221213.06F9DB53@viggo.jf.intel.com> References: <20160310221213.06F9DB53@viggo.jf.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:mm/pkeys] x86/mm/pkeys: Fix mismerge of protection keys CPUID bits Git-Commit-ID: 0d47638f80a02b15869f1fe1fc09e5bf996750fd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3020 Lines: 75 Commit-ID: 0d47638f80a02b15869f1fe1fc09e5bf996750fd Gitweb: http://git.kernel.org/tip/0d47638f80a02b15869f1fe1fc09e5bf996750fd Author: Dave Hansen AuthorDate: Thu, 10 Mar 2016 14:12:13 -0800 Committer: Ingo Molnar CommitDate: Fri, 11 Mar 2016 09:55:57 +0100 x86/mm/pkeys: Fix mismerge of protection keys CPUID bits Kirill Shutemov pointed this out to me. The tip tree currently has commit: dfb4a70f2 [x86/cpufeature, x86/mm/pkeys: Add protection keys related CPUID definitions] whioch added support for two new CPUID bits: X86_FEATURE_PKU and X86_FEATURE_OSPKE. But, those bits were mis-merged and put in cpufeature.h instead of cpufeatures.h. This didn't cause any breakage *except* it keeps the "ospke" and "pku" bits from showing up in cpuinfo. Now cpuinfo has the two new flags: flags : ... pku ospke BTW, is it really wise to have cpufeature.h and cpufeatures.h? It seems like they can only cause confusion and mahem with tab completion. Reported-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160310221213.06F9DB53@viggo.jf.intel.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/cpufeature.h | 4 ---- arch/x86/include/asm/cpufeatures.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 50e292a..3636ec0 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -94,10 +94,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \ x86_this_cpu_test_bit(bit, (unsigned long *)&cpu_info.x86_capability)) -/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */ -#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */ -#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */ - /* * This macro is for detection of features which need kernel * infrastructure to be used. It may *not* directly test the CPU diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index cbb2c56..89949a2 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -270,6 +270,10 @@ #define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */ #define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */ +/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */ +#define X86_FEATURE_PKU (16*32+ 3) /* Protection Keys for Userspace */ +#define X86_FEATURE_OSPKE (16*32+ 4) /* OS Protection Keys Enable */ + /* * BUG word(s) */