x86/MCE/AMD: Read MCx_MISC block addresses on any CPU
authorBorislav Petkov <bp@suse.de>
Thu, 17 May 2018 16:32:33 +0000 (18:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 19 May 2018 13:21:46 +0000 (15:21 +0200)
commitfbf96cf904dc154a28338fe68f72902e9af57afc
tree882a87cc70d8b4c4261c4bce51047efee78a2714
parent95b5c0a592c712496dce6c1ed772d5f9026b5ed3
x86/MCE/AMD: Read MCx_MISC block addresses on any CPU

We used rdmsr_safe_on_cpu() to make sure we're reading the proper CPU's
MISC block addresses. However, that caused trouble with CPU hotplug due to
the _on_cpu() helper issuing an IPI while IRQs are disabled.

But we don't have to do that: the block addresses are the same on any CPU
so we can read them on any CPU. (What practically happens is, we read them
on the BSP and cache them, and for later reads, we service them from the
cache).

Suggested-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/mcheck/mce_amd.c