Skip to content

Commit

Permalink
crypto: tcrypt - don't disable irqs and wait
Browse files Browse the repository at this point in the history
The tcrypt AEAD cycles speed tests disables irqs during the test, which is
broken at the very least since commit
'1425d2d17f7309c6 ("crypto: tcrypt - Fix AEAD speed tests")'
adds a wait for completion as part of the test and probably since
switching to the new AEAD API.

While the result of taking a cycle count diff may not mean much on SMP
systems if the task migrates, it's good enough for tcrypt being the quick
& dirty dev tool it is. It's also what all the other (i.e. hash) cycle
speed tests do.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reported-by: Ofir Drang <ofir.drang@arm.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Gilad Ben-Yossef authored and Herbert Xu committed May 18, 2017
1 parent 9933e11 commit 981a2e3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ static int test_aead_cycles(struct aead_request *req, int enc, int blen)
int ret = 0;
int i;

local_irq_disable();

/* Warm-up run. */
for (i = 0; i < 4; i++) {
if (enc)
Expand Down Expand Up @@ -169,8 +167,6 @@ static int test_aead_cycles(struct aead_request *req, int enc, int blen)
}

out:
local_irq_enable();

if (ret == 0)
printk("1 operation in %lu cycles (%d bytes)\n",
(cycles + 4) / 8, blen);
Expand Down

0 comments on commit 981a2e3

Please sign in to comment.