[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201309121719.17447.stilor@att.net>
Date: Thu, 12 Sep 2013 17:19:16 -0700
From: Alexey Neyman <stilor@....net>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] Fix coalescing of host bridge windows in arch/x86/pci/acpi.c
Hi all,
I have a board with a BIOS bug that reports the following I/O port regions in
_CRS on one of the host bridges:
0x0000-0x03af // #0
0x03e0-0x0cf7 // #1
0x03b0-0x03bb // #2
0x03c0-0x03df // #3
0x0000-0xdfff // #4
0xf000-0xffff // #5
Obviously, region number #4 is erroneous as it overlaps with regions #0..3.
However, code in coalesce_windows() in arch/x86/pci/acpi.c attempts to recover
from such kind of BIOS bugs by merging the overlapping regions. Current code
expands region #0 to 0x0000-0xdffff and makes region #4 ignored. As a result,
overlap of the expanded region #0 with regions #1..3 remains undetected. As a
result, regions #1..3 are inserted into the resource tree as if they were
consumers of the 0x0000-0xdfff regions, and devices that have resources in one
of these regions (e.g. 0x3f6 for legacy IDE) have a resource conflict - the
kernel does not initialize them.
The attached patch makes the code in coalesce_windows() instead ignore res1
(which is already dealt with), possibly expanding res2 instead. As res2 has
not been reached in the outer loop in coalesce_windows(), the code will then
check for overlaps of the just-expanded resource with the rest of the
resources.
Regards,
Alexey.
View attachment "acpi.c.diff" of type "text/x-patch" (634 bytes)
Powered by blists - more mailing lists