Commit f79d2d28 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: skcipher - Use restrict rather than hand-rolling accesses



Rather than accessing 'alg' directly to avoid the aliasing issue
which leads to unnecessary reloads, use the __restrict keyword
to explicitly tell the compiler that there is no aliasing.

This generates equivalent if not superior code on x86 with gcc 12.

Note that in skcipher_walk_virt the alg assignment is moved after
might_sleep_if because that function is a compiler barrier and
forces a reload.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 006401d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment