aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/quirks.c')
-rw-r--r--arch/x86/kernel/quirks.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index cc457ff818ad..51402a7e4ca6 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -626,3 +626,34 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3,
626 amd_disable_seq_and_redirect_scrub); 626 amd_disable_seq_and_redirect_scrub);
627 627
628#endif 628#endif
629
630#if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE)
631#include <linux/jump_label.h>
632#include <asm/string_64.h>
633
634/* Ivy Bridge, Haswell, Broadwell */
635static void quirk_intel_brickland_xeon_ras_cap(struct pci_dev *pdev)
636{
637 u32 capid0;
638
639 pci_read_config_dword(pdev, 0x84, &capid0);
640
641 if (capid0 & 0x10)
642 static_branch_inc(&mcsafe_key);
643}
644
645/* Skylake */
646static void quirk_intel_purley_xeon_ras_cap(struct pci_dev *pdev)
647{
648 u32 capid0;
649
650 pci_read_config_dword(pdev, 0x84, &capid0);
651
652 if ((capid0 & 0xc0) == 0xc0)
653 static_branch_inc(&mcsafe_key);
654}
655DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x0ec3, quirk_intel_brickland_xeon_ras_cap);
656DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_ras_cap);
657DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, quirk_intel_brickland_xeon_ras_cap);
658DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras_cap);
659#endif