From: David S. Miller Date: Sun, 2 Sep 2012 06:05:43 +0000 (-0700) Subject: sparc64: Fix bugs in unrolled 256-bit loops. X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~48^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699871bc943be418be13208526bc613d68017fab;p=pandora-kernel.git sparc64: Fix bugs in unrolled 256-bit loops. Some dm-crypt testing revealed several bugs in the 256-bit unrolled loops. The DECRYPT_256_2() macro had two errors: 1) Missing reload of KEY registers %f60 and %f62 2) Missing "\" in penultimate line of definition. In aes_sparc64_ecb_decrypt_256, we were storing the second half of the encryption result from the wrong source registers. In aes_sparc64_ctr_crypt_256 we have to be careful when we fall out of the 32-byte-at-a-time loop and handle a trailing 16-byte chunk. In that case we've clobbered the final key holding registers and have to restore them before executing the ENCRYPT_256() macro. Inside of the 32-byte-at-a-time loop things are OK, because we do this key register restoring during the first few rounds of the ENCRYPT_256_2() macro. Signed-off-by: David S. Miller --- Reading git-diff-tree failed