• Arnd Bergmann's avatar
    crypto: caam - make aamalg_desc a proper module · 37d84681
    Arnd Bergmann authored
    The drivers/crypto/caam/ directory is entered during build only
    for building modules when CONFIG_CRYPTO_DEV_FSL_CAAM=m, but
    CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is defined as a
    'bool' symbol, meaning that caamalg_desc.c is always compiled
    into built-in code, or not at all, leading to a link failure:
    
    ERROR: "cnstr_shdsc_xts_ablkcipher_decap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_xts_ablkcipher_encap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_aead_givencap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_aead_decap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_aead_encap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_aead_null_decap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_aead_null_encap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_rfc4106_decap" [drivers/crypto/caam/caamalg.ko] undefined!
    ERROR: "cnstr_shdsc_rfc4106_encap" [drivers/crypto/caam/caamalg.ko] undefined!
    ...
    
    Making caamalg_desc itself a loadable module fixes this configuration
    by ensuring the driver gets built. Aside from making the symbol
    'tristate', I'm adding appropriate module metadata here.
    
    Fixes: 8cea7b66 ("crypto: caam - refactor encryption descriptors generation")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    37d84681
Kconfig 4.24 KB