linux_dsm_epyc7002/arch/x86/kernel/cpu
Xie XiuQi 1b48465500 x86/mce: Reenable CMCI banks when swiching back to interrupt mode
Zhang Liguang reported the following issue:

1) System detects a CMCI storm on the current CPU.

2) Kernel disables the CMCI interrupt on banks owned by the
   current CPU and switches to poll mode

3) After the CMCI storm subsides, kernel switches back to
   interrupt mode

4) We expect the system to reenable the CMCI interrupt on banks
   owned by the current CPU

   mce_intel_adjust_timer
   |-> cmci_reenable
       |-> cmci_discover     # owned banks are ignored here

  static void cmci_discover(int banks)
	...
	for (i = 0; i < banks; i++) {
		...
		if (test_bit(i, owned))	# ownd banks is ignore here
			continue;

So convert cmci_storm_disable_banks() to
cmci_toggle_interrupt_mode() which controls whether to enable or
disable CMCI interrupts with its argument.

NB: We cannot clear the owned bit because the banks won't be
polled, otherwise. See:

  27f6c573e0 ("x86, CMCI: Add proper detection of end of CMCI storms")

for more info.

Reported-by: Zhang Liguang <zhangliguang@huawei.com>
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org> # v3.15+
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: huawei.libin@huawei.com
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: rui.xiang@huawei.com
Link: http://lkml.kernel.org/r/1439396985-12812-10-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-13 10:12:52 +02:00
..
mcheck x86/mce: Reenable CMCI banks when swiching back to interrupt mode 2015-08-13 10:12:52 +02:00
microcode x86/microcode: Correct CPU family related variable types 2015-06-07 15:38:15 +02:00
mtrr x86/mm/pat: Wrap pat_enabled into a function API 2015-05-27 14:41:01 +02:00
.gitignore
amd.c Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
bugs_64.c
bugs.c x86/fpu: Move various internal function prototypes to fpu/internal.h 2015-05-19 15:47:48 +02:00
centaur.c x86: Remove CONFIG_X86_OOSTORE 2014-03-11 10:16:18 -07:00
common.c x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
cpu.h x86/cpu: Track legacy CPU model data only on 32-bit kernels 2013-10-26 13:34:39 +02:00
cyrix.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
hypervisor.c hypervisor/x86/xen: Unset X86_BUG_SYSRET_SS_ATTRS on Xen PV guests 2015-05-05 18:27:43 +01:00
intel_cacheinfo.c x86: Kill CONFIG_X86_HT 2015-06-07 15:33:44 +02:00
intel_pt.h perf/x86/intel/pt: Add Intel PT PMU driver 2015-04-02 17:14:20 +02:00
intel.c x86/cpu/intel: Fix trivial typo in intel_tlb_table[] 2015-02-22 08:55:58 +01:00
Makefile perf/x86/intel/bts: Add BTS PMU driver 2015-04-02 17:14:21 +02:00
match.c x86: align x86 arch with generic CPU modalias handling 2014-02-18 12:45:38 -08:00
mkcapflags.sh x86/build: Fix mkcapflags.sh bash-ism 2015-02-19 02:21:00 +01:00
mshyperv.c x86: Use entering[_ack]_irq() instead of open coding it 2015-05-15 16:03:18 +02:00
perf_event_amd_ibs.c perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() to void 2015-02-18 17:01:46 +01:00
perf_event_amd_iommu.c cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
perf_event_amd_iommu.h perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation 2013-06-19 13:04:53 +02:00
perf_event_amd_uncore.c cpumask: factor out show_cpumap into separate helper function 2014-11-07 11:45:00 -08:00
perf_event_amd.c perf/x86: Add 'index' param to get_event_constraint() callback 2015-04-02 17:33:10 +02:00
perf_event_intel_bts.c Replace module_init with appropriate alternate initcall in non modules. 2015-07-02 10:36:29 -07:00
perf_event_intel_cqm.c perf/x86/intel/cqm: Return cached counter value from IRQ context 2015-07-26 10:22:29 +02:00
perf_event_intel_ds.c perf/x86/intel/pebs: Add PEBSv3 decoding 2015-06-07 16:09:16 +02:00
perf_event_intel_lbr.c perf/x86/intel: Drain the PEBS buffer during context switches 2015-06-07 16:08:54 +02:00
perf_event_intel_pt.c Replace module_init with appropriate alternate initcall in non modules. 2015-07-02 10:36:29 -07:00
perf_event_intel_rapl.c Merge branch 'linus' into timers/core 2015-05-19 16:12:32 +02:00
perf_event_intel_uncore_nhmex.c perf/x86/uncore: Fix coccinelle warnings 2014-08-13 07:51:09 +02:00
perf_event_intel_uncore_snb.c perf/x86/intel/uncore: Add Broadwell-U uncore IMC PMU support 2015-05-11 11:57:47 +02:00
perf_event_intel_uncore_snbep.c perf/x86/intel/uncore: Fix CBOX bit wide and UBOX reg on Haswell-EP 2015-06-07 15:46:50 +02:00
perf_event_intel_uncore.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 18:57:44 -07:00
perf_event_intel_uncore.h Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:19:21 -07:00
perf_event_intel.c Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:52:04 -07:00
perf_event_knc.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
perf_event_p4.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
perf_event_p6.c perf/x86/intel/p6: Add userspace RDPMC quirk for PPro 2014-02-09 13:08:24 +01:00
perf_event.c x86/ldt: Make modify_ldt synchronous 2015-07-31 10:23:23 +02:00
perf_event.h Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 15:45:41 -07:00
perfctr-watchdog.c
powerflags.c update AMD powerflags comments 2013-05-28 12:02:10 +02:00
proc.c x86: Replace cpu_**_mask() with topology_**_cpumask() 2015-05-27 15:22:17 +02:00
rdrand.c x86, rdrand: When nordrand is specified, disable RDSEED as well 2014-05-11 20:25:20 -07:00
scattered.c x86: Add Intel Processor Trace (INTEL_PT) cpu feature detection 2015-04-02 17:14:18 +02:00
topology.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
transmeta.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
umc.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
vmware.c x86: Correctly detect hypervisor 2013-08-05 06:35:33 -07:00