x86/AMD: Apply erratum 665 on machines without a BIOS fix
authorEmanuel Czirai <icanrealizeum@gmail.com>
Fri, 2 Sep 2016 05:35:50 +0000 (07:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:37 +0000 (10:07 +0200)
commit07450b30b7d94a546560106c5d9ac3aaf6e272fb
tree39542bbf49becd89b6a7d27f5a7d4cca9196e039
parent7547bc9f032baa8f6469dd66bb9c142c1f56e769
x86/AMD: Apply erratum 665 on machines without a BIOS fix

commit d1992996753132e2dafe955cccb2fb0714d3cfc4 upstream.

AMD F12h machines have an erratum which can cause DIV/IDIV to behave
unpredictably. The workaround is to set MSRC001_1029[31] but sometimes
there is no BIOS update containing that workaround so let's do it
ourselves unconditionally. It is simple enough.

[ Borislav: Wrote commit message. ]

Signed-off-by: Emanuel Czirai <icanrealizeum@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Yaowu Xu <yaowu@google.com>
Link: http://lkml.kernel.org/r/20160902053550.18097-1-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/amd.c