1. 30 8月, 2019 4 次提交
    • A
      crypto: caam - select DMA address size at runtime · a1cf573e
      Andrey Smirnov 提交于
      i.MX8 mScale SoC still use 32-bit addresses in its CAAM implmentation,
      so we can't rely on sizeof(dma_addr_t) to detemine CAAM pointer
      size. Convert the code to query CTPR and MCFGR for that during driver
      probing.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Chris Spencer <christopher.spencer@sea.co.uk>
      Cc: Cory Tusar <cory.tusar@zii.aero>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Horia Geantă <horia.geanta@nxp.com>
      Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
      Cc: Leonard Crestez <leonard.crestez@nxp.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a1cf573e
    • A
      crypto: caam - make CAAM_PTR_SZ dynamic · 1a3daadc
      Andrey Smirnov 提交于
      In order to be able to configure CAAM pointer size at run-time, which
      needed to support i.MX8MQ, which is 64-bit SoC with 32-bit pointer
      size, convert CAAM_PTR_SZ to refer to a global variable of the same
      name ("caam_ptr_sz") and adjust the rest of the code accordingly. No
      functional change intended.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Chris Spencer <christopher.spencer@sea.co.uk>
      Cc: Cory Tusar <cory.tusar@zii.aero>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Horia Geantă <horia.geanta@nxp.com>
      Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
      Cc: Leonard Crestez <leonard.crestez@nxp.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1a3daadc
    • A
      crypto: caam - simplfy clock initialization · 51e002e9
      Andrey Smirnov 提交于
      Simplify clock initialization code by converting it to use clk-bulk,
      devres and soc_device_match() match table. No functional change
      intended.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Reviewed-by: NLeonard Crestez <leonard.crestez@nxp.com>
      Tested-by: NIuliana Prodan <iuliana.prodan@nxp.com>
      Cc: Chris Spencer <christopher.spencer@sea.co.uk>
      Cc: Cory Tusar <cory.tusar@zii.aero>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Horia Geantă <horia.geanta@nxp.com>
      Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
      Cc: Leonard Crestez <leonard.crestez@nxp.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      51e002e9
    • A
      crypto: caam - move DMA mask selection into a function · 70c0cda2
      Andrey Smirnov 提交于
      Exactly the same code to figure out DMA mask is repeated twice in the
      driver code. To avoid repetition, move that logic into a standalone
      subroutine in intern.h. While at it re-shuffle the code to make it
      more readable with early returns.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Reviewed-by: NHoria Geantă <horia.geanta@nxp.com>
      Cc: Chris Spencer <christopher.spencer@sea.co.uk>
      Cc: Cory Tusar <cory.tusar@zii.aero>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Horia Geantă <horia.geanta@nxp.com>
      Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
      Cc: Leonard Crestez <leonard.crestez@nxp.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      70c0cda2
  2. 02 8月, 2019 1 次提交
  3. 06 6月, 2019 1 次提交
  4. 23 5月, 2019 3 次提交
  5. 17 5月, 2019 1 次提交
  6. 28 3月, 2019 1 次提交
  7. 01 2月, 2019 1 次提交
  8. 11 1月, 2019 1 次提交
    • H
      crypto: caam - move shared symbols in a common location · 5b3b9871
      Horia Geantă 提交于
      There are several issues with symbols shared b/w:
      -caam/jr and caam/qi drivers on one hand
      -caam/qi2 driver on the other hand
      
      Commit 52813ab2 ("crypto: caam/qi2 - avoid double export") fixed
      some of them, however compilation still fails for CRYPTO_DEV_FSL_CAAM=m
      and CRYPTO_DEV_FSL_DPAA2_CAAM=y.
      
      Another issue is related to dependency cycles reported by depmod when
      CRYPTO_DEV_FSL_CAAM=n and CRYPTO_DEV_FSL_DPAA2_CAAM=m, as mentioned in
      82c7b351 ("Revert "arm64: defconfig: Enable FSL_MC_BUS and FSL_MC_DPIO"")
      
      To fix all these, move the symbols shared by these drivers in a common
      location. The only existing possibility is error.c file (note that naming
      doesn't help and should probably change).
      
      Fixes: 52813ab2 ("crypto: caam/qi2 - avoid double export")
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5b3b9871
  9. 16 11月, 2018 1 次提交
  10. 17 10月, 2018 1 次提交
  11. 31 5月, 2018 1 次提交
  12. 21 4月, 2018 2 次提交
  13. 03 3月, 2018 2 次提交
  14. 08 2月, 2018 1 次提交
  15. 28 12月, 2017 1 次提交
  16. 20 9月, 2017 1 次提交
  17. 09 8月, 2017 1 次提交
  18. 03 8月, 2017 1 次提交
  19. 18 7月, 2017 1 次提交
  20. 05 4月, 2017 2 次提交
    • H
      crypto: caam - fix RNG deinstantiation error checking · 40c98cb5
      Horia Geantă 提交于
      RNG instantiation was previously fixed by
      commit 62743a41 ("crypto: caam - fix RNG init descriptor ret. code checking")
      while deinstantiation was not addressed.
      
      Since the descriptors used are similar, in the sense that they both end
      with a JUMP HALT command, checking for errors should be similar too,
      i.e. status code 7000_0000h should be considered successful.
      
      Cc: <stable@vger.kernel.org> # 3.13+
      Fixes: 1005bccd ("crypto: caam - enable instantiation of all RNG4 state handles")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      40c98cb5
    • H
      crypto: caam - fix JR platform device subsequent (re)creations · ec360607
      Horia Geantă 提交于
      The way Job Ring platform devices are created and released does not
      allow for multiple create-release cycles.
      
      JR0 Platform device creation error
      JR0 Platform device creation error
      caam 2100000.caam: no queues configured, terminating
      caam: probe of 2100000.caam failed with error -12
      
      The reason is that platform devices are created for each job ring:
      
              for_each_available_child_of_node(nprop, np)
                      if (of_device_is_compatible(np, "fsl,sec-v4.0-job-ring") ||
                          of_device_is_compatible(np, "fsl,sec4.0-job-ring")) {
                              ctrlpriv->jrpdev[ring] =
                                      of_platform_device_create(np, NULL, dev);
      
      which sets OF_POPULATED on the device node, but then it cleans these up:
      
              /* Remove platform devices for JobRs */
              for (ring = 0; ring < ctrlpriv->total_jobrs; ring++) {
                      if (ctrlpriv->jrpdev[ring])
                              of_device_unregister(ctrlpriv->jrpdev[ring]);
              }
      
      which leaves OF_POPULATED set.
      
      Use of_platform_populate / of_platform_depopulate instead.
      This allows for a bit of driver clean-up, jrpdev is no longer needed.
      
      Logic changes a bit too:
      -exit in case of_platform_populate fails, since currently even QI backend
      depends on JR; true, we no longer support the case when "some" of the JR
      DT nodes are incorrect
      -when cleaning up, caam_remove() would also depopulate RTIC in case
      it would have been populated somewhere else - not the case for now
      
      Cc: <stable@vger.kernel.org>
      Fixes: 313ea293 ("crypto: caam - Add Platform driver for Job Ring")
      Reported-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Suggested-by: NRob Herring <robh+dt@kernel.org>
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ec360607
  21. 24 3月, 2017 1 次提交
    • H
      crypto: caam - add Queue Interface (QI) backend support · 67c2315d
      Horia Geantă 提交于
      CAAM engine supports two interfaces for crypto job submission:
      -job ring interface - already existing caam/jr driver
      -Queue Interface (QI) - caam/qi driver added in current patch
      
      QI is present in CAAM engines found on DPAA platforms.
      QI gets its I/O (frame descriptors) from QMan (Queue Manager) queues.
      
      This patch adds a platform device for accessing CAAM's queue interface.
      The requests are submitted to CAAM using one frame queue per
      cryptographic context. Each crypto context has one shared descriptor.
      This shared descriptor is attached to frame queue associated with
      corresponding driver context using context_a.
      
      The driver hides the mechanics of FQ creation, initialisation from its
      applications. Each cryptographic context needs to be associated with
      driver context which houses the FQ to be used to transport the job to
      CAAM. The driver provides API for:
      (a) Context creation
      (b) Job submission
      (c) Context deletion
      (d) Congestion indication - whether path to/from CAAM is congested
      
      The driver supports affining its context to a particular CPU.
      This means that any responses from CAAM for the context in question
      would arrive at the given CPU. This helps in implementing one CPU
      per packet round trip in IPsec application.
      
      The driver processes CAAM responses under NAPI contexts.
      NAPI contexts are instantiated only on cores with affined portals since
      only cores having their own portal can receive responses from DQRR.
      
      The responses from CAAM for all cryptographic contexts ride on a fixed
      set of FQs. We use one response FQ per portal owning core. The response
      FQ is configured in each core's and thus portal's dedicated channel.
      This gives the flexibility to direct CAAM's responses for a crypto
      context on a given core.
      Signed-off-by: NVakul Garg <vakul.garg@nxp.com>
      Signed-off-by: NAlex Porosanu <alexandru.porosanu@nxp.com>
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      67c2315d
  22. 28 2月, 2017 1 次提交
  23. 15 2月, 2017 3 次提交
  24. 07 12月, 2016 2 次提交
  25. 13 11月, 2016 1 次提交
    • H
      crypto: caam - fix sparse warnings · 8439e94f
      Horia Geantă 提交于
      Fix the following sparse warning (note that endianness issues
      are not not addressed in current patch):
      
      drivers/crypto/caam/ctrl.c:388:24: warning: incorrect type in argument 1 (different address spaces)
      drivers/crypto/caam/ctrl.c:388:24:    expected void [noderef] <asn:2>*reg
      drivers/crypto/caam/ctrl.c:388:24:    got unsigned int *<noident>
      drivers/crypto/caam/ctrl.c:390:24: warning: incorrect type in argument 1 (different address spaces)
      drivers/crypto/caam/ctrl.c:390:24:    expected void [noderef] <asn:2>*reg
      drivers/crypto/caam/ctrl.c:390:24:    got unsigned int *<noident>
      drivers/crypto/caam/ctrl.c:548:24: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:548:24:    expected struct caam_ctrl [noderef] <asn:2>*ctrl
      drivers/crypto/caam/ctrl.c:548:24:    got struct caam_ctrl *<noident>
      drivers/crypto/caam/ctrl.c:550:30: warning: cast removes address space of expression
      drivers/crypto/caam/ctrl.c:549:26: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:549:26:    expected struct caam_assurance [noderef] <asn:2>*assure
      drivers/crypto/caam/ctrl.c:549:26:    got struct caam_assurance *<noident>
      drivers/crypto/caam/ctrl.c:554:28: warning: cast removes address space of expression
      drivers/crypto/caam/ctrl.c:553:24: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:553:24:    expected struct caam_deco [noderef] <asn:2>*deco
      drivers/crypto/caam/ctrl.c:553:24:    got struct caam_deco *<noident>
      drivers/crypto/caam/ctrl.c:634:48: warning: cast removes address space of expression
      drivers/crypto/caam/ctrl.c:633:44: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:633:44:    expected struct caam_job_ring [noderef] <asn:2>*<noident>
      drivers/crypto/caam/ctrl.c:633:44:    got struct caam_job_ring *<noident>
      drivers/crypto/caam/ctrl.c:648:34: warning: cast removes address space of expression
      drivers/crypto/caam/ctrl.c:647:30: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:647:30:    expected struct caam_queue_if [noderef] <asn:2>*qi
      drivers/crypto/caam/ctrl.c:647:30:    got struct caam_queue_if *<noident>
      drivers/crypto/caam/ctrl.c:806:37: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:806:37:    expected void *data
      drivers/crypto/caam/ctrl.c:806:37:    got unsigned int [noderef] <asn:2>*
      drivers/crypto/caam/ctrl.c:814:38: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:814:38:    expected void *data
      drivers/crypto/caam/ctrl.c:814:38:    got unsigned int [noderef] <asn:2>*
      drivers/crypto/caam/ctrl.c:822:38: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/ctrl.c:822:38:    expected void *data
      drivers/crypto/caam/ctrl.c:822:38:    got unsigned int [noderef] <asn:2>*
      drivers/crypto/caam/jr.c:492:23: warning: incorrect type in assignment (different address spaces)
      drivers/crypto/caam/jr.c:492:23:    expected struct caam_job_ring [noderef] <asn:2>*rregs
      drivers/crypto/caam/jr.c:492:23:    got struct caam_job_ring *<noident>
      drivers/crypto/caam/caampkc.c:398:35: warning: Using plain integer as NULL pointer
      drivers/crypto/caam/caampkc.c:444:35: warning: Using plain integer as NULL pointer
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8439e94f
  26. 25 10月, 2016 1 次提交
  27. 31 8月, 2016 1 次提交
  28. 09 8月, 2016 1 次提交
    • R
      crypto: caam - avoid kernel warnings on probe failure · bdc67da7
      Russell King 提交于
      While debugging setkey issues, the following warnings were found while
      trying to reinsert the caam module.  Fix this by avoiding the duplicated
      cleanup in the probe path after caam_remove(), which has already cleaned
      up the resources.
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/mm/vmalloc.c:1490 __vunmap+0xcc/0xf4
      Trying to vfree() nonexistent vm area (f2400000)
      Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam]
      CPU: 0 PID: 2346 Comm: modprobe Tainted: G        W       4.8.0-rc1+ #2014
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<c0013bb0>] (dump_backtrace) from [<c0013d4c>] (show_stack+0x18/0x1c)
      [<c0013d34>] (show_stack) from [<c0357c00>] (dump_stack+0xa4/0xdc)
      [<c0357b5c>] (dump_stack) from [<c002e650>] (__warn+0xdc/0x108)
      [<c002e574>] (__warn) from [<c002e734>] (warn_slowpath_fmt+0x40/0x48)
      [<c002e6f8>] (warn_slowpath_fmt) from [<c0151708>] (__vunmap+0xcc/0xf4)
      [<c015163c>] (__vunmap) from [<c015177c>] (vunmap+0x4c/0x54)
      [<c0151730>] (vunmap) from [<c001f48c>] (__iounmap+0x2c/0x30)
      [<c001f460>] (__iounmap) from [<c001f118>] (iounmap+0x1c/0x20)
      [<c001f0fc>] (iounmap) from [<bf247ae4>] (caam_probe+0x3dc/0x1498 [caam])
      [<bf247708>] (caam_probe [caam]) from [<c042da8c>] (platform_drv_probe+0x58/0xb8)
      [<c042da34>] (platform_drv_probe) from [<c042bb4c>] (driver_probe_device+0x1fc/0x2b8)
      [<c042b950>] (driver_probe_device) from [<c042bcc4>] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810
      [<c042bc08>] (__driver_attach) from [<c0429f14>] (bus_for_each_dev+0x5c/0x90)
      [<c0429eb8>] (bus_for_each_dev) from [<c042b358>] (driver_attach+0x24/0x28)
      [<c042b334>] (driver_attach) from [<c042b058>] (bus_add_driver+0xf4/0x200)
      [<c042af64>] (bus_add_driver) from [<c042cadc>] (driver_register+0x80/0xfc)
      [<c042ca5c>] (driver_register) from [<c042d960>] (__platform_driver_register+0x48/0x4c)
      [<c042d918>] (__platform_driver_register) from [<bf24b018>] (caam_driver_init+0x18/0x24 [caam])
      [<bf24b000>] (caam_driver_init [caam]) from [<c00098ac>] (do_one_initcall+0x44/0x178)
      [<c0009868>] (do_one_initcall) from [<c010e034>] (do_init_module+0x68/0x1d8)
      [<c010dfcc>] (do_init_module) from [<c00c8fbc>] (load_module+0x1974/0x20b0)
      [<c00c7648>] (load_module) from [<c00c98d0>] (SyS_finit_module+0x94/0xa0)
      [<c00c983c>] (SyS_finit_module) from [<c000fda0>] (ret_fast_syscall+0x0/0x1c)
      ---[ end trace 34e3370d88bb1786 ]---
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/drivers/clk/clk.c:594 clk_core_disable+0xe4/0x26c
      Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam]
      CPU: 0 PID: 2346 Comm: modprobe Tainted: G        W       4.8.0-rc1+ #2014
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<c0013bb0>] (dump_backtrace) from [<c0013d4c>] (show_stack+0x18/0x1c)
      [<c0013d34>] (show_stack) from [<c0357c00>] (dump_stack+0xa4/0xdc)
      [<c0357b5c>] (dump_stack) from [<c002e650>] (__warn+0xdc/0x108)
      [<c002e574>] (__warn) from [<c002e6a4>] (warn_slowpath_null+0x28/0x30)
      [<c002e67c>] (warn_slowpath_null) from [<c05b113c>] (clk_core_disable+0xe4/0x26c)
      [<c05b1058>] (clk_core_disable) from [<c05b2e3c>] (clk_core_disable_lock+0x20/0x2c)
      [<c05b2e1c>] (clk_core_disable_lock) from [<c05b2e6c>] (clk_disable+0x24/0x28)
      [<c05b2e48>] (clk_disable) from [<bf247b04>] (caam_probe+0x3fc/0x1498 [caam])
      [<bf247708>] (caam_probe [caam]) from [<c042da8c>] (platform_drv_probe+0x58/0xb8)
      [<c042da34>] (platform_drv_probe) from [<c042bb4c>] (driver_probe_device+0x1fc/0x2b8)
      [<c042b950>] (driver_probe_device) from [<c042bcc4>] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810
      [<c042bc08>] (__driver_attach) from [<c0429f14>] (bus_for_each_dev+0x5c/0x90)
      [<c0429eb8>] (bus_for_each_dev) from [<c042b358>] (driver_attach+0x24/0x28)
      [<c042b334>] (driver_attach) from [<c042b058>] (bus_add_driver+0xf4/0x200)
      [<c042af64>] (bus_add_driver) from [<c042cadc>] (driver_register+0x80/0xfc)
      [<c042ca5c>] (driver_register) from [<c042d960>] (__platform_driver_register+0x48/0x4c)
      [<c042d918>] (__platform_driver_register) from [<bf24b018>] (caam_driver_init+0x18/0x24 [caam])
      [<bf24b000>] (caam_driver_init [caam]) from [<c00098ac>] (do_one_initcall+0x44/0x178)
      [<c0009868>] (do_one_initcall) from [<c010e034>] (do_init_module+0x68/0x1d8)
      [<c010dfcc>] (do_init_module) from [<c00c8fbc>] (load_module+0x1974/0x20b0)
      [<c00c7648>] (load_module) from [<c00c98d0>] (SyS_finit_module+0x94/0xa0)
      [<c00c983c>] (SyS_finit_module) from [<c000fda0>] (ret_fast_syscall+0x0/0x1c)
      ---[ end trace 34e3370d88bb1787 ]---
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 2346 at /home/rmk/git/linux-rmk/drivers/clk/clk.c:476 clk_core_unprepare+0x204/0x388
      Modules linked in: caam(+) cbc rfcomm bnep bluetooth nfsd em28xx_rc si2157 si2168 em28xx_dvb uvcvideo snd_soc_imx_sgtl5000 em28xx snd_soc_imx_spdif tveeprom snd_soc_fsl_asoc_card snd_soc_imx_audmux snd_soc_sgtl5000 imx_sdma imx2_wdt coda v4l2_mem2mem videobuf2_dma_contig snd_soc_fsl_ssi rc_cec snd_soc_fsl_spdif imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal dw_hdmi_ahb_audio dw_hdmi_cec etnaviv fuse rc_pinnacle_pctv_hd [last unloaded: caam]
      CPU: 0 PID: 2346 Comm: modprobe Tainted: G        W       4.8.0-rc1+ #2014
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<c0013bb0>] (dump_backtrace) from [<c0013d4c>] (show_stack+0x18/0x1c)
      [<c0013d34>] (show_stack) from [<c0357c00>] (dump_stack+0xa4/0xdc)
      [<c0357b5c>] (dump_stack) from [<c002e650>] (__warn+0xdc/0x108)
      [<c002e574>] (__warn) from [<c002e6a4>] (warn_slowpath_null+0x28/0x30)
      [<c002e67c>] (warn_slowpath_null) from [<c05b0834>] (clk_core_unprepare+0x204/0x388)
      [<c05b0630>] (clk_core_unprepare) from [<c05b4c0c>] (clk_unprepare+0x2c/0x34)
      [<c05b4be0>] (clk_unprepare) from [<bf247b0c>] (caam_probe+0x404/0x1498 [caam])
      [<bf247708>] (caam_probe [caam]) from [<c042da8c>] (platform_drv_probe+0x58/0xb8)
      [<c042da34>] (platform_drv_probe) from [<c042bb4c>] (driver_probe_device+0x1fc/0x2b8)
      [<c042b950>] (driver_probe_device) from [<c042bcc4>] (__driver_attach+0xbc/0xc0) r10:00000000 r8:bf24b000 r7:00000000 r6:ef215844 r5:bf2490c4 r4:ef215810
      [<c042bc08>] (__driver_attach) from [<c0429f14>] (bus_for_each_dev+0x5c/0x90)
      [<c0429eb8>] (bus_for_each_dev) from [<c042b358>] (driver_attach+0x24/0x28)
      [<c042b334>] (driver_attach) from [<c042b058>] (bus_add_driver+0xf4/0x200)
      [<c042af64>] (bus_add_driver) from [<c042cadc>] (driver_register+0x80/0xfc)
      [<c042ca5c>] (driver_register) from [<c042d960>] (__platform_driver_register+0x48/0x4c)
      [<c042d918>] (__platform_driver_register) from [<bf24b018>] (caam_driver_init+0x18/0x24 [caam])
      [<bf24b000>] (caam_driver_init [caam]) from [<c00098ac>] (do_one_initcall+0x44/0x178)
      [<c0009868>] (do_one_initcall) from [<c010e034>] (do_init_module+0x68/0x1d8)
      [<c010dfcc>] (do_init_module) from [<c00c8fbc>] (load_module+0x1974/0x20b0)
      [<c00c7648>] (load_module) from [<c00c98d0>] (SyS_finit_module+0x94/0xa0)
      [<c00c983c>] (SyS_finit_module) from [<c000fda0>] (ret_fast_syscall+0x0/0x1c)
      ---[ end trace 34e3370d88bb1788 ]---
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      bdc67da7
  29. 31 5月, 2016 1 次提交
    • H
      crypto: caam - handle core endianness != caam endianness · 261ea058
      Horia Geantă 提交于
      There are SoCs like LS1043A where CAAM endianness (BE) does not match
      the default endianness of the core (LE).
      Moreover, there are requirements for the driver to handle cases like
      CPU_BIG_ENDIAN=y on ARM-based SoCs.
      This requires for a complete rewrite of the I/O accessors.
      
      PPC-specific accessors - {in,out}_{le,be}XX - are replaced with
      generic ones - io{read,write}[be]XX.
      
      Endianness is detected dynamically (at runtime) to allow for
      multiplatform kernels, for e.g. running the same kernel image
      on LS1043A (BE CAAM) and LS2080A (LE CAAM) armv8-based SoCs.
      
      While here: debugfs entries need to take into consideration the
      endianness of the core when displaying data. Add the necessary
      glue code so the entries remain the same, but they are properly
      read, regardless of the core and/or SEC endianness.
      
      Note: pdb.h fixes only what is currently being used (IPsec).
      Reviewed-by: NTudor Ambarus <tudor-dan.ambarus@nxp.com>
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NAlex Porosanu <alexandru.porosanu@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      261ea058