diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-08-31 15:58:45 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-12-25 11:01:20 +1100 |
commit | 420a4b20c504e4674bf253601f793bdb254f99fa (patch) | |
tree | 574f50a8ac2a5f8abfbbdec1519a47ae837a3381 /crypto/api.c | |
parent | 1c06da81a5d042d5fba67c4c533b16ae62a174ab (diff) | |
download | kernel-common-420a4b20c504e4674bf253601f793bdb254f99fa.tar.gz kernel-common-420a4b20c504e4674bf253601f793bdb254f99fa.tar.bz2 kernel-common-420a4b20c504e4674bf253601f793bdb254f99fa.zip |
crypto: padlock - Avoid resetting cword on successive operations
Resetting the control word is quite expensive. Fortunately this
isn't an issue for the common operations such as CBC and ECB as
the whole operation is done through a single call. However, modes
such as LRW and XTS have to call padlock over and over again for
one operation which really hurts if each call resets the control
word.
This patch uses an idea by Sebastian Siewior to store the last
control word used on a CPU and only reset the control word if
that changes.
Note that any task switch automatically resets the control word
so we only need to be accurate with regard to the stored control
word when no task switches occur.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/api.c')
0 files changed, 0 insertions, 0 deletions