1. 06 6月, 2011 1 次提交
  2. 04 6月, 2011 1 次提交
  3. 24 3月, 2011 1 次提交
  4. 05 3月, 2011 1 次提交
  5. 25 2月, 2011 1 次提交
  6. 18 2月, 2011 2 次提交
  7. 28 1月, 2011 1 次提交
  8. 08 1月, 2011 1 次提交
    • R
      spi/omap: Fix DMA API usage in OMAP MCSPI driver · 07fe0351
      Russell King - ARM Linux 提交于
      Running the latest kernel on the 4430SDP board with DMA API debugging
      enabled results in this:
      
      WARNING: at lib/dma-debug.c:803 check_unmap+0x19c/0x6f0()
      NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated
      [device address=0x000000008129901a] [size=260 bytes]
      Modules linked in:
      Backtrace:
      [<c003cbe0>] (dump_backtrace+0x0/0x10c) from [<c0278da8>] (dump_stack+0x18/0x1c)
       r7:c1839dc0 r6:c0198578 r5:c0304b17 r4:00000323
      [<c0278d90>] (dump_stack+0x0/0x1c) from [<c005b158>] (warn_slowpath_common+0x58/0x70)
      [<c005b100>] (warn_slowpath_common+0x0/0x70) from [<c005b214>] (warn_slowpath_fmt+0x38/0x40)
       r8:c1839e40 r7:00000000 r6:00000104 r5:00000000 r4:8129901a
      [<c005b1dc>] (warn_slowpath_fmt+0x0/0x40) from [<c0198578>] (check_unmap+0x19c/0x6f0)
       r3:c03110de r2:c0304e6b
      [<c01983dc>] (check_unmap+0x0/0x6f0) from [<c0198cd8>] (debug_dma_unmap_page+0x74/0x80)
      [<c0198c64>] (debug_dma_unmap_page+0x0/0x80) from [<c01d5ad8>] (omap2_mcspi_work+0x514/0xbf0)
      [<c01d55c4>] (omap2_mcspi_work+0x0/0xbf0) from [<c006dfb0>] (process_one_work+0x294/0x400)
      [<c006dd1c>] (process_one_work+0x0/0x400) from [<c006e50c>] (worker_thread+0x220/0x3f8)
      [<c006e2ec>] (worker_thread+0x0/0x3f8) from [<c00738d0>] (kthread+0x88/0x90)
      [<c0073848>] (kthread+0x0/0x90) from [<c005e924>] (do_exit+0x0/0x5fc)
       r7:00000013 r6:c005e924 r5:c0073848 r4:c1829ee0
      ---[ end trace 1b75b31a2719ed20 ]---
      
      I've no idea why this driver uses NULL for dma_unmap_single instead of
      the &spi->dev that is laying around just waiting to be used in that
      function - but it's an easy fix.
      
      Also replace this comment with a FIXME comment:
                      /* Do DMA mapping "early" for better error reporting and
                       * dcache use.  Note that if dma_unmap_single() ever starts
                       * to do real work on ARM, we'd need to clean up mappings
                       * for previous transfers on *ALL* exits of this loop...
                       */
      as the comment is not true - we do work in dma_unmap() functions,
      particularly on ARMv6 and above.  I've corrected the existing unmap
      functions but if any others are required they must be added ASAP.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      07fe0351
  9. 30 12月, 2010 1 次提交
    • G
      spi/omap2_mcspi.c: Force CS to be in inactive state after off-mode transition · 42ce7fd6
      Gregory CLEMENT 提交于
      When SPI wake up from OFF mode, CS is in the wrong state: force it to the
      inactive state.
      
      During the system life, I monitored the CS behavior using a oscilloscope.
      I also activated debug in omap2_mcspi, so I saw when driver disable the clocks
      and restore context when device is not used.Each time the CS was in the correct
      state.  It was only when system was put suspend to ram with off-mode activated
      that on resume the CS was in wrong state( ie activated).
      
      Changelog:
      * Change from v1 to v2:
        - Rebase on linus/master (after 2.6.37-rc1)
        - Do some clean-up and fix indentation on both patches
        - Add more explanations for patch 2
      
      * Change from v2 to v3:
        - Use directly resume function of spi_master instead of using function
        - from spi_device as Grant Likely pointed it out.
        - Force this transition explicitly for each CS used by a device.
      
      * Change from v3 to v4:
        - Patch clean-up according to Kevin Hilman and checkpatch.
        - Now force CS to be in inactive state only if it was inactive when it was
          suspended.
      
      * Change from v4 to v5:
        - Rebase on linus/master (after 2.6.37-rc3)
        - Collapse some lines as pointed by Grant Likely
        - Fix a spelling
      
      * Change from v5 to v6:
        - Rebase on linus/master (after 2.6.37-rc7)
        - Use CONFIG_SUSPEND instead of CONFIG_PM
        - Didn't use legacy PM methods anymore. Instead, add a struct dev_pm_ops and
          add the resume method there.
        - Fix multi-line comment style
      
      * Change from v6 to v7:
        - Rebase on linus/master (after 2.6.37-rc8)
        - Drop an extra line
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Reviewed-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      42ce7fd6
  10. 21 10月, 2010 2 次提交
  11. 29 9月, 2010 1 次提交
  12. 25 5月, 2010 3 次提交
  13. 28 4月, 2010 2 次提交
  14. 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
  15. 11 3月, 2010 2 次提交
  16. 16 2月, 2010 1 次提交
  17. 21 10月, 2009 1 次提交
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  18. 23 9月, 2009 4 次提交
  19. 30 7月, 2009 2 次提交
  20. 19 6月, 2009 2 次提交
  21. 25 3月, 2009 1 次提交
  22. 09 2月, 2009 1 次提交
  23. 06 9月, 2008 2 次提交
  24. 07 8月, 2008 1 次提交
  25. 27 7月, 2008 1 次提交
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  26. 11 4月, 2008 1 次提交
  27. 07 2月, 2008 1 次提交
  28. 25 1月, 2008 1 次提交