1. 31 5月, 2018 1 次提交
  2. 21 4月, 2018 2 次提交
  3. 03 3月, 2018 2 次提交
  4. 08 2月, 2018 1 次提交
  5. 28 12月, 2017 1 次提交
  6. 20 9月, 2017 1 次提交
  7. 09 8月, 2017 1 次提交
  8. 03 8月, 2017 1 次提交
  9. 18 7月, 2017 1 次提交
  10. 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
  11. 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
  12. 28 2月, 2017 1 次提交
  13. 15 2月, 2017 3 次提交
  14. 07 12月, 2016 2 次提交
  15. 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
  16. 25 10月, 2016 1 次提交
  17. 31 8月, 2016 1 次提交
  18. 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
  19. 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
  20. 28 5月, 2016 1 次提交
    • A
      remove lots of IS_ERR_VALUE abuses · 287980e4
      Arnd Bergmann 提交于
      Most users of IS_ERR_VALUE() in the kernel are wrong, as they
      pass an 'int' into a function that takes an 'unsigned long'
      argument. This happens to work because the type is sign-extended
      on 64-bit architectures before it gets converted into an
      unsigned type.
      
      However, anything that passes an 'unsigned short' or 'unsigned int'
      argument into IS_ERR_VALUE() is guaranteed to be broken, as are
      8-bit integers and types that are wider than 'unsigned long'.
      
      Andrzej Hajda has already fixed a lot of the worst abusers that
      were causing actual bugs, but it would be nice to prevent any
      users that are not passing 'unsigned long' arguments.
      
      This patch changes all users of IS_ERR_VALUE() that I could find
      on 32-bit ARM randconfig builds and x86 allmodconfig. For the
      moment, this doesn't change the definition of IS_ERR_VALUE()
      because there are probably still architecture specific users
      elsewhere.
      
      Almost all the warnings I got are for files that are better off
      using 'if (err)' or 'if (err < 0)'.
      The only legitimate user I could find that we get a warning for
      is the (32-bit only) freescale fman driver, so I did not remove
      the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
      For 9pfs, I just worked around one user whose calling conventions
      are so obscure that I did not dare change the behavior.
      
      I was using this definition for testing:
      
       #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
             unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))
      
      which ends up making all 16-bit or wider types work correctly with
      the most plausible interpretation of what IS_ERR_VALUE() was supposed
      to return according to its users, but also causes a compile-time
      warning for any users that do not pass an 'unsigned long' argument.
      
      I suggested this approach earlier this year, but back then we ended
      up deciding to just fix the users that are obviously broken. After
      the initial warning that caused me to get involved in the discussion
      (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
      asked me to send the whole thing again.
      
      [ Updated the 9p parts as per Al Viro  - Linus ]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: https://lkml.org/lkml/2016/1/7/363
      Link: https://lkml.org/lkml/2016/5/27/486
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      287980e4
  21. 25 1月, 2016 2 次提交
  22. 24 8月, 2015 4 次提交
  23. 18 8月, 2015 1 次提交
    • H
      crypto: caam - add support for LS1021A · 6c3af955
      Horia Geant? 提交于
      LS1021A is a QorIQ SoC having little endian CAAM.
      
      There are a few differences b/w QorIQ and i.MX from CAAM perspective:
      
      1. i.MX platforms are somewhat special wrt. 64-bit registers:
      -big endian format at 64-bit level: MSW at address+0 and LSW at address+4
      -little endian format at 32-bit level (within MSW and LSW)
      and thus need special handling.
      
      2. No CCM (clock controller module) for QorIQ.
      No CAAM clocks to enable / disable.
      
      A new Kconfig option - CRYPTO_DEV_FSL_CAAM_LE - is added to indicate
      CAAM is little endian (*). It is hidden from the user (to avoid
      misconfiguration); when adding support for a new platform with LE CAAM,
      either the Kconfig needs to be updated or the corresponding defconfig
      needs to indicate that CAAM is LE.
      (*) Using a DT property to provide CAAM endianness would not allow
      for the ifdeffery.
      
      In order to keep changes to a minimum, the following changes
      are postponed:
      -endianness fix of the last word in the S/G (rsvd2, bpid, offset),
      fields are always 0 anyway;
      -S/G format fix for i.MX7 (yes, i.MX7 support was not added yet,
      but still...)
      Signed-off-by: NHoria Geant? <horia.geanta@freescale.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      6c3af955
  24. 13 8月, 2015 1 次提交
  25. 10 8月, 2015 2 次提交
  26. 20 7月, 2015 3 次提交
  27. 16 6月, 2015 1 次提交