diff options
author | Laura Abbott <labbott@redhat.com> | 2017-12-06 10:15:02 -0800 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2017-12-06 10:15:02 -0800 |
commit | 24c675ac8b05566c93cf125732b2ebd4e75765b0 (patch) | |
tree | b37c77f0d1bd7fe2088fa6c08bf939b305ea6ab0 /0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch | |
parent | 5919ce37427b7dcaa3da6be52ae10dfd765c6fda (diff) | |
download | kernel-24c675ac8b05566c93cf125732b2ebd4e75765b0.tar.gz kernel-24c675ac8b05566c93cf125732b2ebd4e75765b0.tar.xz kernel-24c675ac8b05566c93cf125732b2ebd4e75765b0.zip |
Add fixes for known AMD bootup issue
Diffstat (limited to '0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch')
-rw-r--r-- | 0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch b/0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch new file mode 100644 index 000000000..e846f204a --- /dev/null +++ b/0001-x86-PCI-fix-infinity-loop-in-search-for-64bit-BAR-pl.patch @@ -0,0 +1,38 @@ +From 91990a4f966e1862f9747072c4f46946169e2d8b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Tue, 21 Nov 2017 11:20:00 +0100 +Subject: [PATCH 1/3] x86/PCI: fix infinity loop in search for 64bit BAR + placement +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Break the loop if we can't find some address space for a 64bit BAR. + +Signed-off-by: Christian König <christian.koenig@amd.com> +--- + arch/x86/pci/fixup.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c +index e59378bf37d9..e857b3ac5755 100644 +--- a/arch/x86/pci/fixup.c ++++ b/arch/x86/pci/fixup.c +@@ -695,8 +695,13 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev) + res->end = 0xfd00000000ull - 1; + + /* Just grab the free area behind system memory for this */ +- while ((conflict = request_resource_conflict(&iomem_resource, res))) ++ while ((conflict = request_resource_conflict(&iomem_resource, res))) { ++ if (conflict->end >= res->end) { ++ kfree(res); ++ return; ++ } + res->start = conflict->end + 1; ++ } + + dev_info(&dev->dev, "adding root bus resource %pR\n", res); + +-- +2.11.0 + |