Skip to content

Commit

Permalink
sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
Browse files Browse the repository at this point in the history
We tried linking in a single built object to hold the device table,
but only works if all of the sparc64 crypto modules get built the same
way (modular vs. non-modular).

Just include the device ID stub into each driver source file so that
the table gets compiled into the correct result in all cases.

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Nov 10, 2012
1 parent 193d2aa commit 226f7ce
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 8 deletions.
16 changes: 8 additions & 8 deletions arch/sparc/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ obj-$(CONFIG_CRYPTO_DES_SPARC64) += camellia-sparc64.o

obj-$(CONFIG_CRYPTO_CRC32C_SPARC64) += crc32c-sparc64.o

sha1-sparc64-y := sha1_asm.o sha1_glue.o crop_devid.o
sha256-sparc64-y := sha256_asm.o sha256_glue.o crop_devid.o
sha512-sparc64-y := sha512_asm.o sha512_glue.o crop_devid.o
md5-sparc64-y := md5_asm.o md5_glue.o crop_devid.o
sha1-sparc64-y := sha1_asm.o sha1_glue.o
sha256-sparc64-y := sha256_asm.o sha256_glue.o
sha512-sparc64-y := sha512_asm.o sha512_glue.o
md5-sparc64-y := md5_asm.o md5_glue.o

aes-sparc64-y := aes_asm.o aes_glue.o crop_devid.o
des-sparc64-y := des_asm.o des_glue.o crop_devid.o
camellia-sparc64-y := camellia_asm.o camellia_glue.o crop_devid.o
aes-sparc64-y := aes_asm.o aes_glue.o
des-sparc64-y := des_asm.o des_glue.o
camellia-sparc64-y := camellia_asm.o camellia_glue.o

crc32c-sparc64-y := crc32c_asm.o crc32c_glue.o crop_devid.o
crc32c-sparc64-y := crc32c_asm.o crc32c_glue.o
2 changes: 2 additions & 0 deletions arch/sparc/crypto/aes_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,3 +475,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("AES Secure Hash Algorithm, sparc64 aes opcode accelerated");

MODULE_ALIAS("aes");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/camellia_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Camellia Cipher Algorithm, sparc64 camellia opcode accelerated");

MODULE_ALIAS("aes");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/crc32c_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("CRC32c (Castagnoli), sparc64 crc32c opcode accelerated");

MODULE_ALIAS("crc32c");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/des_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("DES & Triple DES EDE Cipher Algorithms, sparc64 des opcode accelerated");

MODULE_ALIAS("des");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/md5_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("MD5 Secure Hash Algorithm, sparc64 md5 opcode accelerated");

MODULE_ALIAS("md5");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/sha1_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@ MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, sparc64 sha1 opcode accelerated");

MODULE_ALIAS("sha1");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/sha256_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,5 @@ MODULE_DESCRIPTION("SHA-224 and SHA-256 Secure Hash Algorithm, sparc64 sha256 op

MODULE_ALIAS("sha224");
MODULE_ALIAS("sha256");

#include "crop_devid.c"
2 changes: 2 additions & 0 deletions arch/sparc/crypto/sha512_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,5 @@ MODULE_DESCRIPTION("SHA-384 and SHA-512 Secure Hash Algorithm, sparc64 sha512 op

MODULE_ALIAS("sha384");
MODULE_ALIAS("sha512");

#include "crop_devid.c"

0 comments on commit 226f7ce

Please sign in to comment.