1. 24 8月, 2010 1 次提交
    • A
      powerpc: Fix bogus it_blocksize in VIO iommu code · 7aa241fd
      Anton Blanchard 提交于
      When looking at some issues with the virtual ethernet driver I noticed
      that TCE allocation was following a very strange pattern:
      
      address 00e9000 length 2048
      address 0409000 length 2048 <-----
      address 0429000 length 2048
      address 0449000 length 2048
      address 0469000 length 2048
      address 0489000 length 2048
      address 04a9000 length 2048
      address 04c9000 length 2048
      address 04e9000 length 2048
      address 4009000 length 2048 <-----
      address 4029000 length 2048
      
      Huge unexplained gaps in what should be an empty TCE table. It turns out
      it_blocksize, the amount we want to align the next allocation to, was
      c0000000fe903b20. Completely bogus.
      
      Initialise it to something reasonable in the VIO IOMMU code, and use kzalloc
      everywhere to protect against this when we next add a non compulsary
      field to iommu code and forget to initialise it.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7aa241fd
  2. 24 7月, 2010 1 次提交
    • 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
  3. 14 7月, 2010 1 次提交
  4. 02 6月, 2010 1 次提交
  5. 19 5月, 2010 1 次提交
    • G
      of: eliminate of_device->node and dev_archdata->{of,prom}_node · 58f9b0b0
      Grant Likely 提交于
      This patch eliminates the node pointer from struct of_device and the
      of_node (or prom_node) pointer from struct dev_archdata since the node
      pointer is now part of struct device proper when CONFIG_OF is set, and
      all users of the old pointer locations have already been converted over
      to use device->of_node.
      
      Also remove dev_archdata_{get,set}_node() as it is no longer used by
      anything.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      58f9b0b0
  6. 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
  7. 24 9月, 2009 1 次提交
  8. 28 8月, 2009 1 次提交
  9. 15 6月, 2009 1 次提交
  10. 07 4月, 2009 1 次提交
  11. 24 3月, 2009 1 次提交
  12. 13 1月, 2009 1 次提交
  13. 08 1月, 2009 1 次提交
  14. 19 11月, 2008 1 次提交
  15. 31 10月, 2008 1 次提交
    • M
      powerpc: Update remaining dma_mapping_ops to use map/unmap_page · f9226d57
      Mark Nelson 提交于
      After the merge of the 32 and 64bit DMA code, dma_direct_ops lost
      their map/unmap_single() functions but gained map/unmap_page().  This
      caused a problem for Cell because Cell's dma_iommu_fixed_ops called
      the dma_direct_ops if the fixed linear mapping was to be used or the
      iommu ops if the dynamic window was to be used.  So in order to fix
      this problem we need to update the 64bit DMA code to use
      map/unmap_page.
      
      First, we update the generic IOMMU code so that iommu_map_single()
      becomes iommu_map_page() and iommu_unmap_single() becomes
      iommu_unmap_page().  Then we propagate these changes up through all
      the callers of these two functions and in the process update all the
      dma_mapping_ops so that they have map/unmap_page rahter than
      map/unmap_single.  We can do this because on 64bit there is no HIGHMEM
      memory so map/unmap_page ends up performing exactly the same function
      as map/unmap_single, just taking different arguments.
      
      This has no affect on drivers because the dma_map_single_attrs() just
      ends up calling the map_page() function of the appropriate
      dma_mapping_ops and similarly the dma_unmap_single_attrs() calls
      unmap_page().
      
      This fixes an oops on Cell blades, which oops on boot without this
      because they call dma_direct_ops.map_single, which is NULL.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f9226d57
  16. 25 9月, 2008 1 次提交
  17. 25 7月, 2008 2 次提交
    • R
      powerpc/pseries: iommu enablement for CMO · 6490c490
      Robert Jennings 提交于
      To support Cooperative Memory Overcommitment (CMO), we need to check
      for failure from some of the tce hcalls.
      
      These changes for the pseries platform affect the powerpc architecture;
      patches for the other affected platforms are included in this patch.
      
      pSeries platform IOMMU code changes:
       * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and
         return an error.
      
      Architecture IOMMU code changes:
       * Calls to ppc_md.tce_build need to check return values and return
         DMA_MAPPING_ERROR for transient errors.
      
      Architecture changes:
       * struct machdep_calls for tce_build*_pSeriesLP functions need to change
         to indicate failure.
       * all other platforms will need updates to iommu functions to match the new
         calling semantics; they will return 0 on success.  The other platforms
         default configs have been built, but no further testing was performed.
      Signed-off-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6490c490
    • M
      powerpc/cell: Fixed IOMMU mapping uses weak ordering for a pcie endpoint · 7886250e
      Mark Nelson 提交于
      At the moment the fixed mapping is by default strongly ordered (the
      iommu_fixed=weak boot option must be used to make the fixed mapping weakly
      ordered). If we're on a setup where the southbridge is being used in
      endpoint mode (triblade and CAB boards) the default should be a weakly
      ordered fixed mapping.
      
      This adds a check so that if a node of type pcie-endpoint can be found in
      the device tree the fixed mapping is set to be weak by default (but can be
      overridden using iommu_fixed=strong).
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7886250e
  18. 22 7月, 2008 2 次提交
  19. 09 7月, 2008 1 次提交
  20. 01 4月, 2008 1 次提交
  21. 20 3月, 2008 1 次提交
  22. 03 3月, 2008 8 次提交
  23. 14 2月, 2008 1 次提交
  24. 08 2月, 2008 4 次提交
  25. 31 1月, 2008 4 次提交