• Ard Biesheuvel's avatar
    crypto: arm64/aes-ccm - Cache round keys and unroll AES loops · 565def15
    Ard Biesheuvel authored
    The CCM code as originally written attempted to use as few NEON
    registers as possible, to avoid having to eagerly preserve/restore the
    entire NEON register file at every call to kernel_neon_begin/end. At
    that time, this API took a number of NEON registers as a parameter, and
    only preserved that many registers.
    
    Today, the NEON register file is restored lazily, and the old API is
    long gone. This means we can use as many NEON registers as we can make
    meaningful use of, which means in the AES case that we can keep all
    round keys in registers rather than reloading each of them for each AES
    block processed.
    
    On Cortex-A53, this results in a speedup of more than 50%. (From 4
    cycles per byte to 2.6 cycles per byte)
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    565def15
aes-ce-ccm-core.S 3.94 KB