1. 11 May, 2015 10 commits
    • Dan Streetman's avatar
      crypto: nx - simplify pSeries nx842 driver · b8e04187
      Dan Streetman authored
      Simplify the pSeries NX-842 driver: do not expect incoming buffers to be
      exactly page-sized; do not break up input buffers to compress smaller
      blocks; do not use any internal headers in the compressed data blocks;
      remove the software decompression implementation; implement the pSeries
      nx842_constraints.
      
      This changes the pSeries NX-842 driver to perform constraints-based
      compression so that it only needs to compress one entire input block at a
      time.  This removes the need for it to split input data blocks into
      multiple compressed data sections in the output buffer, and removes the
      need for any extra header info in the compressed data; all that is moved
      (in a later patch) into the main crypto 842 driver.  Additionally, the
      842 software decompression implementation is no longer needed here, as
      the crypto 842 driver will use the generic software 842 decompression
      function as a fallback if any hardware 842 driver fails.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b8e04187
    • Dan Streetman's avatar
      crypto: nx - add PowerNV platform NX-842 driver · 99182a42
      Dan Streetman authored
      Add driver for NX-842 hardware on the PowerNV platform.
      
      This allows the use of the 842 compression hardware coprocessor on
      the PowerNV platform.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      99182a42
    • Dan Streetman's avatar
      crypto: nx - add nx842 constraints · 959e6659
      Dan Streetman authored
      Add "constraints" for the NX-842 driver.  The constraints are used to
      indicate what the current NX-842 platform driver is capable of.  The
      constraints tell the NX-842 user what alignment, min and max length, and
      length multiple each provided buffers should conform to.  These are
      required because the 842 hardware requires buffers to meet specific
      constraints that vary based on platform - for example, the pSeries
      max length is much lower than the PowerNV max length.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      959e6659
    • Dan Streetman's avatar
      crypto: nx - add NX-842 platform frontend driver · 7011a122
      Dan Streetman authored
      Add NX-842 frontend that allows using either the pSeries platform or
      PowerNV platform driver (to be added by later patch) for the NX-842
      hardware.  Update the MAINTAINERS file to include the new filenames.
      Update Kconfig files to clarify titles and descriptions, and correct
      dependencies.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      7011a122
    • Dan Streetman's avatar
      crypto: nx - rename nx-842.c to nx-842-pseries.c · fdd05e4b
      Dan Streetman authored
      Move the entire NX-842 driver for the pSeries platform from the file
      nx-842.c to nx-842-pseries.c.  This is required by later patches that
      add NX-842 support for the PowerNV platform.
      
      This patch does not alter the content of the pSeries NX-842 driver at
      all, it only changes the filename.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      fdd05e4b
    • Dan Streetman's avatar
      crypto: 842 - change 842 alg to use software · 2062c5b6
      Dan Streetman authored
      Change the crypto 842 compression alg to use the software 842 compression
      and decompression library.  Add the crypto driver_name as "842-generic".
      Remove the fallback to LZO compression.
      
      Previously, this crypto compression alg attemped 842 compression using
      PowerPC hardware, and fell back to LZO compression and decompression if
      the 842 PowerPC hardware was unavailable or failed.  This should not
      fall back to any other compression method, however; users of this crypto
      compression alg can fallback if desired, and transparent fallback tricks
      callers into thinking they are getting 842 compression when they actually
      get LZO compression - the failure of the 842 hardware should not be
      transparent to the caller.
      
      The crypto compression alg for a hardware device also should not be located
      in crypto/ so this is now a software-only implementation that uses the 842
      software compression/decompression library.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      2062c5b6
    • Dan Streetman's avatar
      lib: add software 842 compression/decompression · 2da572c9
      Dan Streetman authored
      Add 842-format software compression and decompression functions.
      Update the MAINTAINERS 842 section to include the new files.
      
      The 842 compression function can compress any input data into the 842
      compression format.  The 842 decompression function can decompress any
      standard-format 842 compressed data - specifically, either a compressed
      data buffer created by the 842 software compression function, or a
      compressed data buffer created by the 842 hardware compressor (located
      in PowerPC coprocessors).
      
      The 842 compressed data format is explained in the header comments.
      
      This is used in a later patch to provide a full software 842 compression
      and decompression crypto interface.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      2da572c9
    • Dan Streetman's avatar
      powerpc: Add ICSWX instruction · edc424f8
      Dan Streetman authored
      Add the asm ICSWX and ICSWEPX opcodes.  Add definitions for the
      Coprocessor Request structures needed to use the icswx calls to
      coprocessors.  Add icswx() function to perform the ICSWX asm
      using the provided Coprocessor Command Word value and
      Coprocessor Request Block structure.
      
      This is required for communication with the NX-842 coprocessor on
      a PowerNV system.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      edc424f8
    • Dan Streetman's avatar
      powerpc: export of_get_ibm_chip_id function · b130e7c0
      Dan Streetman authored
      Export the of_get_ibm_chip_id() function.  This will be used by the
      PowerNV NX-842 driver.
      Signed-off-by: default avatarDan Streetman <ddstreet@ieee.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b130e7c0
    • Ard Biesheuvel's avatar
      crypto: testmgr - add test cases for CRC32 · ebb3472f
      Ard Biesheuvel authored
      This adds a couple of test cases for CRC32 (not CRC32c) to
      ensure that the generic and arch specific implementations
      are in sync.
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarSteve Capper <steve.capper@linaro.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      ebb3472f
  2. 01 May, 2015 2 commits
    • David Howells's avatar
      crypto: testmgr - Wrap the LHS in expressions of the form !x == y · 09e21784
      David Howells authored
      In the test manager, there are a number of if-statements with expressions of
      the form !x == y that incur warnings with gcc-5 of the following form:
      
      ../crypto/testmgr.c: In function '__test_aead':
      ../crypto/testmgr.c:523:12: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
         if (!ret == template[i].fail) {
                  ^
      
      By converting the 'fail' member of struct aead_testvec and struct
      cipher_testvec to a bool, we can get rid of the warnings.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      09e21784
    • David Howells's avatar
      crypto: pcomp - Constify (de)compression parameters · f94a3597
      David Howells authored
      In testmgr, struct pcomp_testvec takes a non-const 'params' field, which is
      pointed to a const deflate_comp_params or deflate_decomp_params object.  With
      gcc-5 this incurs the following warnings:
      
      In file included from ../crypto/testmgr.c:44:0:
      ../crypto/testmgr.h:28736:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
         .params = &deflate_comp_params,
                   ^
      ../crypto/testmgr.h:28748:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
         .params = &deflate_comp_params,
                   ^
      ../crypto/testmgr.h:28776:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
         .params = &deflate_decomp_params,
                   ^
      ../crypto/testmgr.h:28800:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers]
         .params = &deflate_decomp_params,
                   ^
      
      Fix this by making the parameters pointer const and constifying the things
      that use it.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      f94a3597
  3. 28 Apr, 2015 1 commit
  4. 26 Apr, 2015 6 commits
  5. 23 Apr, 2015 16 commits
  6. 22 Apr, 2015 5 commits