Skip to content

Commit 9ca581b

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "A single fix for an AMD erratum so machines without a BIOS fix work" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/AMD: Apply erratum 665 on machines without a BIOS fix
2 parents 1c33336 + d199299 commit 9ca581b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,17 @@ static void init_amd_gh(struct cpuinfo_x86 *c)
669669
set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
670670
}
671671

672+
#define MSR_AMD64_DE_CFG 0xC0011029
673+
674+
static void init_amd_ln(struct cpuinfo_x86 *c)
675+
{
676+
/*
677+
* Apply erratum 665 fix unconditionally so machines without a BIOS
678+
* fix work.
679+
*/
680+
msr_set_bit(MSR_AMD64_DE_CFG, 31);
681+
}
682+
672683
static void init_amd_bd(struct cpuinfo_x86 *c)
673684
{
674685
u64 value;
@@ -726,6 +737,7 @@ static void init_amd(struct cpuinfo_x86 *c)
726737
case 6: init_amd_k7(c); break;
727738
case 0xf: init_amd_k8(c); break;
728739
case 0x10: init_amd_gh(c); break;
740+
case 0x12: init_amd_ln(c); break;
729741
case 0x15: init_amd_bd(c); break;
730742
}
731743

0 commit comments

Comments
 (0)