From: Alexey Neyman <stilor@att.net>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH PING] Fix coalescing of host bridge windows in arch/x86/pci/acpi.c
Date: Tue, 17 Sep 2013 17:49:44 -0700 [thread overview]
Message-ID: <5988412.MKVQTjx6Fi@mistral> (raw)
In-Reply-To: <523794EE.10505@hurleysoftware.com>
[-- Attachment #1: Type: text/plain, Size: 3041 bytes --]
[Resending without HTML part - sorry for possible duplicates]
As requested by Peter, resending the patch with ACPI/x86 maintainers CC'ed.
Short description:
Make coalesce_windows() handle multiple resource overlaps.
Signed-off-by: Alexey Neyman <stilor@att.net>
Regards,
Alexey.
On Monday, September 16, 2013 07:31:58 PM Peter Hurley wrote:
> [ +cc Bjorn Helgaas, Rafael Wysocki, linux-acpi ]
>
> On 09/16/2013 12:41 PM, Alexey Neyman wrote:
> > Hi all,
> >
> > Could anybody review/commit the patch?
>
> LKML is a pretty general list and maintainers don't typically
> trawl the list for more work to do. The get_maintainer script
> can be used to help determine to whom to address a patch.
>
> peter@thor:~/src/kernels/next$ ./scripts/get_maintainer.pl -f
> arch/x86/pci/acpi.c Thomas Gleixner <tglx@linutronix.de> (maintainer:X86
> ARCHITECTURE...) Ingo Molnar <mingo@redhat.com> (maintainer:X86
> ARCHITECTURE...)
> "H. Peter Anvin" <hpa@zytor.com> (maintainer:X86 ARCHITECTURE...)
> x86@kernel.org (maintainer:X86 ARCHITECTURE...)
> Bjorn Helgaas <bhelgaas@google.com> (commit_signer:5/8=62%)
> "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> (commit_signer:3/8=38%)
> Feng Tang <feng.tang@intel.com> (commit_signer:1/8=12%)
> Yijing Wang <wangyijing@huawei.com> (commit_signer:1/8=12%)
> Mike Yoknis <mike.yoknis@hp.com> (commit_signer:1/8=12%)
> linux-kernel@vger.kernel.org (open list)
>
> Regards,
> Peter Hurley
>
> PS - You'll want to inline your patch as well because as you can see
> replies don't include it.
>
> > Regards,
> > Alexey.
> >
> > On Thursday, September 12, 2013 05:19:16 pm Alexey Neyman wrote:
> >> 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.
[-- Attachment #2: acpi.c.diff --]
[-- Type: text/x-patch, Size: 633 bytes --]
--- arch/x86/pci/acpi.c.orig 2013-09-12 16:23:06.113813150 -0700
+++ arch/x86/pci/acpi.c 2013-09-12 16:23:56.605813117 -0700
@@ -357,12 +357,12 @@
* the kernel resource tree doesn't allow overlaps.
*/
if (resource_overlaps(res1, res2)) {
- res1->start = min(res1->start, res2->start);
- res1->end = max(res1->end, res2->end);
+ res2->start = min(res1->start, res2->start);
+ res2->end = max(res1->end, res2->end);
dev_info(&info->bridge->dev,
"host bridge window expanded to %pR; %pR ignored\n",
- res1, res2);
- res2->flags = 0;
+ res2, res1);
+ res1->flags = 0;
}
}
}
prev parent reply other threads:[~2013-09-18 0:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201309121719.17447.stilor@att.net>
[not found] ` <201309160941.54844.stilor@att.net>
2013-09-16 23:31 ` [PATCH PING] Fix coalescing of host bridge windows in arch/x86/pci/acpi.c Peter Hurley
2013-09-18 0:49 ` Alexey Neyman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5988412.MKVQTjx6Fi@mistral \
--to=stilor@att.net \
--cc=bhelgaas@google.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox