[CRYPTO] api: Set default CRYPTO_MINALIGN to unsigned long long
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 8 Jan 2008 06:16:44 +0000 (17:16 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jan 2008 21:17:01 +0000 (08:17 +1100)
Thanks to David Miller for pointing out that the SLAB (or SLOB/SLUB)
cache uses the alignment of unsigned long long if the architecture
kmalloc/slab alignment macros are not defined.

This patch changes the CRYPTO_MINALIGN so that it uses the same default
value.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/linux/crypto.h

index 0aba1046020167aa10df631c1407fdecb5d3de53..5e02d1b46370c4a9b496359bbbe98eca883b6229 100644 (file)
 #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
 #elif defined(ARCH_SLAB_MINALIGN)
 #define CRYPTO_MINALIGN ARCH_SLAB_MINALIGN
+#else
+#define CRYPTO_MINALIGN __alignof__(unsigned long long)
 #endif
 
-#ifdef CRYPTO_MINALIGN
 #define CRYPTO_MINALIGN_ATTR __attribute__ ((__aligned__(CRYPTO_MINALIGN)))
-#else
-#define CRYPTO_MINALIGN_ATTR
-#endif
 
 struct scatterlist;
 struct crypto_ablkcipher;