mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Len Brown <lenb@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Adam Belay <abelay@mit.edu>
Subject: [PATCH 0/5] resources: add arch hook for preventing allocation in reserved areas
Date: Wed, 8 Dec 2010 14:37:34 -0700	[thread overview]
Message-ID: <201012081437.34539.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <20101208213606.13026.47657.stgit@bob.kio>

Crap, here's the cover letter I meant to include.

[RFC] PCI, PNP, resources: effectively reserve ACPI device resources

2.6.37-rc includes some patches of mine to change the way we allocate address
space for devices, and these caused some regressions.

Most device resource allocation is done by the BIOS, but Linux does allocate
space if the BIOS doesn't do it (e.g., for CardBus or other hotplug devices)
or if the BIOS did it wrong (e.g., it put a PCI device outside the host bridge
windows).

My original 2.6.37-rc patches make Linux allocate space from the top down
instead of from the bottom up.  We did this because that's what Windows does,
and doing it the same way helps us avoid some BIOS defects, such as
https://bugzilla.kernel.org/show_bug.cgi?id=16228 .

The regressions caused by these changes include:

https://bugzilla.kernel.org/show_bug.cgi?id=23332

    Here, we allocated a 64MB bridge window for a subtractive-decode bridge
    leading to a CardBus controller, and the window conflicts with devices not
    reported by the BIOS.  Windows doesn't see this problem because it relies
    on the fact that the bridge is in subtractive-decode mode and doesn't
    program the window at all.

https://bugzilla.kernel.org/show_bug.cgi?id=23542
https://bugzilla.kernel.org/show_bug.cgi?id=23802

    In both cases, Linux allocated space that conflicts with an ACPI device
    because it ignores resource usage reported by ACPI.  Windows avoids this
    problem because it pays attention to the ACPI _CRS methods that report
    device resource usage.

I think the best way to address these problems would be to put ACPI device
resources in the resource maps, just like we do for PCI devices.  We tried this
a couple years ago (http://lkml.org/lkml/2007/11/1/214) and tripped over some
subtle issues.  We should try again, but not at this stage of the -rc.

Instead, these patches take the approach of adding a filter in the
allocate_resource() path so each arch can prevent allocation of any address
ranges it cares about.  For x86, that means looking through all the PNP
devices and protecting the address space they use.

In addition, for 23332, I added a quirk that builds a fake PNP device to
protect the unreported devices.  I'm a little nervous about this because I've
been told that the WHQL tests look for unreported devices, and the HP nx6325
should have passwd.  But it's the best I can think of for now.

Bjorn

  parent reply	other threads:[~2010-12-08 21:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 21:36 [PATCH 1/5] " Bjorn Helgaas
2010-12-08 21:36 ` [PATCH 2/5] x86: avoid BIOS area when allocating address space Bjorn Helgaas
2010-12-08 21:36 ` [PATCH 3/5] x86: avoid PNP resources " Bjorn Helgaas
2010-12-08 21:36 ` [PATCH 4/5] PNP: add framework for platform PNP quirks Bjorn Helgaas
2010-12-08 21:36 ` [PATCH 5/5] PNP: HP nx6325 fixup: reserve unreported resources Bjorn Helgaas
2010-12-12  3:30   ` Linus Torvalds
2010-12-12  5:23     ` Dave Airlie
2010-12-12  6:17     ` Bjorn Helgaas
2010-12-14 20:34       ` Linus Torvalds
2010-12-14 20:44         ` Linus Torvalds
2010-12-14 23:57           ` Bjorn Helgaas
2010-12-15  6:02           ` Bjorn Helgaas
2010-12-15  6:26         ` Bjorn Helgaas
2010-12-15  7:03           ` Linus Torvalds
2010-12-15 18:18             ` Bjorn Helgaas
2010-12-15 18:27               ` H. Peter Anvin
2010-12-15 19:21               ` Linus Torvalds
2010-12-08 21:37 ` Bjorn Helgaas [this message]
2010-12-10 20:30 ` [PATCH 1/5] resources: add arch hook for preventing allocation in reserved areas Jesse Barnes
2010-12-10 20:36   ` Jesse Barnes
2010-12-10 21:07     ` Bjorn Helgaas
2010-12-11  1:37       ` Jesse Barnes
2010-12-12  3:34         ` Linus Torvalds
2010-12-12  4:16           ` Jesse Barnes
2010-12-12 13:20             ` Rafael J. Wysocki
2010-12-13  5:43               ` Bjorn Helgaas
2010-12-13 13:47                 ` Ingo Molnar
2010-12-15  0:09                   ` Bjorn Helgaas

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=201012081437.34539.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=abelay@mit.edu \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®