<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/setup-bus.c, branch linux-2.6.31.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-08-30T15:37:25Z</updated>
<entry>
<title>PCI SR-IOV: correct broken resource alignment calculations</title>
<updated>2009-08-30T15:37:25Z</updated>
<author>
<name>Chris Wright</name>
</author>
<published>2009-08-28T20:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6faf17f6f1ffc586d16efc2f9fa2083a7785ee74'/>
<id>urn:sha1:6faf17f6f1ffc586d16efc2f9fa2083a7785ee74</id>
<content type='text'>
An SR-IOV capable device includes an SR-IOV PCIe capability which
describes the Virtual Function (VF) BAR requirements.  A typical SR-IOV
device can support multiple VFs whose BARs must be in a contiguous region,
effectively an array of VF BARs.  The BAR reports the size requirement
for a single VF.  We calculate the full range needed by simply multiplying
the VF BAR size with the number of possible VFs and create a resource
spanning the full range.

This all seems sane enough except it artificially inflates the alignment
requirement for the VF BAR.  The VF BAR need only be aligned to the size
of a single BAR not the contiguous range of VF BARs.  This can cause us
to fail to allocate resources for the BAR despite the fact that we
actually have enough space.

This patch adds a thin PCI specific layer over the generic
resource_alignment() function which is aware of the special nature of
VF BARs and does sorting and allocation based on the smaller alignment
requirement.

I recognize that while resource_alignment is generic, it's basically a
PCI helper.  An alternative to this patch is to add PCI VF BAR specific
information to struct resource.  I opted for the extra layer rather than
adding such PCI specific information to struct resource.  This does
have the slight downside that we don't cache the BAR size and re-read
for each alignment query (happens a small handful of times during boot
for each VF BAR).

Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Yu Zhao &lt;yu.zhao@intel.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: improve resource allocation under transparent bridges</title>
<updated>2009-06-11T19:04:07Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2009-04-24T03:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d09ee9687e027fc7d2c6b95daf05a8ef3ff06340'/>
<id>urn:sha1:d09ee9687e027fc7d2c6b95daf05a8ef3ff06340</id>
<content type='text'>
We could run out of space under under 4g, but devices under transparent
bridges can use 64bit resources, so keep trying on the parent bus until
we hit a non-transparent bridge.

Impact: better support for assigning unassigned resources

Reviewed-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI/x86: don't assume prefetchable ranges are 64bit</title>
<updated>2009-06-11T19:04:06Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2009-04-24T03:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f82de10d6b1d845155363c895c552e61b36b51a'/>
<id>urn:sha1:1f82de10d6b1d845155363c895c552e61b36b51a</id>
<content type='text'>
We should not assign 64bit ranges to PCI devices that only take 32bit
prefetchable addresses.

Try to set IORESOURCE_MEM_64 in 64bit resource of pci_device/pci_bridge
and make the bus resource only have that bit set when all devices under
it support 64bit prefetchable memory.  Use that flag to allocate
resources from that range.

Reported-by: Yannick &lt;yannick.roehlly@free.fr&gt;
Reviewed-by: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: cleanup debug output resources</title>
<updated>2009-04-22T21:49:25Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2009-04-14T01:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=681bf597215c62bd6f5ae1180a58a38997122b5b'/>
<id>urn:sha1:681bf597215c62bd6f5ae1180a58a38997122b5b</id>
<content type='text'>
Remove outputs for 0 sized resources and indicate prefetchability.

Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: Setup disabled bridges even if buses are added</title>
<updated>2009-04-06T18:25:06Z</updated>
<author>
<name>Yuji Shimada</name>
</author>
<published>2009-04-03T07:41:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=296ccb086dfb89b5b8d73ef08c795ffdff12a597'/>
<id>urn:sha1:296ccb086dfb89b5b8d73ef08c795ffdff12a597</id>
<content type='text'>
This patch sets up disabled bridges even if buses have already been
added.

pci_assign_unassigned_resources is called after buses are added.
pci_assign_unassigned_resources calls pci_bus_assign_resources.
pci_bus_assign_resources calls pci_setup_bridge to configure BARs of
bridges.

Currently pci_setup_bridge returns immediately if the bus have already
been added. So pci_assign_unassigned_resources can't configure BARs of
bridges that were added in a disabled state; this patch fixes the issue.

On logical hot-add, we need to prevent the kernel from re-initializing
bridges that have already been initialized. To achieve this,
pci_setup_bridge returns immediately if the bridge have already been
enabled.

We don't need to check whether the specified bus is a root bus or not.
pci_setup_bridge is not called on a root bus, because a root bus does
not have a bridge.

The patch adds a new helper function, pci_is_enabled. I made the
function name similar to pci_is_managed. The codes which use
enable_cnt directly are changed to use pci_is_enabled.

Acked-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Yuji Shimada &lt;shimada-yxb@necst.nec.co.jp&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: do not initialize bridges more than once</title>
<updated>2009-03-20T21:57:32Z</updated>
<author>
<name>Alex Chiang</name>
</author>
<published>2009-03-20T20:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b73e97d95c168cbc19bd1208c894077f25931ba1'/>
<id>urn:sha1:b73e97d95c168cbc19bd1208c894077f25931ba1</id>
<content type='text'>
In preparation for PCI core hotplug, we need to ensure that we do
not attempt to re-initialize bridges that have already been initialized.

We only need to worry about non-root buses, since we will not allow
root bus removal.

Reported-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: constify pci_bus_assign_resources()</title>
<updated>2009-03-20T02:29:35Z</updated>
<author>
<name>Andrew Morton</name>
</author>
<published>2009-02-18T18:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea7415512a07add2b09c070c9a5d1950833cf9b3'/>
<id>urn:sha1:ea7415512a07add2b09c070c9a5d1950833cf9b3</id>
<content type='text'>
drivers/pci/hotplug/fakephp.c: In function 'pci_rescan_bus':
drivers/pci/hotplug/fakephp.c:271: warning: passing argument 1 of 'pci_bus_assign_resources' discards qualifiers from pointer target type

Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: use dev_printk for PCI bus resource mssages</title>
<updated>2009-01-07T19:13:19Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2008-12-18T23:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a19f5df7d9696b9e53ba7c865816597057d5f76e'/>
<id>urn:sha1:a19f5df7d9696b9e53ba7c865816597057d5f76e</id>
<content type='text'>
Since pci_bus has a struct device, use dev_printk directly instead
of faking it by hand.

Signed-off-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: make PCI bus resource messages more meaningful</title>
<updated>2009-01-07T19:12:44Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2008-12-10T20:02:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29935282f24a6ce2f0a65c3d77fb7f695461f583'/>
<id>urn:sha1:29935282f24a6ce2f0a65c3d77fb7f695461f583</id>
<content type='text'>
Change PCI bus resource messages so they have a bit more context
and look like the rest of PCI, e.g.,

    - bus: 00 index 0 io port: [0x00-0xffff]
    - bus: 00 index 1 mmio: [0x000000-0xffffffff]
    + pci 0000:00: bus resource 0 io : [0x00-0xffff]
    + pci 0000:00: bus resource 1 mem: [0x000000-0xffffffff]

This also changes them from KERN_INFO to KERN_DEBUG.

Signed-off-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
<entry>
<title>PCI: use resource_size() everywhere.</title>
<updated>2008-10-20T17:54:28Z</updated>
<author>
<name>Zhao, Yu</name>
</author>
<published>2008-10-13T11:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=022edd86d7c864bc8fadc3c8ac4e6a464472ab05'/>
<id>urn:sha1:022edd86d7c864bc8fadc3c8ac4e6a464472ab05</id>
<content type='text'>
This is a cleanup that replaces the resource calculation formula with
resource_size().

Signed-off-by: Yu Zhao &lt;yu.zhao@intel.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
</entry>
</feed>
