x86, microcode: Drop uci->mc check on resume path
authorBorislav Petkov <borislav.petkov@amd.com>
Fri, 3 Aug 2012 13:26:50 +0000 (15:26 +0200)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 22 Aug 2012 23:14:44 +0000 (16:14 -0700)
commitbb9d3e473d5b324907e15dff4e54410b28ea50e2
tree3b9407657183c6695dccf0800ccc8693c4b11682
parent4dbf32c30f7e5379588a692c7bf80b05d9ef8026
x86, microcode: Drop uci->mc check on resume path

Remove the uci->mc check on the cpu resume path because the low-level
drivers do that anyway.

More importantly, though, this fixes a contrived and obscure but still
important case. Imagine the following:

* boot machine, no new microcode in /lib/firmware

* a subset of the CPUs is offlined

* in the meantime, user puts new fresh microcode container into
/lib/firmware and reloads it by doing
$ echo 1 > /sys/devices/system/cpu/microcode/reload

* offlined cores come back online and they don't get the newer microcode
applied due to this check.

Later patches take care of the issue on AMD.

While at it, cleanup code around it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/1344361461-10076-4-git-send-email-bp@amd64.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/microcode_core.c