1. 07 Jan, 2011 2 commits
    • Russell King - ARM Linux's avatar
      spi/omap: Fix DMA API usage in OMAP MCSPI driver · 07fe0351
      Russell King - ARM Linux authored
      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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      07fe0351
    • Richard Genoud's avatar
      spi/imx: correct the test on platform_get_irq() return value · 73575938
      Richard Genoud authored
      The test "if (spi_imx->irq <= 0)" is not testing the IRQ value, but
      the return value of platform_get_irq().  As platform_get_irq() can
      return an error (-ENXIO) or the IRQ value it found, the test should be
      "if (spi_imx->irq < 0)"
      
      [grant.likely: Note: In general, Linux irq number 0 should also mean
      no irq, but arm still allows devices to be assigned 0, and the imx
      platform uses 0 for one of the spi devices, so this patch is needed
      for the device to work]
      Signed-off-by: default avatarRichard Genoud <richard.genoud@gmail.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      73575938
  2. 01 Jan, 2011 1 commit
  3. 31 Dec, 2010 1 commit
  4. 30 Dec, 2010 1 commit
  5. 29 Dec, 2010 2 commits
    • Grant Likely's avatar
      Merge branch 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next · 94a544a4
      Grant Likely authored
      * 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next
        spi/pxa2xx: register driver properly
        spi/pxa2xx: add support for shared IRQ handler
        spi/pxa2xx: Use define for SSSR_TFL_MASK instead of plain numbers
        arm/pxa2xx: reorgazine SSP and SPI header files
        spi/pxa2xx: Add CE4100 support
        spi/pxa2xx: Consider CE4100's FIFO depth
        spi/pxa2xx: Add chipselect support for Sodaville
        spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes.
        spi/pxa2xx: pass of_node to spi device and set a parent device
      94a544a4
    • Grant Likely's avatar
      Merge branch 'for-grant' of git://arago-project.org/git/projects/linux-davinci into spi/next · 496a2e36
      Grant Likely authored
      * 'for-grant' of git://arago-project.org/git/projects/linux-davinci into spi/next
         spi: davinci: fix checkpatch errors
         spi: davinci: whitespace cleanup
         spi: davinci: remove unused variable 'pdata'
         spi: davinci: set chip-select mode in SPIDEF only once
         spi: davinci: enable both activation and deactivation of chip-selects
         spi: davinci: remove unnecessary data transmit on CS disable
         spi: davinci: enable GPIO lines to be used as chip selects
         spi: davinci: simplify prescalar calculation
         spi: davinci: remove 'wait_enable' platform data member
         spi: davinci: make chip-slect specific parameters really chip-select specific
         spi: davinci: consolidate setup of SPIFMTn in one function
         spi: davinci: setup chip-select timers values only if timer enabled
         spi: davinci: add support for wait enable timeouts
         spi: davinci: remove unused members of davinci_spi_slave
         spi: davinci: eliminate the single member structure davinci_spi_slave
         spi: davinci: eliminate unnecessary update of davinci_spi->count
         spi: davinci: simplify calculation of edma acount value
         spi: davinci: check for NULL buffer pointer before using it
         spi: davinci: remove unnecessary disable of SPI
         spi: davinci: remove unnecessary 'count' variable in driver private data
         spi: davinci: remove unnecessary completion variable initialization
         spi: davinci: remove non-useful interrupt mode support
         spi: davinci: simplify poll mode transfers
         spi: davinci: add support for interrupt mode
         spi: davinci: configure the invariable bits in spipc0 only once
         spi: davinci: remove unnecessary function davinci_spi_bufs_prep()
         spi: davinci: remove unnecessary call to davinci_spi_setup_transfer()
         spi: davinci: do not store DMA channel information per chip select
         spi: davinci: always start transmit DMA
         spi: davinci: do not use temporary buffer if no transmit data provided
         spi: davinci: always start receive DMA
         spi: davinci: use edma_write_slot() to setup EDMA PaRAM slot
         spi: davinci: fix DMA event generation stoppage
         spi: davinci: fix EDMA CC errors at end of transfers
         spi: davinci: handle DMA completion errors correctly
         spi: davinci: remove usage of additional completion variables for DMA
         spi: davinci: let DMA operation be specified on per-device basis
         spi: davinci: remove non-useful "clk_internal" platform data
         spi: davinci: enable and power-up SPI only when required
         spi: davinci: setup the driver owner
         spi: davinci: add additional comments
         spi: davinci: add EF Johnson Technologies copyright
         spi: davinci: removed unused #defines
         spi: davinci: remove unnecessary typecast
         spi: davinci: do not treat Tx interrupt being set as error
         spi: davinci: do not allocate DMA channels during SPI device setup
         spi: davinci: remove unnecessary private data member 'region_size'
         spi: davinci: shorten variable names
         spi: davinci: kconfig: add manufacturer name to prompt string
      496a2e36
  6. 24 Dec, 2010 10 commits
  7. 22 Dec, 2010 1 commit
  8. 21 Dec, 2010 5 commits
  9. 20 Dec, 2010 9 commits
  10. 19 Dec, 2010 3 commits
  11. 18 Dec, 2010 3 commits
  12. 17 Dec, 2010 2 commits
    • Chris Metcalf's avatar
      arch/tile: handle rt_sigreturn() more cleanly · 81711cee
      Chris Metcalf authored
      The current tile rt_sigreturn() syscall pattern uses the common idiom
      of loading up pt_regs with all the saved registers from the time of
      the signal, then anticipating the fact that we will clobber the ABI
      "return value" register (r0) as we return from the syscall by setting
      the rt_sigreturn return value to whatever random value was in the pt_regs
      for r0.
      
      However, this breaks in our 64-bit kernel when running "compat" tasks,
      since we always sign-extend the "return value" register to properly
      handle returned pointers that are in the upper 2GB of the 32-bit compat
      address space.  Doing this to the sigreturn path then causes occasional
      random corruption of the 64-bit r0 register.
      
      Instead, we stop doing the crazy "load the return-value register"
      hack in sigreturn.  We already have some sigreturn-specific assembly
      code that we use to pass the pt_regs pointer to C code.  We extend that
      code to also set the link register to point to a spot a few instructions
      after the usual syscall return address so we don't clobber the saved r0.
      Now it no longer matters what the rt_sigreturn syscall returns, and the
      pt_regs structure can be cleanly and completely reloaded.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      81711cee
    • Chris Metcalf's avatar
      arch/tile: handle CLONE_SETTLS in copy_thread(), not user space · bc4cf2bb
      Chris Metcalf authored
      Previously we were just setting up the "tp" register in the
      new task as started by clone() in libc.  However, this is not
      quite right, since in principle a signal might be delivered to
      the new task before it had its TLS set up.  (Of course, this race
      window still exists for resetting the libc getpid() cached value
      in the new task, in principle.  But in any case, we are now doing
      this exactly the way all other architectures do it.)
      
      This change is important for 2.6.37 since the tile glibc we will
      be submitting upstream will not set TLS in user space any more,
      so it will only work on a kernel that has this fix.  It should
      also be taken for 2.6.36.x in the stable tree if possible.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Cc: stable <stable@kernel.org>
      bc4cf2bb