<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/bus.c, branch linux-3.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-01-16T16:04:42Z</updated>
<entry>
<title>PCI: Add pci_bus_clip_resource() to clip to fit upstream window</title>
<updated>2015-01-16T16:04:42Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2015-01-15T22:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f7e7aee2f37119a32e6e8b63250922442528961'/>
<id>urn:sha1:0f7e7aee2f37119a32e6e8b63250922442528961</id>
<content type='text'>
Add pci_bus_clip_resource().  If a PCI-PCI bridge window overlaps an
upstream bridge window but is not completely contained by it, this clips
the downstream window so it fits inside the upstream one.

No functional change (this adds the function but no callers).

[bhelgaas: changelog, split into separate patch]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491
Reported-by: Marek Kordik &lt;kordikmarek@gmail.com&gt;
Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v3.16+</content>
</entry>
<entry>
<title>PCI: Move EXPORT_SYMBOL so it immediately follows function/variable</title>
<updated>2014-06-10T19:36:10Z</updated>
<author>
<name>Ryan Desfosses</name>
</author>
<published>2014-04-25T20:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7fe943421396b61b9f7a97c2554ed999e0f3658'/>
<id>urn:sha1:b7fe943421396b61b9f7a97c2554ed999e0f3658</id>
<content type='text'>
Move EXPORT_SYMBOL so it immediately follows the function or variable.

No functional change.

[bhelgaas: squash similar changes, fix hotplug, probe, rom, search, too]
Signed-off-by: Ryan Desfosses &lt;ryan@desfo.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Make pci_bus_add_device() void</title>
<updated>2014-05-30T15:34:27Z</updated>
<author>
<name>Yijing Wang</name>
</author>
<published>2014-05-30T03:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c893d133eaccdda2516a3e71cd05a7dac2e14b00'/>
<id>urn:sha1:c893d133eaccdda2516a3e71cd05a7dac2e14b00</id>
<content type='text'>
pci_bus_add_device() always returns 0, so there's no point in returning
anything at all.  Make it a void function and remove the tests of the
return value from the callers.

[bhelgaas: changelog, remove unused "err" from i82875p_setup_overfl_dev()]
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Remove unnecessary includes of &lt;linux/init.h&gt;</title>
<updated>2014-04-14T22:12:37Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2014-04-05T21:13:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56a3d18279f00c7ccbcdc193ceaf1a2f88c51457'/>
<id>urn:sha1:56a3d18279f00c7ccbcdc193ceaf1a2f88c51457</id>
<content type='text'>
None of these files are actually using any __init type directives and hence
don't need to include &lt;linux/init.h&gt;.   Most are just a left over from
__devinit and __cpuinit removal, or simply due to code getting copied from
one driver to the next.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Change pci_bus_alloc_resource() type_mask to unsigned long</title>
<updated>2014-03-19T21:00:16Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2014-03-07T20:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=664c28480c90fb8541bcdd1d4b349e9436165ec7'/>
<id>urn:sha1:664c28480c90fb8541bcdd1d4b349e9436165ec7</id>
<content type='text'>
The pci_bus_alloc_resource() "type_mask" parameter is used to compare with
the "flags" member of a struct resource, so it should be the same type,
namely "unsigned long".

No functional change because all current IORESOURCE_* flags fit in 32 bits.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Check all IORESOURCE_TYPE_BITS in pci_bus_alloc_from_region()</title>
<updated>2014-03-19T21:00:16Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2014-03-07T20:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa11fc58dc71c27701b1f9a529a36a38d4337722'/>
<id>urn:sha1:aa11fc58dc71c27701b1f9a529a36a38d4337722</id>
<content type='text'>
When allocating space from a bus resource, i.e., from apertures leading to
this bus, make sure the entire resource type matches.  The previous code
assumed the IORESOURCE_TYPE_BITS field was a bitmask with only a single bit
set, but this is not true.  IORESOURCE_TYPE_BITS is really an enumeration,
and we have to check all the bits.

See 72dcb1197228 ("resources: Add register address resource type").

No functional change.  If we used this path for allocating IRQs, DMA
channels, or bus numbers, this would fix a bug because those types are
indistinguishable when masked by IORESOURCE_IO | IORESOURCE_MEM.  But we
don't, so this shouldn't make any difference.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Don't check resource_size() in pci_bus_alloc_resource()</title>
<updated>2014-03-19T21:00:16Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2014-03-10T16:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e20fa6609a0076def469aeb799b1c25558e70042'/>
<id>urn:sha1:e20fa6609a0076def469aeb799b1c25558e70042</id>
<content type='text'>
Paul reported that after f75b99d5a77d ("PCI: Enforce bus address limits in
resource allocation") on a 32-bit kernel (CONFIG_PHYS_ADDR_T_64BIT not
set), intel-gtt complained "can't ioremap flush page - no chipset
flushing".  In addition, other PCI resource allocations, e.g., for bridge
windows, failed.

This happens because we incorrectly skip bus resources of
[mem 0x00000000-0xffffffff] because we think they are of size zero.
When resource_size_t is 32 bits wide, resource_size() on
[mem 0x00000000-0xffffffff] returns 0 because (r-&gt;end - r-&gt;start + 1)
overflows.

Therefore, we can't use "resource_size() == 0" to decide that allocation
from this resource will fail.  allocate_resource() should fail anyway if it
can't satisfy the address constraints, so we should just depend on that.

A [mem 0x00000000-0xffffffff] bus resource is obviously not really valid,
but we do fall back to it as a default when we don't have information about
host bridge apertures.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=71611
Fixes: f75b99d5a77d PCI: Enforce bus address limits in resource allocation
Reported-and-tested-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>Merge branch 'pci/resource' into next</title>
<updated>2014-01-10T21:23:15Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2014-01-10T21:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96702be560374ee7e7139a34cab03554129abbb4'/>
<id>urn:sha1:96702be560374ee7e7139a34cab03554129abbb4</id>
<content type='text'>
* pci/resource:
  PCI: Allocate 64-bit BARs above 4G when possible
  PCI: Enforce bus address limits in resource allocation
  PCI: Split out bridge window override of minimum allocation address
  agp/ati: Use PCI_COMMAND instead of hard-coded 4
  agp/intel: Use CPU physical address, not bus address, for ioremap()
  agp/intel: Use pci_bus_address() to get GTTADR bus address
  agp/intel: Use pci_bus_address() to get MMADR bus address
  agp/intel: Support 64-bit GMADR
  agp/intel: Rename gtt_bus_addr to gtt_phys_addr
  drm/i915: Rename gtt_bus_addr to gtt_phys_addr
  agp: Use pci_resource_start() to get CPU physical address for BAR
  agp: Support 64-bit APBASE
  PCI: Add pci_bus_address() to get bus address of a BAR
  PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
  PCI: Change pci_bus_region addresses to dma_addr_t
</content>
</entry>
<entry>
<title>PCI: Allocate 64-bit BARs above 4G when possible</title>
<updated>2014-01-07T23:24:33Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2013-12-20T17:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d56dbf5bab8ce44c5407bb099f71987f58d18bb4'/>
<id>urn:sha1:d56dbf5bab8ce44c5407bb099f71987f58d18bb4</id>
<content type='text'>
Try to allocate space for 64-bit BARs above 4G first, to preserve the space
below 4G for 32-bit BARs.  If there's no space above 4G available, fall
back to allocating anywhere.

[bhelgaas: reworked starting from http://lkml.kernel.org/r/1387485843-17403-2-git-send-email-yinghai@kernel.org]
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Enforce bus address limits in resource allocation</title>
<updated>2014-01-07T23:24:33Z</updated>
<author>
<name>Yinghai Lu</name>
</author>
<published>2013-12-20T16:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f75b99d5a77d63f20e07bd276d5a427808ac8ef6'/>
<id>urn:sha1:f75b99d5a77d63f20e07bd276d5a427808ac8ef6</id>
<content type='text'>
When allocating space for 32-bit BARs, we previously limited RESOURCE
addresses so they would fit in 32 bits.  However, the BUS address need not
be the same as the resource address, and it's the bus address that must fit
in the 32-bit BAR.

This patch adds:

  - pci_clip_resource_to_region(), which clips a resource so it contains
    only the range that maps to the specified bus address region, e.g., to
    clip a resource to 32-bit bus addresses, and

  - pci_bus_alloc_from_region(), which allocates space for a resource from
    the specified bus address region,

and changes pci_bus_alloc_resource() to allocate space for 64-bit BARs from
the entire bus address region, and space for 32-bit BARs from only the bus
address region below 4GB.

If we had this window:

  pci_root HWP0002:0a: host bridge window [mem 0xf0180000000-0xf01fedfffff] (bus address [0x80000000-0xfedfffff])

we previously could not put a 32-bit BAR there, because the CPU addresses
don't fit in 32 bits.  This patch fixes this, so we can use this space for
32-bit BARs.

It's also possible (though unlikely) to have resources with 32-bit CPU
addresses but bus addresses above 4GB.  In this case the previous code
would allocate space that a 32-bit BAR could not map.

Remove PCIBIOS_MAX_MEM_32, which is no longer used.

[bhelgaas: reworked starting from http://lkml.kernel.org/r/1386658484-15774-3-git-send-email-yinghai@kernel.org]
Signed-off-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
