1. 24 3月, 2015 1 次提交
  2. 25 9月, 2014 1 次提交
  3. 28 5月, 2014 1 次提交
  4. 28 4月, 2014 1 次提交
    • G
      powerpc/eeh: No hotplug on permanently removed dev · d2b0f6f7
      Gavin Shan 提交于
      The issue was detected in a bit complicated test case where
      we have multiple hierarchical PEs shown as following figure:
      
                      +-----------------+
                      | PE#3     p2p#0  |
                      |          p2p#1  |
                      +-----------------+
                              |
                      +-----------------+
                      | PE#4     pdev#0 |
                      |          pdev#1 |
                      +-----------------+
      
      PE#4 (have 2 PCI devices) is the child of PE#3, which has 2 p2p
      bridges. We accidentally had less-known scenario: PE#4 was removed
      permanently from the system because of permanent failure (e.g.
      exceeding the max allowd failure times in last hour), then we detects
      EEH errors on PE#3 and tried to recover it. However, eeh_dev instances
      for pdev#0/1 were not detached from PE#4, which was still connected to
      PE#3. All of that was because of the fact that we rely on count-based
      pcibios_release_device(), which isn't reliable enough. When doing
      recovery for PE#3, we still apply hotplug on PE#4 and pdev#0/1, which
      are not valid any more. Eventually, we run into kernel crash.
      
      The patch fixes above issue from two aspects. For unplug, we simply
      skip those permanently removed PE, whose state is (EEH_PE_STATE_ISOLATED
      && !EEH_PE_STATE_RECOVERING) and its frozen count should be greater
      than EEH_MAX_ALLOWED_FREEZES. For plug, we marked all permanently
      removed EEH devices with EEH_DEV_REMOVED and return 0xFF's on read
      its PCI config so that PCI core will omit them.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d2b0f6f7
  5. 22 12月, 2013 1 次提交
    • Y
      PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev · fc279850
      Yinghai Lu 提交于
      These interfaces:
      
        pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)
      
      took a pci_dev, but they really depend only on the pci_bus.  And we want to
      use them in resource allocation paths where we have the bus but not a
      device, so this patch converts them to take the pci_bus instead of the
      pci_dev:
      
        pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)
      
      In fact, with standard PCI-PCI bridges, they only depend on the host
      bridge, because that's the only place address translation occurs, but
      we aren't going that far yet.
      
      [bhelgaas: changelog]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      fc279850
  6. 30 10月, 2013 1 次提交
  7. 14 8月, 2013 1 次提交
  8. 24 7月, 2013 1 次提交
    • G
      powerpc/pci: Partial tree hotplug support · ab444ec9
      Gavin Shan 提交于
      When EEH error happens to one specific PE, the device drivers
      of its attached EEH devices (PCI devices) are checked to see
      the further action: reset with complete hotplug, or reset without
      hotplug. However, that's not enough for those PCI devices whose
      drivers can't support EEH, or those PCI devices without driver.
      So we need do so-called "partial hotplug" on basis of PCI devices.
      In the situation, part of PCI devices of the specific PE are
      unplugged and plugged again after PE reset.
      
      The patch changes pcibios_add_pci_devices() so that it can support
      full hotplug and so-called "partial" hotplug based on device-tree
      or real hardware. It's notable that pci_of_scan.c has been changed
      for a bit in order to support the "partial" hotplug based on dev-tree.
      
      Most of the generic code already supports that, we just need to
      plumb it properly on our side.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ab444ec9
  9. 06 6月, 2013 1 次提交
    • G
      PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) · 8b1fce04
      Gu Zheng 提交于
      Use the new pci_alloc_dev(bus) to replace the existing using of
      alloc_pci_dev(void).
      
      [bhelgaas: drop pci_bus ref later in pci_release_dev()]
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      8b1fce04
  10. 18 5月, 2013 1 次提交
  11. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  12. 03 7月, 2012 1 次提交
    • W
      powerpc: Fix kernel-doc warning · f0a875fd
      Wanpeng Li 提交于
      Warning(arch/powerpc/kernel/pci_of_scan.c:210): Excess function parameter 'node' description in 'of_scan_pci_bridge'
      Warning(arch/powerpc/kernel/vio.c:636): No description found for parameter 'desired'
      Warning(arch/powerpc/kernel/vio.c:636): Excess function parameter 'new_desired' description in 'vio_cmo_set_dev_desired'
      Warning(arch/powerpc/kernel/vio.c:1270): No description found for parameter 'viodrv'
      Warning(arch/powerpc/kernel/vio.c:1270): Excess function parameter 'drv' description in '__vio_register_driver'
      Warning(arch/powerpc/kernel/vio.c:1289): No description found for parameter 'viodrv'
      Warning(arch/powerpc/kernel/vio.c:1289): Excess function parameter 'driver' description in 'vio_unregister_driver'
      Signed-off-by: NWanpeng Li <liwp@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      f0a875fd
  13. 14 6月, 2012 2 次提交
  14. 21 3月, 2012 1 次提交
    • B
      powerpc/PCI: convert devtree bus addresses to resource · 39aa146a
      Bjorn Helgaas 提交于
      Normal PCI enumeration via PCI config space uses __pci_read_base(), where
      the PCI core applies any bus-to-resource offset.  But powerpc doesn't use
      that path when enumerating via the device tree.
      
      In 6c5705fe, I converted powerpc to use the PCI core bus-to-resource
      conversion, but I missed these powerpc-specific paths.  Some powerpc
      platforms fail to boot ("Cannot allocate resource region," "device not
      available," etc.) between that commit and this one.
      
      This adds the corresponding bus-to-resource conversion in the paths that
      read BAR values from the OF device tree.
      
      CC: Anton Blanchard <anton@samba.org>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      39aa146a
  15. 01 11月, 2011 1 次提交
  16. 08 6月, 2011 1 次提交
    • B
      pci/of: Match PCI devices to OF nodes dynamically · 98d9f30c
      Benjamin Herrenschmidt 提交于
      powerpc has two different ways of matching PCI devices to their
      corresponding OF node (if any) for historical reasons. The ppc64 one
      does a scan looking for matching bus/dev/fn, while the ppc32 one does a
      scan looking only for matching dev/fn on each level in order to be
      agnostic to busses being renumbered (which Linux does on some
      platforms).
      
      This removes both and instead moves the matching code to the PCI core
      itself. It's the most logical place to do it: when a pci_dev is created,
      we know the parent and thus can do a single level scan for the matching
      device_node (if any).
      
      The benefit is that all archs now get the matching for free. There's one
      hook the arch might want to provide to match a PHB bus to its device
      node. A default weak implementation is provided that looks for the
      parent device device node, but it's not entirely reliable on powerpc for
      various reasons so powerpc provides its own.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      98d9f30c
  17. 05 2月, 2011 1 次提交
    • G
      powerpc/pci: Make both ppc32 and ppc64 use sysdata for pci_controller · b5d937de
      Grant Likely 提交于
      Currently, ppc32 uses sysdata for the pci_controller pointer, and
      ppc64 uses it to hold the device_node pointer.  This patch moves the
      of_node pointer into (struct pci_bus*)->dev.of_node and
      (struct pci_dev*)->dev.of_node so that sysdata can be converted to always
      use the pci_controller pointer instead.  It also fixes up the
      allocating of pci devices so that the of_node pointer gets assigned
      consistently and increments the ref count.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b5d937de
  18. 24 8月, 2010 2 次提交
  19. 21 5月, 2010 1 次提交
  20. 09 2月, 2010 1 次提交
  21. 29 1月, 2010 3 次提交
  22. 28 8月, 2009 1 次提交