tip-queue 2015-10-30
Borislav Petkov
maintainercover tip-queue 2015-10-30
From: Borislav Petkov <[email protected]>
Hi Ingo,
please queue those non-critical platform enablement patches.
Thanks.
Aravind Gopalakrishnan (1):
x86/mce: Add a Scalable MCA vendor flags bit
Borislav Petkov (1):
x86/mce: Add a default case to the switch in
__mcheck_cpu_ancient_init()
Wan Zongshun (1):
x86/cpu: Add CLZERO detection
arch/x86/include/asm/cpufeature.h | 5 ++++- arch/x86/include/asm/mce.h | 34 +++++++++++++++++++++------------- arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 4 ++++ 4 files changed, 30 insertions(+), 14 deletions(-)
Signature · 1 line
2.3.5
Borislav Petkov
maintainerPATCH 1/3 x86/mce: Add a Scalable MCA vendor flags bit
From: Aravind Gopalakrishnan <[email protected]>
Scalable MCA (SMCA) is a new feature in AMD Fam17h processors which indicates presence of MCA extensions.
MCA extensions expands existing register space for the MCE banks and also introduces a new MSR range to accommodate new banks.
Add the detection bit.
[ Reformat mce_vendor_flags definitions and save indentation levels. Improve
comments. ]
--- arch/x86/include/asm/mce.h | 34 +++++++++++++++++++++------------- arch/x86/kernel/cpu/mcheck/mce.c | 2 ++ 2 files changed, 23 insertions(+), 13 deletions(-)
arch/x86/include/asm/mce.h +21 -13
@@ -123,19 +123,27 @@ struct mca_config { };struct mce_vendor_flags { -/* -* overflow recovery cpuid bit indicates that overflow -* conditions are not fatal -*/ -__u64 overflow_recov :1 , - -/* -* SUCCOR stands for S/W UnCorrectable error COntainment -* and Recovery. It indicates support for data poisoning -* in HW and deferred error interrupts. -*/ - succor :1 , - __reserved_0 :62 ; +/* +* Indicates that overflow conditions are not fatal, when set. +*/ +__u64 overflow_recov :1 , + +/* +* (AMD) SUCCOR stands for S/W UnCorrectable error COntainment and +* Recovery. It indicates support for data poisoning in HW and deferred +* error interrupts. +*/ + succor :1 , + +/* +* (AMD) SMCA: This bit indicates support for Scalable MCA which expands +* the register space for each MCA bank and also increases number of +* banks. Also, to accommodate the new banks and registers, the MCA +* register space is moved to a new MSR range. +*/ + smca :1 , + + __reserved_0 :61 ; };extern struct mce_vendor_flags mce_flags;
arch/x86/kernel/cpu/mcheck/mce.c +2 -0
@@ -1605,6 +1605,8 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)mce_amd_feature_init (c); mce_flags.overflow_recov = !!(ebx &BIT (0 )); mce_flags.succor = !!(ebx &BIT (1 )); + mce_flags.smca = !!(ebx &BIT (3 )); +break ; }
Signature · 1 line
2.3.5
tip-bot for Aravind Gopalakrishnan
merge bot[tip:ras/core] x86/mce: Add a Scalable MCA vendor flags bit
x86/mce: Add a Scalable MCA vendor flags bit
Commit-ID: c7f54d21fb02e90042e6233b46716dcb244e70e6 Gitweb: http://git.kernel.org/tip/c7f54d21fb02e90042e6233b46716dcb244e70e6 Author: Aravind Gopalakrishnan <[email protected]> AuthorDate: Fri, 30 Oct 2015 13:11:37 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 1 Nov 2015 11:26:13 +0100
x86/mce: Add a Scalable MCA vendor flags bit
Scalable MCA (SMCA) is a new feature in AMD Fam17h processors which indicates presence of MCA extensions.
MCA extensions expands existing register space for the MCE banks and also introduces a new MSR range to accommodate new banks.
Add the detection bit.
--- arch/x86/include/asm/mce.h | 34 +++++++++++++++++++++------------- arch/x86/kernel/cpu/mcheck/mce.c | 2 ++ 2 files changed, 23 insertions(+), 13 deletions(-)
arch/x86/include/asm/mce.h +21 -13
@@ -123,19 +123,27 @@ struct mca_config { };struct mce_vendor_flags { -/* -* overflow recovery cpuid bit indicates that overflow -* conditions are not fatal -*/ -__u64 overflow_recov :1 , - -/* -* SUCCOR stands for S/W UnCorrectable error COntainment -* and Recovery. It indicates support for data poisoning -* in HW and deferred error interrupts. -*/ - succor :1 , - __reserved_0 :62 ; +/* +* Indicates that overflow conditions are not fatal, when set. +*/ +__u64 overflow_recov :1 , + +/* +* (AMD) SUCCOR stands for S/W UnCorrectable error COntainment and +* Recovery. It indicates support for data poisoning in HW and deferred +* error interrupts. +*/ + succor :1 , + +/* +* (AMD) SMCA: This bit indicates support for Scalable MCA which expands +* the register space for each MCA bank and also increases number of +* banks. Also, to accommodate the new banks and registers, the MCA +* register space is moved to a new MSR range. +*/ + smca :1 , + + __reserved_0 :61 ; };extern struct mce_vendor_flags mce_flags;
arch/x86/kernel/cpu/mcheck/mce.c +2 -0
@@ -1605,6 +1605,8 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)mce_amd_feature_init (c); mce_flags.overflow_recov = !!(ebx &BIT (0 )); mce_flags.succor = !!(ebx &BIT (1 )); + mce_flags.smca = !!(ebx &BIT (3 )); +break ; }
Borislav Petkov
maintainerPATCH 2/3 x86/mce: Add a default case to the switch in __mcheck_cpu_ancient_init()
In reply to Borislav PetkovFrom: Borislav Petkov <[email protected]>
Caught by building with W= which enable -Wswitch-default also.
--- arch/x86/kernel/cpu/mcheck/mce.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/mcheck/mce.c +2 -0
@@ -1586,6 +1586,8 @@ static int __mcheck_cpu_ancient_init(struct cpuinfo_x86 *c)winchip_mcheck_init (c);return 1 ;break ; +default : +return 0 ; }return 0 ;
Signature · 1 line
2.3.5
tip-bot for Borislav Petkov
merge bot[tip:ras/core] x86/mce: Add a default case to the switch in __mcheck_cpu_ancient_init()
x86/mce: Add a default case to the switch in __mcheck_cpu_ancient_init()
Commit-ID: dc34bdd2367fd31744ee3ba1de1b1cc0fa2ce193 Gitweb: http://git.kernel.org/tip/dc34bdd2367fd31744ee3ba1de1b1cc0fa2ce193 Author: Borislav Petkov <[email protected]> AuthorDate: Fri, 30 Oct 2015 13:11:38 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 1 Nov 2015 11:26:14 +0100
x86/mce: Add a default case to the switch in __mcheck_cpu_ancient_init()
Caught by building with W= which enable -Wswitch-default also.
--- arch/x86/kernel/cpu/mcheck/mce.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/mcheck/mce.c +2 -0
@@ -1586,6 +1586,8 @@ static int __mcheck_cpu_ancient_init(struct cpuinfo_x86 *c)winchip_mcheck_init (c);return 1 ;break ; +default : +return 0 ; }return 0 ;
Borislav Petkov
maintainerPATCH 3/3 x86/cpu: Add CLZERO detection
In reply to Borislav PetkovFrom: Wan Zongshun <[email protected]>
AMD Fam17h processors introduce support for the CLZERO instruction. It zeroes out the 64 byte cache line specified in RAX.
Add the bit here to allow /proc/cpuinfo to list the feature.
Boris: we're adding this as a separate ->x86_capability leaf because CPUID_80000008_EBX is going to contain more feature bits and it will fill out with time.
--- arch/x86/include/asm/cpufeature.h | 5 ++++- arch/x86/kernel/cpu/common.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/include/asm/cpufeature.h +4 -1
@@ -12,7 +12,7 @@#include <asm/disabled-features.h> #endif -#define NCAPINTS 13/* N 32-bit words worth of info */ +#define NCAPINTS 14/* N 32-bit words worth of info */ #define NBUGINTS 1/* N 32-bit bug flags */ /*
@@ -255,6 +255,9 @@/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (edx), word 12 */ #define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0)/* LLC occupancy monitoring if 1 */ +/* AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13 */ +#define X86_FEATURE_CLZERO (13*32+0)/* CLZERO instruction */ +/* * BUG word(s) */
arch/x86/kernel/cpu/common.c +1 -0
@@ -670,6 +670,7 @@ void get_cpu_cap(struct cpuinfo_x86 *c) c->x86_virt_bits = (eax >>8 ) &0xff ; c->x86_phys_bits = eax &0xff ; + c->x86_capability[13 ] =cpuid_ebx (0x80000008 ); }#ifdef CONFIG_X86_32 else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
Signature · 1 line
2.3.5
tip-bot for Wan Zongshun
merge bot[tip:x86/cpu] x86/cpu: Add CLZERO detection
x86/cpu: Add CLZERO detection
Commit-ID: 2167ceabf34163727ca4e283c0f030e3960932e5 Gitweb: http://git.kernel.org/tip/2167ceabf34163727ca4e283c0f030e3960932e5 Author: Wan Zongshun <[email protected]> AuthorDate: Fri, 30 Oct 2015 13:11:39 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Sun, 1 Nov 2015 11:26:23 +0100
x86/cpu: Add CLZERO detection
AMD Fam17h processors introduce support for the CLZERO instruction. It zeroes out the 64 byte cache line specified in RAX.
Add the bit here to allow /proc/cpuinfo to list the feature.
Boris: we're adding this as a separate ->x86_capability leaf because CPUID_80000008_EBX is going to contain more feature bits and it will fill out with time.
--- arch/x86/include/asm/cpufeature.h | 5 ++++- arch/x86/kernel/cpu/common.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)
arch/x86/include/asm/cpufeature.h +4 -1
@@ -12,7 +12,7 @@#include <asm/disabled-features.h> #endif -#define NCAPINTS 13/* N 32-bit words worth of info */ +#define NCAPINTS 14/* N 32-bit words worth of info */ #define NBUGINTS 1/* N 32-bit bug flags */ /*
@@ -255,6 +255,9 @@/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (edx), word 12 */ #define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0)/* LLC occupancy monitoring if 1 */ +/* AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13 */ +#define X86_FEATURE_CLZERO (13*32+0)/* CLZERO instruction */ +/* * BUG word(s) */
arch/x86/kernel/cpu/common.c +1 -0
@@ -670,6 +670,7 @@ void get_cpu_cap(struct cpuinfo_x86 *c) c->x86_virt_bits = (eax >>8 ) &0xff ; c->x86_phys_bits = eax &0xff ; + c->x86_capability[13 ] =cpuid_ebx (0x80000008 ); }#ifdef CONFIG_X86_32 else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))