diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-08 13:06:57 -0300 | 
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-08 13:06:57 -0300 | 
| commit | e3b22a65348ab54261a98b6bc90ecf8977ff8ebf (patch) | |
| tree | 81c517d6f0e5585be7af5ffa1a4d4136b1f4a9c6 /arch/x86/kernel/cpu/intel.c | |
| parent | 05c78468a60f2fd961cd0a0c01c27f288bf81204 (diff) | |
| parent | 552a031ba12a4236be107a5b082a399237758a5d (diff) | |
Merge remote-tracking branch 'tip/perf/core' into perf/urgent
To pick up fixes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/intel.c')
| -rw-r--r-- | arch/x86/kernel/cpu/intel.c | 27 | 
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index f17c1a714779..8d6d92ebeb54 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -66,6 +66,32 @@ void check_mpx_erratum(struct cpuinfo_x86 *c)  	}  } +/* + * Processors which have self-snooping capability can handle conflicting + * memory type across CPUs by snooping its own cache. However, there exists + * CPU models in which having conflicting memory types still leads to + * unpredictable behavior, machine check errors, or hangs. Clear this + * feature to prevent its use on machines with known erratas. + */ +static void check_memory_type_self_snoop_errata(struct cpuinfo_x86 *c) +{ +	switch (c->x86_model) { +	case INTEL_FAM6_CORE_YONAH: +	case INTEL_FAM6_CORE2_MEROM: +	case INTEL_FAM6_CORE2_MEROM_L: +	case INTEL_FAM6_CORE2_PENRYN: +	case INTEL_FAM6_CORE2_DUNNINGTON: +	case INTEL_FAM6_NEHALEM: +	case INTEL_FAM6_NEHALEM_G: +	case INTEL_FAM6_NEHALEM_EP: +	case INTEL_FAM6_NEHALEM_EX: +	case INTEL_FAM6_WESTMERE: +	case INTEL_FAM6_WESTMERE_EP: +	case INTEL_FAM6_SANDYBRIDGE: +		setup_clear_cpu_cap(X86_FEATURE_SELFSNOOP); +	} +} +  static bool ring3mwait_disabled __read_mostly;  static int __init ring3mwait_disable(char *__unused) @@ -304,6 +330,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)  	}  	check_mpx_erratum(c); +	check_memory_type_self_snoop_errata(c);  	/*  	 * Get the number of SMT siblings early from the extended topology  | 
