lkml.org 
[lkml]   [2017]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Current mainline git (24e700e291d52bd2) hangs when building e.g. perf
On Sat, Sep 09, 2017 at 01:07:49PM +0200, Markus Trippelsdorf wrote:
> It doesn't work. Compiling in a text console just freezes the machine
> before any MCE gets printed.

Ok, let's turn off all syncflood bits. Hunk below. Do a

$ dmesg | grep syncflood

to check it worked. It says

[ 1.557017] quirk_syncflood: 0x44: 0xa900044
[ 1.561431] quirk_syncflood: 0x44: wrote 0xa800040
[ 1.566361] quirk_syncflood: 0x180: 0x700022
[ 1.570775] quirk_syncflood: 0x180: wrote 0x20

here.

Also, make sure you boot with "pci=check_enable_amd_mmconf" on the
kernel cmdline because someone broke extended PCI cfg space again on
those machines. At least on my test box here... But that's something
I'll deal with later. :-\

Thanks.

---
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index eaa591cfd98b..c6a4430d2222 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -626,6 +626,32 @@ static void amd_disable_seq_and_redirect_scrub(struct pci_dev *dev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3,
amd_disable_seq_and_redirect_scrub);

+static void quirk_syncflood(struct pci_dev *misc)
+{
+ u32 val;
+
+ pci_read_config_dword(misc, 0x44, &val);
+ pr_info("%s: 0x44: 0x%x\n", __func__, val);
+
+ val &= ~(BIT(30) | BIT(21) | BIT(20) | BIT(2));
+
+ pci_write_config_dword(misc, 0x44, val);
+ pci_read_config_dword(misc, 0x44, &val);
+ pr_info("%s: 0x44: wrote 0x%x\n", __func__, val);
+
+ pci_read_config_dword(misc, 0x180, &val);
+ pr_info("%s: 0x180: 0x%x\n", __func__, val);
+
+ val &= ~(BIT(22) | BIT(21) | BIT(20) | BIT(9) | BIT(8) | BIT(7) | BIT(6) | BIT(1));
+
+ pci_write_config_dword(misc, 0x180, val);
+ pci_read_config_dword(misc, 0x180, &val);
+ pr_info("%s: 0x180: wrote 0x%x\n", __func__, val);
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC,
+ quirk_syncflood);
+
#if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE)
#include <linux/jump_label.h>
#include <asm/string_64.h>



--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2017-09-09 15:08    [W:0.092 / U:2.140 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site