[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080416184016.GA21365@Chamillionaire.breakpoint.cc>
Date: Wed, 16 Apr 2008 20:40:16 +0200
From: Sebastian Siewior <linux-crypto@...breakpoint.cc>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"Adam J. Richter" <adam@...drasil.com>, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
mingo@...e.hu, tglx@...utronix.de
Subject: Re: [PATCH -mm crypto] AES: x86_64 asm implementation optimization
cut Alexander Kjeldaas <astor@...t.no> from CC coz his mails bounce.
* Huang, Ying | 2008-04-16 16:19:09 [+0800]:
>Can you help me to test these patches
>to find out the reason for degradation on AMD CPU.
Sure.
>> >--- a/include/crypto/aes.h
>> >+++ b/include/crypto/aes.h
>> >@@ -19,6 +19,7 @@
>> >
>> > struct crypto_aes_ctx {
>> > u32 key_length;
>> >+ u32 _pad1;
>>
>> Why is this pad required? Do you want special alignment of the keys?
>
>Because the key is loaded in 64bit in this patch, I want to align the
>key with 64bit address.
Than this won't work all the time. To make it bulletproof
- set .cra_alignmask in the glue code properly
- use the attribute aligned thing
- retrieve your private struct via crypto_tfm_ctx_aligned()
You might want to take a look on padlock-aes.c. The same thing is done
there but instead of crypto_tfm_ctx_aligned() a private function is
used (to let the compiler optimize most of the code away). Depending on
Herbert's mood you might get away with this as well (what would be
probably the case since you might prefer to do it asm) :)
>> > u32 key_enc[AES_MAX_KEYLENGTH_U32];
>> > u32 key_dec[AES_MAX_KEYLENGTH_U32];
>> > };
>> >
>
>Best Regards,
>Huang Ying
>
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists