Hi, Sebastian, The files attached is the separated patches, from step1 to step 7. Thank you very much for your help. Best Regards, Huang Ying On Wed, 2008-04-16 at 20:40 +0200, Sebastian Siewior wrote: > cut Alexander Kjeldaas 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