1. 09 3月, 2012 1 次提交
    • G
      powerpc/eeh: Introduce EEH device · eb740b5f
      Gavin Shan 提交于
      Original EEH implementation depends on struct pci_dn heavily. However,
      EEH shouldn't depend on that actually because EEH needn't share much
      information with other PCI components. That's to say, EEH should have
      worked independently.
      
      The patch introduces struct eeh_dev so that EEH core components needn't
      be working based on struct pci_dn in future. Also, struct pci_dn, struct
      eeh_dev instances are created in dynamic fasion and the binding with EEH
      device, OF node, PCI device is implemented as well.
      
      The EEH devices are created after PHBs are detected and initialized, but
      PCI emunation hasn't started yet. Apart from that, PHB might be created
      dynamically through DLPAR component and the EEH devices should be creatd
      as well. Another case might be OF node is created dynamically by DR
      (Dynamic Reconfiguration), which has been defined by PAPR. For those OF
      nodes created by DR, EEH devices should be also created accordingly. The
      binding between EEH device and OF node is done while the EEH device is
      initially created.
      
      The binding between EEH device and PCI device should be done after PCI
      emunation is done. Besides, PCI hotplug also needs the binding so that
      the EEH devices could be traced from the newly coming PCI buses or PCI
      devices.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      eb740b5f
  2. 01 11月, 2011 1 次提交
  3. 27 7月, 2011 1 次提交
  4. 28 2月, 2011 1 次提交
  5. 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
  6. 24 7月, 2010 5 次提交
    • J
      of: remove of_default_bus_ids · c0dd394c
      Jonas Bonn 提交于
      This list used was by only two platforms with all other platforms defining an
      own list of valid bus id's to pass to of_platform_bus_probe.  This patch:
      
      i)   copies the default list to the two platforms that depended on it (powerpc)
      ii)  remove the usage of of_default_bus_ids in of_platform_bus_probe
      iii) removes the definition of the list from all architectures that defined it
      
      Passing a NULL 'matches' parameter to of_platform_bus_probe is still valid; the
      function returns no error in that case as the NULL value is equivalent to an
      empty list.
      Signed-off-by: NJonas Bonn <jonas@southpole.se>
      [grant.likely@secretlab.ca: added __initdata annotations, warn on and return error on missing match table, and fix whitespace errors]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      c0dd394c
    • J
      of: make of_find_device_by_node generic · c6085584
      Jonas Bonn 提交于
      There's no need for this function to be architecture specific and all four
      architectures defining it had the same definition.  The function has been
      moved to drivers/of/platform.c.
      Signed-off-by: NJonas Bonn <jonas@southpole.se>
      [grant.likely@secretlab.ca: moved to drivers/of/platform.c, simplified code, and added kerneldoc comment]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      c6085584
    • G
      powerpc: remove references to of_device and to_of_device · a454dc50
      Grant Likely 提交于
      of_device is just a #define alias to platform_device.  This patch
      replaces all references to it with platform_device.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      a454dc50
    • G
      of/platform: remove all of_bus_type and of_platform_bus_type references · 1ab1d63a
      Grant Likely 提交于
      Both of_bus_type and of_platform_bus_type are just #define aliases
      for the platform bus.  This patch removes all references to them and
      switches to the of_register_platform_driver()/of_unregister_platform_driver()
      API for registering.
      
      Subsequent patches will convert each user of of_register_platform_driver()
      into plain platform_drivers without the of_platform_driver shim.  At which
      point the of_register_platform_driver()/of_unregister_platform_driver()
      functions can be removed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      1ab1d63a
    • G
      of: Merge of_platform_bus_type with platform_bus_type · eca39301
      Grant Likely 提交于
      of_platform_bus was being used in the same manner as the platform_bus.
      The only difference being that of_platform_bus devices are generated
      from data in the device tree, and platform_bus devices are usually
      statically allocated in platform code.  Having them separate causes
      the problem of device drivers having to be registered twice if it
      was possible for the same device to appear on either bus.
      
      This patch removes of_platform_bus_type and registers all of_platform
      bus devices and drivers on the platform bus instead.  A previous patch
      made the of_device structure an alias for the platform_device structure,
      and a shim is used to adapt of_platform_drivers to the platform bus.
      
      After all of of_platform_bus drivers are converted to be normal platform
      drivers, the shim code can be removed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      eca39301
  7. 19 7月, 2010 1 次提交
  8. 06 7月, 2010 1 次提交
    • G
      of/device: Merge of_platform_bus_probe() · 5fd200f3
      Grant Likely 提交于
      Merge common code between PowerPC and microblaze.  This patch merges
      the code that scans the tree and registers devices.  The functions
      merged are of_platform_bus_probe(), of_platform_bus_create(), and
      of_platform_device_create().
      
      This patch also move the of_default_bus_ids[] table out of a Microblaze
      header file and makes it non-static.  The device ids table isn't merged
      because powerpc and microblaze use different default data.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Grant Likely <grant.likely@secretlab.ca>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      5fd200f3
  9. 22 5月, 2010 2 次提交
  10. 19 5月, 2010 1 次提交
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 29 1月, 2010 1 次提交
  13. 02 9月, 2009 1 次提交
  14. 07 4月, 2009 1 次提交
  15. 09 7月, 2008 1 次提交
  16. 24 4月, 2008 1 次提交
  17. 17 1月, 2008 2 次提交
  18. 21 12月, 2007 1 次提交
  19. 11 12月, 2007 1 次提交
  20. 17 10月, 2007 1 次提交
  21. 09 10月, 2007 1 次提交
  22. 20 7月, 2007 2 次提交
  23. 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
  24. 07 6月, 2007 1 次提交
  25. 17 5月, 2007 1 次提交
  26. 08 5月, 2007 1 次提交
  27. 28 4月, 2007 1 次提交
  28. 13 4月, 2007 2 次提交
  29. 19 12月, 2006 1 次提交
  30. 08 12月, 2006 1 次提交
  31. 04 12月, 2006 2 次提交