• Heiko Stuebner's avatar
    riscv: don't warn for sifive erratas in modules · dc5cb7a8
    Heiko Stuebner authored
    The SiFive errata code contains code checking applicable erratas
    vs. actually applied erratas to suggest missing erratas to the
    user when their Kconfig options are not enabled.
    
    In the main kernel image one can be quite sure that all available
    erratas appear at least once, so that check will succeed.
    On the other hand modules can very well not use any errata-relevant
    code, so the newly added module-alternative support may also patch
    the module code, but not touch SiFive-specific erratas at all.
    
    So to restore the original behaviour don't warn when patching
    modules. This will keep the warning if necessary for the main kernel
    image but prevent spurious warnings for modules.
    
    Of course having such a vendor-specific warning may not be needed at
    all, as CONFIG_ERRATA_SIFIVE is selected by CONFIG_SOC_SIFIVE and the
    individual erratas are default-y so disabling them requires
    deliberate action anyway. But for now just restore the old behaviour.
    
    Fixes: a8e91016 ("riscv: implement module alternatives")
    Reported-by: default avatarRon Economos <re@w6rz.net>
    Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
    Tested-by: default avatarRon Economos <re@w6rz.net>
    Link: https://lore.kernel.org/r/20220608120849.1695191-1-heiko@sntech.de
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
    dc5cb7a8
errata.c 3.04 KB