1. 21 8月, 2013 3 次提交
    • J
      crypto: omap-aes - Simplify DMA usage by using direct SGs · 4b645c94
      Joel Fernandes 提交于
      In early version of this driver, assumptions were made such as DMA layer
      requires contiguous buffers etc. Due to this, new buffers were allocated,
      mapped and used for DMA. These assumptions are no longer true and DMAEngine
      scatter-gather DMA doesn't have such requirements. We simply the DMA operations
      by directly using the scatter-gather buffers provided by the crypto layer
      instead of creating our own.
      
      Lot of logic that handled DMA'ing only X number of bytes of the total, or as
      much as fitted into a 3rd party buffer is removed and is no longer required.
      
      Also, good performance improvement of atleast ~20% seen with encrypting a
      buffer size of 8K (1800 ops/sec vs 1400 ops/sec).  Improvement will be higher
      for much larger blocks though such benchmarking is left as an exercise for the
      reader.  Also DMA usage is much more simplified and coherent with rest of the
      code.
      Signed-off-by: NJoel Fernandes <joelf@ti.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4b645c94
    • J
      crypto: omap-aes - Populate number of SG elements · e77c756e
      Joel Fernandes 提交于
      Crypto layer only passes nbytes but number of SG elements is needed for mapping
      or unmapping SGs at one time using dma_map* API and also needed to pass in for
      dmaengine prep function.
      
      We call function added to scatterwalk for this purpose in omap_aes_handle_queue
      to populate the values which are used later.
      Signed-off-by: NJoel Fernandes <joelf@ti.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e77c756e
    • J
      crypto: omap-aes - Add useful debug macros · 016af9b5
      Joel Fernandes 提交于
      When DEBUG is enabled, these macros can be used to print variables in integer
      and hex format, and clearly display which registers, offsets and values are
      being read/written , including printing the names of the offsets and their values.
      
      Using statement expression macros in read path as,
      Suggested-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJoel Fernandes <joelf@ti.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      016af9b5
  2. 05 6月, 2013 1 次提交
    • J
      crypto: omap-aes - Don't idle/start AES device between Encrypt operations · a3485e68
      Joel A Fernandes 提交于
      Calling runtime PM API for every block causes serious perf hit to
      crypto operations that are done on a long buffer.
      As crypto is performed on a page boundary, encrypting large buffers can
      cause a series of crypto operations divided by page. The runtime PM API
      is also called those many times.
      
      We call runtime_pm_get_sync only at beginning on the session (cra_init)
      and runtime_pm_put at the end. This result in upto a 50% speedup as below.
      This doesn't make the driver to keep the system awake as runtime get/put
      is only called during a crypto session which completes usually quickly.
      
      Before:
      root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
      Doing aes-128-cbc for 3s on 16 size blocks: 13310 aes-128-cbc's in 0.01s
      Doing aes-128-cbc for 3s on 64 size blocks: 13040 aes-128-cbc's in 0.04s
      Doing aes-128-cbc for 3s on 256 size blocks: 9134 aes-128-cbc's in 0.03s
      Doing aes-128-cbc for 3s on 1024 size blocks: 8939 aes-128-cbc's in 0.01s
      Doing aes-128-cbc for 3s on 8192 size blocks: 4299 aes-128-cbc's in 0.00s
      
      After:
      root@beagleboard:~# time -v openssl speed -evp aes-128-cbc
      Doing aes-128-cbc for 3s on 16 size blocks: 18911 aes-128-cbc's in 0.02s
      Doing aes-128-cbc for 3s on 64 size blocks: 18878 aes-128-cbc's in 0.02s
      Doing aes-128-cbc for 3s on 256 size blocks: 11878 aes-128-cbc's in 0.10s
      Doing aes-128-cbc for 3s on 1024 size blocks: 11538 aes-128-cbc's in 0.05s
      Doing aes-128-cbc for 3s on 8192 size blocks: 4857 aes-128-cbc's in 0.03s
      
      While at it, also drop enter and exit pr_debugs, in related code. tracers
      can be used for that.
      
      Tested on a Beaglebone (AM335x SoC) board.
      Signed-off-by: NJoel A Fernandes <joelagnel@ti.com>
      Acked-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a3485e68
  3. 24 5月, 2013 1 次提交
  4. 10 3月, 2013 2 次提交
  5. 20 1月, 2013 10 次提交
  6. 01 12月, 2012 1 次提交
    • T
      ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h · 45c3eb7d
      Tony Lindgren 提交于
      Based on earlier discussions[1] we attempted to find a suitable
      location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP:
      DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion
      to dmaengine is complete.
      
      Unfortunately that was before I was able to try to test compile
      of the ARM multiplatform builds for omap2+, and the end result
      was not very good.
      
      So I'm creating yet another all over the place patch to cut the
      last dependency for building omap2+ for ARM multiplatform. After
      this, we have finally removed the driver dependencies to the
      arch/arm code, except for few drivers that are being worked on.
      
      The other option was to make the <plat-omap/dma-omap.h> path
      to work, but we'd have to add some new header directory to for
      multiplatform builds.
      
      Or we would have to manually include arch/arm/plat-omap/include
      again from arch/arm/Makefile for omap2+.
      
      Neither of these alternatives sound appealing as they will
      likely lead addition of various other headers exposed to the
      drivers, which we want to avoid for the multiplatform kernels.
      
      Since we already have a minimal include/linux/omap-dma.h,
      let's just use that instead and add a note to it to not
      use the custom omap DMA functions any longer where possible.
      
      Note that converting omap DMA to dmaengine depends on
      dmaengine supporting automatically incrementing the FIFO
      address at the device end, and converting all the remaining
      legacy drivers. So it's going to be few more merge windows.
      
      [1] https://patchwork.kernel.org/patch/1519591/#
      
      cc: Russell King <linux@arm.linux.org.uk>
      cc: Kevin Hilman <khilman@ti.com>
      cc: "Benoît Cousson" <b-cousson@ti.com>
      cc: Herbert Xu <herbert@gondor.apana.org.au>
      cc: "David S. Miller" <davem@davemloft.net>
      cc: Vinod Koul <vinod.koul@intel.com>
      cc: Dan Williams <djbw@fb.com>
      cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      cc: David Woodhouse <dwmw2@infradead.org>
      cc: Kyungmin Park <kyungmin.park@samsung.com>
      cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      cc: Hans Verkuil <hans.verkuil@cisco.com>
      cc: Vaibhav Hiremath <hvaibhav@ti.com>
      cc: Lokesh Vutla <lokeshvutla@ti.com>
      cc: Rusty Russell <rusty@rustcorp.com.au>
      cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      cc: Afzal Mohammed <afzal@ti.com>
      cc: linux-crypto@vger.kernel.org
      cc: linux-media@vger.kernel.org
      cc: linux-mtd@lists.infradead.org
      cc: linux-usb@vger.kernel.org
      cc: linux-fbdev@vger.kernel.org
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      45c3eb7d
  7. 16 10月, 2012 2 次提交
    • T
      ARM: OMAP: Trivial driver changes to remove include plat/cpu.h · 27615a97
      Tony Lindgren 提交于
      Drivers should not use cpu_is_omap or cpu_class_is_omap macros,
      they should be private to the platform init code. And we'll be
      removing plat/cpu.h and only have a private soc.h for the
      arch/arm/*omap* code.
      
      This patch is intended as preparation for the core omap changes
      and removes the need to include plat/cpu.h from several drivers.
      This is needed for the ARM common zImage support.
      
      These changes are OK to do because:
      
      - omap-rng.c does not need plat/cpu.h
      
      - omap-aes.c and omap-sham.c get the proper platform_data
        passed to them so they don't need extra checks in the driver
      
      - omap-dma.c and omap-pcm.c can test the arch locally as
        omap1 and omap2 cannot be compiled together because of
        conflicting compiler flags
      
      Cc: Deepak Saxena <dsaxena@plexity.net>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Venkatraman S <svenkatr@ti.com>
      Cc: Chris Ball <cjb@laptop.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <djbw@fb.com>
      Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NJarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-mmc@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: linux-kernel@vger.kernel.org
      [tony@atomide.com: mmc changes folded in to an earlier patch]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      27615a97
    • L
      ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.h · 2b6c4e73
      Lokesh Vutla 提交于
      Move plat/dma.h to plat-omap/dma-omap.h as part of single
      zImage work
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      2b6c4e73
  8. 01 8月, 2012 1 次提交
  9. 13 1月, 2012 1 次提交
  10. 29 1月, 2011 1 次提交
  11. 02 12月, 2010 6 次提交
  12. 03 9月, 2010 1 次提交