• Cyrille Pitchen's avatar
    crypto: atmel-aes - improve performances of data transfer · bbe628ed
    Cyrille Pitchen authored
    This patch totally reworks data transfer.
    
    1 - DMA
    
    The new code now fully supports scatter-gather lists hence reducing the
    number of interrupts in some cases. Also buffer alignments are better
    managed to avoid useless copies.
    
    2 - CPU
    
    The new code allows to use PIO accesses even when transferring more than
    one AES block, so futher patches could tune the DMA threshold
    (ATMEL_AES_DMA_THRESHOLD).
    Moreover, CPU transfers now have a chance to be processed synchronously,
    hence reducing the latency by avoiding context switches when possible
    (less interrupts to process, less scheduling of the 'done' task).
    Indeed the 'DATA READY' bit is polled only one time in the Interrupt
    Status Register before enabling then waiting for the associated interrupt.
    In some condition, this single poll is enough as the data have already
    been processed by the AES hardware and so are ready.
    Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    bbe628ed
atmel-aes.c 34 KB