[RFC patch 0/4] riscv: introduce alternative mechanism to apply errata patches

Ruinland ChuanTzu Tsai ruinland at andestech.com
Mon Mar 15 04:42:18 GMT 2021


Hi Vincent,

> However, if all vendors are willing to suffer the performance impact
> from other vendor's errata, I can change the framework to "#ifdef"
> scheme. After all, it may need to take a lot of time to accumulate a
> lot of errata to make the performance impact obvious.
I'm not sure if I'm interpreting the alternative framework right, yet I have
doubts about the performance arguments.
Just as the example (CONFIG_QCOM_FALKOR_ERRATUM_E1041) I quoted in the 
previous
mail, in their final decision, the `#ifdef` simply toggles the code in
_compile time_ [1].

I don't know why they chose to enable it by default [2], yet ideally, for
irrelevant processors/SoCs, people should be able to turn the option off
without issues.

Somehow, to my best acknowledgment and as you mentioned, in ARM's ecosystem
(more specifically, the distros), alternative-based errata fixes are all 
enabl-
ed by default, so all the errata workarounds will be generated and gathered
into a special section. This will cause the size of Linux image which 
distros
shipped to become larger and larger.

For ARM, that might not be a problem since most of the IC vendors 
nowadays are
licensing from ARM and few of them are making their microarchitectures.
So mi errata es su errata. (My errata is your errata.)

Yet for RISC-V, we have plenty of players who make their home-grown cores on
the field.
This leads to a dilemma: either to enable all the workarounds by default 
so the
distros could just build one general image which will become bloated or
specially crafted images will be provided lead to a fractured experience for
end-users.

My 2 cents on this issue is that maybe we need to establish a principle
(probably not in a written-down manner) on deciding what goes to alternative
and what shall just be an option disabled by default.

Cordially yours,
Ruinland


[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/include/asm/assembler.h#n610

[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/Kconfig#n805




More information about the linux-riscv mailing list