<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/arch/microblaze/pci, branch v4.4.4</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.4.4'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2015-09-15T18:18:04+00:00</updated>
<entry>
<title>PCI: Revert "PCI: Call pci_read_bridge_bases() from core instead of arch code"</title>
<updated>2015-09-15T18:18:04+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2015-09-15T18:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=237865f195f6b10e4724ce49eeb3972641da882a'/>
<id>urn:sha1:237865f195f6b10e4724ce49eeb3972641da882a</id>
<content type='text'>
Revert dff22d2054b5 ("PCI: Call pci_read_bridge_bases() from core instead
of arch code").

Reading PCI bridge windows is not arch-specific in itself, but there is PCI
core code that doesn't work correctly if we read them too early.  For
example, Hannes found this case on an ARM Freescale i.mx6 board:

  pci_bus 0000:00: root bus resource [mem 0x01000000-0x01efffff]
  pci 0000:00:00.0: PCI bridge to [bus 01-ff]
  pci 0000:00:00.0: BAR 8: no space for [mem size 0x01000000] (mem window)
  pci 0000:01:00.0: BAR 2: failed to assign [mem size 0x00200000]
  pci 0000:01:00.0: BAR 1: failed to assign [mem size 0x00004000]
  pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00000100]

The 00:00.0 mem window needs to be at least 3MB: the 01:00.0 device needs
0x204100 of space, and mem windows are megabyte-aligned.

Bus sizing can increase a bridge window size, but never *decrease* it (see
d65245c3297a ("PCI: don't shrink bridge resources")).  Prior to
dff22d2054b5, ARM didn't read bridge windows at all, so the "original size"
was zero, and we assigned a 3MB window.

After dff22d2054b5, we read the bridge windows before sizing the bus.  The
firmware programmed a 16MB window (size 0x01000000) in 00:00.0, and since
we never decrease the size, we kept 16MB even though we only needed 3MB.
But 16MB doesn't fit in the host bridge aperture, so we failed to assign
space for the window and the downstream devices.

I think this is a defect in the PCI core: we shouldn't rely on the firmware
to assign sensible windows.

Ray reported a similar problem, also on ARM, with Broadcom iProc.

Issues like this are too hard to fix right now, so revert dff22d2054b5.

Reported-by: Hannes &lt;oe5hpm@gmail.com&gt;
Reported-by: Ray Jui &lt;rjui@broadcom.com&gt;
Link: http://lkml.kernel.org/r/CAAa04yFQEUJm7Jj1qMT57-LG7ZGtnhNDBe=PpSRa70Mj+XhW-A@mail.gmail.com
Link: http://lkml.kernel.org/r/55F75BB8.4070405@broadcom.com
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Yinghai Lu &lt;yinghai@kernel.org&gt;
Acked-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;</content>
</entry>
<entry>
<title>PCI: Call pci_read_bridge_bases() from core instead of arch code</title>
<updated>2015-07-23T15:13:29+00:00</updated>
<author>
<name>Lorenzo Pieralisi</name>
<email>lorenzo.pieralisi@arm.com</email>
</author>
<published>2015-07-09T10:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=dff22d2054b5dbb1889f20c03959dd0c494fab8c'/>
<id>urn:sha1:dff22d2054b5dbb1889f20c03959dd0c494fab8c</id>
<content type='text'>
When we scan a PCI bus, we read PCI-PCI bridge window registers with
pci_read_bridge_bases() so we can validate the resource hierarchy.  Most
architectures call pci_read_bridge_bases() from pcibios_fixup_bus(), but
PCI-PCI bridges are not arch-specific, so this doesn't need to be in
arch-specific code.

Call pci_read_bridge_bases() directly from the PCI core instead of from
arch code.

For alpha and mips, we now call pci_read_bridge_bases() always; previously
we only called it if PCI_PROBE_ONLY was set.

[bhelgaas: changelog]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Ralf Baechle &lt;ralf@linux-mips.org&gt;
CC: James E.J. Bottomley &lt;jejb@parisc-linux.org&gt;
CC: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
CC: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Richard Henderson &lt;rth@twiddle.net&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: David Howells &lt;dhowells@redhat.com&gt;
CC: Russell King &lt;linux@arm.linux.org.uk&gt;
CC: Tony Luck &lt;tony.luck@intel.com&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: Ingo Molnar &lt;mingo@redhat.com&gt;
CC: Guenter Roeck &lt;linux@roeck-us.net&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Chris Zankel &lt;chris@zankel.net&gt;</content>
</entry>
<entry>
<title>PCI: Assign resources before drivers claim devices (pci_scan_root_bus())</title>
<updated>2015-03-19T15:17:13+00:00</updated>
<author>
<name>Yijing Wang</name>
<email>wangyijing@huawei.com</email>
</author>
<published>2015-03-16T03:18:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=b97ea289cf6aff8d4cbcefe2b707bb9b00a73c73'/>
<id>urn:sha1:b97ea289cf6aff8d4cbcefe2b707bb9b00a73c73</id>
<content type='text'>
Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
devices on it, and called pci_bus_add_devices(), which made the devices
available for drivers to claim them.

Most callers assigned resources to devices after pci_scan_root_bus()
returns, which may be after drivers have claimed the devices.  This is
incorrect; the PCI core should not change device resources while a driver
is managing the device.

Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
resource assignment in the callers.

Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
after pci_scan_root_bus(), so we only need to remove the first call:

  pci_common_init_dev
    pcibios_init_hw
      pci_scan_root_bus
        pci_bus_add_devices        # first call
    pci_bus_assign_resources
    pci_bus_add_devices            # second call

[bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
return early if xtensa platform_pcibios_fixup() fails]
Signed-off-by: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Richard Henderson &lt;rth@twiddle.net&gt;
CC: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
CC: Matt Turner &lt;mattst88@gmail.com&gt;
CC: David Howells &lt;dhowells@redhat.com&gt;
CC: Tony Luck &lt;tony.luck@intel.com&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Ralf Baechle &lt;ralf@linux-mips.org&gt;
CC: Koichi Yasutake &lt;yasutake.koichi@jp.panasonic.com&gt;
CC: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
CC: Chris Zankel &lt;chris@zankel.net&gt;
CC: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>microblaze/PCI: Clip bridge windows to fit in upstream windows</title>
<updated>2015-01-16T16:04:43+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yinghai@kernel.org</email>
</author>
<published>2015-01-15T22:21:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=576e4385ff59f52ca0e9a6a953a55f1f76fc196b'/>
<id>urn:sha1:576e4385ff59f52ca0e9a6a953a55f1f76fc196b</id>
<content type='text'>
Every PCI-PCI bridge window should fit inside an upstream bridge window
because orphaned address space is unreachable from the primary side of the
upstream bridge.  If we inherit invalid bridge windows that overlap an
upstream window from firmware, clip them to fit and update the bridge
accordingly.

[bhelgaas: changelog]
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: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>microblaze: Fix IO space breakage after of_pci_range_to_resource() change</title>
<updated>2014-10-27T07:29:54+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2014-10-27T07:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=70dcd942dc4af3cc6c3dcc2ba499cd841c7f65a7'/>
<id>urn:sha1:70dcd942dc4af3cc6c3dcc2ba499cd841c7f65a7</id>
<content type='text'>
Commit 0b0b0893d49b "of/pci: Fix the conversion of IO ranges into IO
resources" changed the behaviour of of_pci_range_to_resource().

The issue is described here:
"powerpc/pci: Fix IO space breakage after of_pci_range_to_resource()
change"
(sha1: aeba3731b150188685225b510886f1370d8814de)

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze into next</title>
<updated>2014-06-05T23:15:33+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-05T23:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=2b03adc1911d1c84cb7fad8b424234f589547cb3'/>
<id>urn:sha1:2b03adc1911d1c84cb7fad8b424234f589547cb3</id>
<content type='text'>
Pull Microblaze updates from Michal Simek:
 - cleanup PCI and DMA handling
 - use generic device.h
 - some cleanups

* tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix typo in head.S s/substract/subtract/
  microblaze: remove check for CONFIG_XILINX_CONSOLE
  microblaze: Use generic device.h
  microblaze: Do not setup empty unmap_sg function
  microblaze: Remove device_to_mask
  microblaze: Clean device dma_ops structure
  microblaze: Cleanup PCI_DRAM_OFFSET handling
  microblaze: Do not setup pci_dma_ops
  microblaze: Return default dma operations
  microblaze: Enable SERIAL_OF_PLATFORM
</content>
</entry>
<entry>
<title>microblaze: Cleanup PCI_DRAM_OFFSET handling</title>
<updated>2014-06-04T04:59:57+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2014-05-16T11:37:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=193bca5934db1ca1d0ffcedf551030ff5556a07c'/>
<id>urn:sha1:193bca5934db1ca1d0ffcedf551030ff5556a07c</id>
<content type='text'>
PCI_DRAM_OFFSET/pci_dram_offset is 0 all the time and there
is no difference for PCI and !PCI cases.
Also remove the whole code which setup archdata.dma_data
which is completely unused.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>microblaze: Do not setup pci_dma_ops</title>
<updated>2014-06-04T04:59:56+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2014-05-16T11:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=28d1880c6872af3d1c17bc46da5795b9eba04bee'/>
<id>urn:sha1:28d1880c6872af3d1c17bc46da5795b9eba04bee</id>
<content type='text'>
pci_dma_ops are dma_direct_ops which are setup
by default that's why not setup it again.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
</entry>
<entry>
<title>PCI: Move Open Firmware devspec attribute to PCI common code</title>
<updated>2014-04-30T20:48:41+00:00</updated>
<author>
<name>Sebastian Ott</name>
<email>sebott@linux.vnet.ibm.com</email>
</author>
<published>2014-04-17T17:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=dfc73e7acd9925b434a355eeeed86d44cb435f9c'/>
<id>urn:sha1:dfc73e7acd9925b434a355eeeed86d44cb435f9c</id>
<content type='text'>
Move the devspec OF attribute to PCI common code's set of device attributes
since it's not architecture dependent.  As a side effect microblaze and
powerpc no longer need to use pcibios_add_platform_entries().

[bhelgaas: fold in #include for compile error]
Link: https://lkml.kernel.org/r/alpine.LFD.2.11.1404141101500.1529@denkbrett
Signed-off-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;</content>
</entry>
<entry>
<title>microblaze/PCI: Use default pcibios_enable_device()</title>
<updated>2014-03-19T21:00:14+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2014-02-26T18:26:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=cd3183ba228bf88b242cc7dca219020601df0927'/>
<id>urn:sha1:cd3183ba228bf88b242cc7dca219020601df0927</id>
<content type='text'>
We don't need anything arch-specific in pcibios_enable_device(), so drop
the arch implementation and use the default generic one.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: microblaze-uclinux@itee.uq.edu.au
</content>
</entry>
</feed>
