1. 25 4月, 2016 2 次提交
    • K
      crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks · 79152e8d
      Krzysztof Kozlowski 提交于
      The tcrypt testing module on Exynos5422-based Odroid XU3/4 board failed on
      testing 8 kB size blocks:
      
      	$ sudo modprobe tcrypt sec=1 mode=500
      	testing speed of async ecb(aes) (ecb-aes-s5p) encryption
      	test 0 (128 bit key, 16 byte blocks): 21971 operations in 1 seconds (351536 bytes)
      	test 1 (128 bit key, 64 byte blocks): 21731 operations in 1 seconds (1390784 bytes)
      	test 2 (128 bit key, 256 byte blocks): 21932 operations in 1 seconds (5614592 bytes)
      	test 3 (128 bit key, 1024 byte blocks): 21685 operations in 1 seconds (22205440 bytes)
      	test 4 (128 bit key, 8192 byte blocks):
      
      This was caused by a race issue of missed BRDMA_DONE ("Block cipher
      Receiving DMA") interrupt. Device starts processing the data in DMA mode
      immediately after setting length of DMA block: receiving (FCBRDMAL) or
      transmitting (FCBTDMAL). The driver sets these lengths from interrupt
      handler through s5p_set_dma_indata() function (or xxx_setdata()).
      
      However the interrupt handler was first dealing with receive buffer
      (dma-unmap old, dma-map new, set receive block length which starts the
      operation), then with transmit buffer and finally was clearing pending
      interrupts (FCINTPEND). Because of the time window between setting
      receive buffer length and clearing pending interrupts, the operation on
      receive buffer could end already and driver would miss new interrupt.
      
      User manual for Exynos5422 confirms in example code that setting DMA
      block lengths should be the last operation.
      
      The tcrypt hang could be also observed in following blocked-task dmesg:
      
      INFO: task modprobe:258 blocked for more than 120 seconds.
            Not tainted 4.6.0-rc4-next-20160419-00005-g9eac8b7b7753-dirty #42
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      modprobe        D c06b09d8     0   258    256 0x00000000
      [<c06b09d8>] (__schedule) from [<c06b0f24>] (schedule+0x40/0xac)
      [<c06b0f24>] (schedule) from [<c06b49f8>] (schedule_timeout+0x124/0x178)
      [<c06b49f8>] (schedule_timeout) from [<c06b17fc>] (wait_for_common+0xb8/0x144)
      [<c06b17fc>] (wait_for_common) from [<bf0013b8>] (test_acipher_speed+0x49c/0x740 [tcrypt])
      [<bf0013b8>] (test_acipher_speed [tcrypt]) from [<bf003e8c>] (do_test+0x2240/0x30ec [tcrypt])
      [<bf003e8c>] (do_test [tcrypt]) from [<bf008048>] (tcrypt_mod_init+0x48/0xa4 [tcrypt])
      [<bf008048>] (tcrypt_mod_init [tcrypt]) from [<c010177c>] (do_one_initcall+0x3c/0x16c)
      [<c010177c>] (do_one_initcall) from [<c0191ff0>] (do_init_module+0x5c/0x1ac)
      [<c0191ff0>] (do_init_module) from [<c0185610>] (load_module+0x1a30/0x1d08)
      [<c0185610>] (load_module) from [<c0185ab0>] (SyS_finit_module+0x8c/0x98)
      [<c0185ab0>] (SyS_finit_module) from [<c01078c0>] (ret_fast_syscall+0x0/0x3c)
      
      Fixes: a49e490c ("crypto: s5p-sss - add S5PV210 advanced crypto engine support")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      79152e8d
    • K
      crypto: s5p-sss - Use common BIT macro · 5e00c604
      Krzysztof Kozlowski 提交于
      The BIT() macro is obvious and well known, so prefer to use it instead
      of crafted own macro.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5e00c604
  2. 20 4月, 2016 2 次提交
  3. 05 4月, 2016 3 次提交
  4. 25 1月, 2016 2 次提交
  5. 20 10月, 2014 1 次提交
  6. 13 5月, 2014 1 次提交
    • A
      crypto: s5p-sss - fix multiplatform build · 56b28446
      Arnd Bergmann 提交于
      As we are preparing to enable multiplatform support on EXYNOS,
      we can no longer include mach/*.h or plat/*.h headers from device
      drivers.
      
      The s5p-sss driver was just enabled for EXYNOS when it used to
      be used only on s5pv210, and it includes two samsung platform
      specific header files for historic reasons. Fortunately, it no
      longer actually needs them, so we can remove the #includes and
      avoid the problem
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: <linux-samsung-soc@vger.kernel.org>
      Cc: Vladimir Zapolskiy <vz@mleia.com>
      Reviewed-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      56b28446
  7. 08 5月, 2014 6 次提交
  8. 27 2月, 2014 1 次提交
  9. 24 5月, 2013 1 次提交
  10. 20 1月, 2013 1 次提交
  11. 09 11月, 2012 1 次提交
    • S
      crypto: s5p-sss - Fix compilation error · a465348f
      Sachin Kamat 提交于
      struct s3c2410_dma_client gets defined multiple times as it is defined
      in more than one header file. Changing it at the header file level causes
      many more build breakages as they are interdependent in a complex way.
      Hence fixing this problem by using the mach version of the header file.
      
      Without this patch, following build error is observed:
      arch/arm/plat-samsung/include/plat/dma-pl330.h:106:27: error:
      redefinition of struct s3c2410_dma_client
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a465348f
  12. 01 8月, 2012 1 次提交
  13. 13 1月, 2012 1 次提交
  14. 30 11月, 2011 1 次提交
  15. 08 4月, 2011 1 次提交