1. 23 8月, 2017 1 次提交
  2. 21 6月, 2016 1 次提交
    • G
      powerpc/pci: Delay populating pdn · 8cc7581c
      Gavin Shan 提交于
      The pdn (struct pci_dn) instances are allocated from memblock or
      bootmem when creating PCI controller (hoses) in setup_arch(). PCI
      hotplug, which will be supported by proceeding patches, releases
      PCI device nodes and their corresponding pdn on unplugging event.
      The memory chunks for pdn instances allocated from memblock or
      bootmem are hard to reused after being released.
      
      This delays creating pdn by pci_devs_phb_init() from setup_arch()
      to core_initcall() so that they are allocated from slab. The memory
      consumed by pdn can be released to system without problem during
      PCI unplugging time. It indicates that pci_dn is unavailable in
      setup_arch() and the the fixup on pdn (like AGP's) can't be carried
      out that time. We have to do that in pcibios_root_bridge_prepare()
      on maple/pasemi/powermac platforms where/when the pdn is available.
      pcibios_root_bridge_prepare is called from subsys_initcall() which
      is executed after core_initcall() so the code flow does not change.
      
      At the mean while, the EEH device is created when pdn is populated,
      meaning pdn and EEH device have same life cycle. In turn, we needn't
      call eeh_dev_init() to create EEH device explicitly.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8cc7581c
  3. 11 4月, 2015 3 次提交
  4. 31 1月, 2015 1 次提交
  5. 10 11月, 2014 1 次提交
  6. 27 6月, 2014 1 次提交
    • G
      of: Migrate of_find_node_by_name() users to for_each_node_by_name() · ccdb8ed3
      Grant Likely 提交于
      There are a bunch of users open coding the for_each_node_by_name() by
      calling of_find_node_by_name() directly instead of using the macro. This
      is getting in the way of some cleanups, and the possibility of removing
      of_find_node_by_name() entirely. Clean it up so that all the users are
      consistent.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Takashi Iwai <tiwai@suse.de>
      ccdb8ed3
  7. 06 5月, 2013 1 次提交
    • B
      powerpc/pci: Support per-aperture memory offset · 3fd47f06
      Benjamin Herrenschmidt 提交于
      The PCI core supports an offset per aperture nowadays but our arch
      code still has a single offset per host bridge representing the
      difference betwen CPU memory addresses and PCI MMIO addresses.
      
      This is a problem as new machines and hypervisor versions are
      coming out where the 64-bit windows will have a different offset
      (basically mapped 1:1) from the 32-bit windows.
      
      This fixes it by using separate offsets. In the long run, we probably
      want to get rid of that intermediary struct pci_controller and have
      those directly stored into the pci_host_bridge as they are parsed
      but this will be a more invasive change.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fd47f06
  8. 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
  9. 24 2月, 2012 1 次提交
  10. 30 9月, 2011 1 次提交
  11. 12 7月, 2011 1 次提交
  12. 10 6月, 2011 1 次提交
  13. 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
  14. 31 3月, 2011 1 次提交
  15. 29 3月, 2011 1 次提交
  16. 24 8月, 2010 1 次提交
  17. 04 12月, 2009 1 次提交
  18. 02 9月, 2009 1 次提交
    • B
      powerpc: Fix some late PowerMac G5 with PCIe ATI graphics · cede3930
      Benjamin Herrenschmidt 提交于
      A misconfiguration by the firmware of the U4 PCIe bridge on PowerMac G5
      with the U4 bridge (latest generations, may also affect the iMac G5
      "iSight") is causing us to re-assign the PCI BARs of the video card,
      which can get it out of sync with the firmware, thus breaking offb.
      
      This works around it by fixing up the bridge configuration properly
      at boot time. It also fixes a bug where the firmware provides us with
      an incorrect set of accessible regions in the device-tree.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cede3930
  19. 08 1月, 2009 1 次提交
  20. 16 12月, 2008 1 次提交
  21. 18 4月, 2008 1 次提交
  22. 20 12月, 2007 7 次提交
  23. 11 12月, 2007 1 次提交
  24. 10 12月, 2007 1 次提交
  25. 17 8月, 2007 2 次提交
  26. 29 6月, 2007 2 次提交
  27. 14 6月, 2007 1 次提交
    • B
      [POWERPC] Rewrite IO allocation & mapping on powerpc64 · 3d5134ee
      Benjamin Herrenschmidt 提交于
      This rewrites pretty much from scratch the handling of MMIO and PIO
      space allocations on powerpc64.  The main goals are:
      
       - Get rid of imalloc and use more common code where possible
       - Simplify the current mess so that PIO space is allocated and
         mapped in a single place for PCI bridges
       - Handle allocation constraints of PIO for all bridges including
         hot plugged ones within the 2GB space reserved for IO ports,
         so that devices on hotplugged busses will now work with drivers
         that assume IO ports fit in an int.
       - Cleanup and separate tracking of the ISA space in the reserved
         low 64K of IO space. No ISA -> Nothing mapped there.
      
      I booted a cell blade with IDE on PIO and MMIO and a dual G5 so
      far, that's it :-)
      
      With this patch, all allocations are done using the code in
      mm/vmalloc.c, though we use the low level __get_vm_area with
      explicit start/stop constraints in order to manage separate
      areas for vmalloc/vmap, ioremap, and PCI IOs.
      
      This greatly simplifies a lot of things, as you can see in the
      diffstat of that patch :-)
      
      A new pair of functions pcibios_map/unmap_io_space() now replace
      all of the previous code that used to manipulate PCI IOs space.
      The allocation is done at mapping time, which is now called from
      scan_phb's, just before the devices are probed (instead of after,
      which is by itself a bug fix). The only other caller is the PCI
      hotplug code for hot adding PCI-PCI bridges (slots).
      
      imalloc is gone, as is the "sub-allocation" thing, but I do beleive
      that hotplug should still work in the sense that the space allocation
      is always done by the PHB, but if you unmap a child bus of this PHB
      (which seems to be possible), then the code should properly tear
      down all the HPTE mappings for that area of the PHB allocated IO space.
      
      I now always reserve the first 64K of IO space for the bridge with
      the ISA bus on it. I have moved the code for tracking ISA in a separate
      file which should also make it smarter if we ever are capable of
      hot unplugging or re-plugging an ISA bridge.
      
      This should have a side effect on platforms like powermac where VGA IOs
      will no longer work. This is done on purpose though as they would have
      worked semi-randomly before. The idea at this point is to isolate drivers
      that might need to access those and fix them by providing a proper
      function to obtain an offset to the legacy IOs of a given bus.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3d5134ee
  28. 07 5月, 2007 1 次提交
  29. 24 4月, 2007 1 次提交
  30. 13 4月, 2007 1 次提交