20 Dec, 2011

3 commits


30 Nov, 2011

1 commit

  • This patch converts the drivers in drivers/crypto/* to use the
    module_platform_driver() macro which makes the code smaller and a bit
    simpler.

    Cc: James Hsiao
    Cc: Sebastian Andrzej Siewior
    Cc: Kim Phillips
    Cc: "David S. Miller"
    Signed-off-by: Axel Lin
    Acked-by: Vladimir Zapolskiy
    Acked-by: Jamie Iles
    Signed-off-by: Herbert Xu

    Axel Lin
     

21 Nov, 2011

4 commits

  • Some later SEC v3.x are equipped with a second IRQ line.
    By correctly assigning IRQ affinity, this feature can be
    used to increase performance on dual core parts, like the
    MPC8572E and P2020E.

    The existence of the 2nd IRQ is determined from the device
    node's interrupt property. If present, the driver remaps
    two of four channels, which in turn makes those channels
    trigger their interrupts on the 2nd line instead of the first.
    To handle single- and dual-IRQ combinations efficiently,
    talitos gets two new interrupt handlers and back-half workers.

    [includes a fix to MCR_LO's address.]

    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Kim Phillips
     
  • Add a reg member to the channel struct and use it to
    access channels.

    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Kim Phillips
     
  • talitos prints every algorithm it registers at module load time.
    Algorithms are being added that make for an excessively noisy console
    (latest HMACs patch makes an SEC 3.1 print 20 lines).
    Instead, display the SEC h/w version number, and inform the
    user of algorithm registration status in /proc/crypto, like so:

    talitos ffe30000.crypto: fsl,sec3.1 algorithms registered in /proc/crypto

    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Kim Phillips
     
  • Add these hmac algorithms to talitos:
    hmac(md5),
    hmac(sha1),
    hmac(sha224),
    hmac(sha256),
    hmac(sha384),
    hmac(sha512).
    These are all type ahash.

    Signed-off-by: Lee Nipper

    Fixed up to not register HMAC algorithms on sec2.0 devices.
    Rationale (from Lee):

    on an 8349E Rev1.1, there's a problem with hmac for any talitos
    hmac sequence requiring an intermediate hash context (Pointer
    DWORD 1); the result is an incorrect hmac. An intermediate hash
    context is required for something longer than (65536-blocksize),
    and for other cases when update/finup/final are used inefficiently.
    Interestingly, a normal hash (without hmac) works perfectly
    when using an intermediate context.

    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper
     

21 Oct, 2011

1 commit

  • The CDPR (Current Descriptor Pointer Register) can be unreliable
    when trying to locate an offending descriptor. Handle that case by
    (a) not OOPSing, and (b) reverting to the machine internal copy of
    the descriptor header in order to report the correct execution unit
    error.

    Note: printing all execution units' ISRs is not effective because it
    results in an internal time out (ITO) error and the EU resetting its
    ISR value (at least when specifying an invalid key length on an SEC
    2.2/MPC8313E).

    Reported-by: Sven Schnelle
    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Kim Phillips
     

15 Jul, 2011

4 commits


01 Mar, 2011

1 commit


25 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: Makefile - replace the use of -objs with -y
    crypto: hifn_795x - use cancel_delayed_work_sync()
    crypto: talitos - sparse check endian fixes
    crypto: talitos - fix checkpatch warning
    crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
    crypto: cryptd - Adding the AEAD interface type support to cryptd
    crypto: n2_crypto - Niagara2 driver needs to depend upon CRYPTO_DES
    crypto: Kconfig - update broken web addresses
    crypto: omap-sham - Adjust DMA parameters
    crypto: fips - FIPS requires algorithm self-tests
    crypto: omap-aes - OMAP2/3 AES hw accelerator driver
    crypto: updates to enable omap aes
    padata: add missing __percpu markup in include/linux/padata.h
    MAINTAINERS: Add maintainer entries for padata/pcrypt

    Linus Torvalds
     

23 Sep, 2010

3 commits


06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

05 Aug, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (39 commits)
    random: Reorder struct entropy_store to remove padding on 64bits
    padata: update API documentation
    padata: Remove padata_get_cpumask
    crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier
    crypto: pcrypt - Rename pcrypt_instance
    padata: Pass the padata cpumasks to the cpumask_change_notifier chain
    padata: Rearrange set_cpumask functions
    padata: Rename padata_alloc functions
    crypto: pcrypt - Dont calulate a callback cpu on empty callback cpumask
    padata: Check for valid cpumasks
    padata: Allocate cpumask dependend recources in any case
    padata: Fix cpu index counting
    crypto: geode_aes - Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
    pcrypt: Added sysfs interface to pcrypt
    padata: Added sysfs primitives to padata subsystem
    padata: Make two separate cpumasks
    padata: update documentation
    padata: simplify serialization mechanism
    padata: make padata_do_parallel to return zero on success
    padata: Handle empty padata cpumasks
    ...

    Linus Torvalds
     

19 Jul, 2010

1 commit

  • In function sg_copy_end_to_buffer, too much data
    is copied when a segment in the scatterlist
    has .length greater than the requested copy length.

    This patch adds the limit checks to fix this bug of over copying,
    which affected only the ahash algorithms.

    Signed-off-by: Lee Nipper
    Acked-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper
     

16 Jun, 2010

1 commit

  • Correct ahash_process_req() to properly handle cases
    where the total hash amount is a multiple of the blocksize.
    The SEC must have some data to hash during the very last
    descriptor operation; so up to one whole blocksize
    of data is buffered until the final hash.

    Signed-off-by: Lee Nipper
    Signed-off-by: Herbert Xu

    Lee Nipper
     

22 May, 2010

2 commits

  • Merging in current state of Linus' tree to deal with merge conflicts and
    build failures in vio.c after merge.

    Conflicts:
    drivers/i2c/busses/i2c-cpm.c
    drivers/i2c/busses/i2c-mpc.c
    drivers/net/gianfar.c

    Also fixed up one line in arch/powerpc/kernel/vio.c to use the
    correct node pointer.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • .name, .match_table and .owner are duplicated in both of_platform_driver
    and device_driver. This patch is a removes the extra copies from struct
    of_platform_driver and converts all users to the device_driver members.

    This patch is a pretty mechanical change. The usage model doesn't change
    and if any drivers have been missed, or if anything has been fixed up
    incorrectly, then it will fail with a compile time error, and the fixup
    will be trivial. This patch looks big and scary because it touches so
    many files, but it should be pretty safe.

    Signed-off-by: Grant Likely
    Acked-by: Sean MacLennan

    Grant Likely
     

19 May, 2010

5 commits

  • SEC h/w versions 2.1 and above support sha224 via explicit instruction.

    Performing sha224 ahashes on earlier versions is still possible because
    they support sha256 (sha224 is sha256 with different initial constants
    and a different truncation length). We do this by overriding hardware
    context self-initialization, and perform it manually in s/w instead.

    Thanks to Lee for his fixes for correct execution on actual sec2.0 h/w.

    Signed-off-by: Kim Phillips
    Signed-off by: Lee Nipper
    Signed-off-by: Herbert Xu

    Kim Phillips
     
  • Add the following alorithms to talitos:
    md5,
    sha1,
    sha256,
    sha384,
    sha512.
    These are all type ahash.

    Signed-off-by: Lee Nipper
    Acked-By: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper
     
  • Used talitos_alg_template in talitos_crypto_alg
    so that it will accommodate ahash algorithms.
    Added some preparation code for ahash allocation and removal.
    No actual algorithms yet.

    Signed-off-by: Lee Nipper
    Acked-By: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper
     
  • No functional changes.
    Use a union in talitos_alg_template for the crypto_alg
    so that we can add a member later for ahash_alg.

    Signed-off-by: Lee Nipper
    Acked-By: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper
     
  • The following structure elements duplicate the information in
    'struct device.of_node' and so are being eliminated. This patch
    makes all readers of these elements use device.of_node instead.

    (struct of_device *)->node
    (struct dev_archdata *)->prom_node (sparc)
    (struct dev_archdata *)->of_node (powerpc & microblaze)

    Signed-off-by: Grant Likely

    Grant Likely
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

17 Jan, 2010

1 commit

  • From: Márton Németh

    The match_table field of the struct of_device_id is constant in
    so it is worth to make the initialization data also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Márton Németh
    Cc: Julia Lawall
    Cc: cocci@diku.dk
    Signed-off-by: Herbert Xu

    Márton Németh
     

13 Aug, 2009

3 commits


02 Jun, 2009

5 commits


25 Dec, 2008

1 commit

  • Previous commit for interrupt mitigation moved the done interrupt
    acknowlegement from the isr to the talitos_done tasklet.
    This patch moves the done interrupt acknowledgement back
    into the isr so that done interrupts will always be acknowledged.
    This covers the case for acknowledging interrupts for channel done processing
    that has actually already been completed by the tasklet prior to fielding
    a pending interrupt.

    Signed-off-by: Lee Nipper
    Signed-off-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Lee Nipper