Skip to content

Commit 28a12ef

Browse files
andreas-schwabPaul Walmsley
authored andcommitted
errata/sifive: remove unreliable warn_miss_errata
When both the SiFive and MIPS errata are enabled then sifive_errata_patch_func emits a wrong and misleading warning claiming that the SiFive errata haven't been applied. This happens because sifive_errata_patch_func is being called twice, once for the kernel image and once for the vdso image. The vdso image has alternative entries for the MIPS errata, but none for the SiFive errata. Signed-off-by: Andreas Schwab <schwab@suse.de> Link: https://patch.msgid.link/mvmv7i8q8gg.fsf@suse.de Signed-off-by: Paul Walmsley <pjw@kernel.org>
1 parent 494d4a0 commit 28a12ef

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

arch/riscv/errata/sifive/errata.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,12 @@ static u32 __init_or_module sifive_errata_probe(unsigned long archid,
7575
return cpu_req_errata;
7676
}
7777

78-
static void __init_or_module warn_miss_errata(u32 miss_errata)
79-
{
80-
int i;
81-
82-
pr_warn("----------------------------------------------------------------\n");
83-
pr_warn("WARNING: Missing the following errata may cause potential issues\n");
84-
for (i = 0; i < ERRATA_SIFIVE_NUMBER; i++)
85-
if (miss_errata & 0x1 << i)
86-
pr_warn("\tSiFive Errata[%d]:%s\n", i, errata_list[i].name);
87-
pr_warn("Please enable the corresponding Kconfig to apply them\n");
88-
pr_warn("----------------------------------------------------------------\n");
89-
}
90-
9178
void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
9279
unsigned long archid, unsigned long impid,
9380
unsigned int stage)
9481
{
9582
struct alt_entry *alt;
9683
u32 cpu_req_errata;
97-
u32 cpu_apply_errata = 0;
9884
u32 tmp;
9985

10086
BUILD_BUG_ON(ERRATA_SIFIVE_NUMBER >= RISCV_VENDOR_EXT_ALTERNATIVES_BASE);
@@ -118,10 +104,6 @@ void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
118104
patch_text_nosync(ALT_OLD_PTR(alt), ALT_ALT_PTR(alt),
119105
alt->alt_len);
120106
mutex_unlock(&text_mutex);
121-
cpu_apply_errata |= tmp;
122107
}
123108
}
124-
if (stage != RISCV_ALTERNATIVES_MODULE &&
125-
cpu_apply_errata != cpu_req_errata)
126-
warn_miss_errata(cpu_req_errata - cpu_apply_errata);
127109
}

0 commit comments

Comments
 (0)