From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Alex Williamson <alex.williamson@hp.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Grant Grundler <grundler@parisc-linux.org>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Alex Chiang <achiang@hp.com>
Subject: Re: [PATCH] pci: fix bridge 64bit flag setting
Date: Tue, 01 Dec 2009 11:15:32 -0800 [thread overview]
Message-ID: <4B156B54.9080603@kernel.org> (raw)
In-Reply-To: <4B15604D.2090202@kernel.org>
Yinghai Lu wrote:
> Bjorn Helgaas wrote:
>> On Tuesday 01 December 2009 12:03:57 am Yinghai Lu wrote:
>>> Alex found one system that one pci bridge pref mmio 64 is not set correctly.
>>> aka, the upper32 base/limit is not cleaned.
>>> he found that bridge is supporting 64 bit pref mmio, but device under that
>>> does not support that. so that IORESOURCE_MEM_64 get cleared in pbus_size_mem()
>> I think it's wrong that pbus_size_mem() fiddles with IORESOURCE_MEM_64
>> in bus resources based on where BARs of devices on that bus live. That
>> feels fragile.
>
> yes. need more clean up.
other than we should store PCI_PREF_RANGE_TYPE_64, and use it in pci_setup_bridge
others should be ok.
for pcie hot plug, the bridge IORESOURCE_MEM_64 could be set, and MMIO > 4g, and later when plug one device doesn't
support 64bit mmio pref, and
pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
resource_size_t size, resource_size_t align,
resource_size_t min, unsigned int type_mask,
void (*alignf)(void *, struct resource *, resource_size_t,
resource_size_t),
void *alignf_data)
{
int i, ret = -ENOMEM;
resource_size_t max = -1;
type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
/* don't allocate too high if the pref mem doesn't support 64bit*/
if (!(res->flags & IORESOURCE_MEM_64))
max = PCIBIOS_MAX_MEM_32;
will make sure that allocation will fail.
so it will get range freom mmio non pref range. or fail there again.
then we will release the bridge pref mmio...
YH
next prev parent reply other threads:[~2009-12-01 19:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 21:22 [PATCH] PCI: Always set prefetchable base/limit upper32 registers Alex Williamson
2009-11-30 21:36 ` Yinghai Lu
2009-11-30 21:43 ` Alex Williamson
2009-11-30 21:52 ` Yinghai Lu
2009-11-30 22:01 ` Alex Williamson
2009-11-30 22:12 ` Yinghai Lu
2009-11-30 22:19 ` Alex Williamson
2009-11-30 23:32 ` Yinghai Lu
2009-11-30 23:53 ` Alex Williamson
2009-12-01 0:00 ` Yinghai Lu
2009-12-01 1:56 ` Alex Williamson
2009-12-01 2:26 ` Yinghai Lu
2009-12-01 2:50 ` Yinghai Lu
2009-12-01 3:23 ` Alex Williamson
2009-12-01 6:35 ` Yinghai Lu
2009-12-01 6:55 ` Alex Williamson
2009-12-01 7:03 ` [PATCH] pci: fix bridge 64bit flag setting Yinghai Lu
2009-12-01 15:38 ` Bjorn Helgaas
2009-12-01 18:28 ` Yinghai Lu
2009-12-01 19:15 ` Yinghai Lu [this message]
2009-12-01 0:22 ` [PATCH] PCI: Always set prefetchable base/limit upper32 registers Yinghai Lu
2009-12-01 0:00 ` Grant Grundler
2009-12-01 0:09 ` Yinghai Lu
2009-12-01 0:15 ` Grant Grundler
2009-11-30 23:58 ` Grant Grundler
2009-11-30 21:42 ` Grant Grundler
2009-11-30 21:43 ` Alex Williamson
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=4B156B54.9080603@kernel.org \
--to=yinghai@kernel.org \
--cc=achiang@hp.com \
--cc=alex.williamson@hp.com \
--cc=bjorn.helgaas@hp.com \
--cc=grundler@parisc-linux.org \
--cc=ink@jurassic.park.msu.ru \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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