]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Fix boot failures on older AMD CPU's
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Dec 2011 19:57:09 +0000 (11:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Dec 2011 19:57:09 +0000 (11:57 -0800)
commit8674c426463920dd9c52b1e8cf3f2a9b5553023a
tree0108c8b0bac10268a3156aaf042466b8815d1330
parentdc51620239f7a0a1dff6a2c6ee0ac7ed5d1f3f2d
x86: Fix boot failures on older AMD CPU's

People with old AMD chips are getting hung boots, because commit
fc4cd781547a ("x86, microcode, AMD: Add microcode revision to
/proc/cpuinfo") moved the microcode detection too early into
"early_init_amd()".

At that point we are *so* early in the booth that the exception tables
haven't even been set up yet, so the whole

rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);

doesn't actually work: if the rdmsr does a GP fault (due to non-existant
MSR register on older CPU's), we can't fix it up yet, and the boot fails.

Fix it by simply moving the code to a slightly later point in the boot
(init_amd() instead of early_init_amd()), since the kernel itself
doesn't even really care about the microcode patchlevel at this point
(or really ever: it's made available to user space in /proc/cpuinfo, and
updated if you do a microcode load).

Reported-tested-and-bisected-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Bob Tracy <rct@gherkin.frus.com>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/cpu/amd.c