Skip to content

configs: *: Restrict non-RVA23 CPU errata to rva20 - #4

Merged
RevySR merged 2 commits into
openRuyi-Project:masterfrom
dramforever:rva20-errata
Aug 18, 2026
Merged

configs: *: Restrict non-RVA23 CPU errata to rva20#4
RevySR merged 2 commits into
openRuyi-Project:masterfrom
dramforever:rva20-errata

Conversation

@dramforever

Copy link
Copy Markdown
Contributor

These extra CPU errata handling don't apply to RVA23 machines, and a few of them introduce noticible overhead by inserting nops in critical paths. Disable all of them.

These extra CPU errata handling don't apply to RVA23 machines, and a few
of them introduce noticible overhead by inserting nops in critical
paths. Disable all of them.

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
These extra CPU errata handling don't apply to RVA23 machines, and a few
of them introduce noticible overhead by inserting nops in critical
paths. Disable all of them.

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
@Icenowy

Icenowy commented Aug 18, 2026

Copy link
Copy Markdown

Whether newer cores need CONFIG_ERRATA_THEAD_PMU seems to be not very clear?
For other workarounds it's okay, they're for non-A23 cores.

@RevySR

RevySR commented Aug 18, 2026

Copy link
Copy Markdown
Member

Whether newer cores need CONFIG_ERRATA_THEAD_PMU seems to be not very clear? For other workarounds it's okay, they're for non-A23 cores.

The C908/C907/C920v2+ all have svpbmt.

@Icenowy

Icenowy commented Aug 18, 2026

Copy link
Copy Markdown

Svpbmt isn't related to PMU -- it's related to MAE.

@RevySR

RevySR commented Aug 18, 2026

Copy link
Copy Markdown
Member

Svpbmt isn't related to PMU -- it's related to MAE.

You are right, the SG2044 needs this PMU.
I remembered it wrong. The SG2044 does not support cycle/inst overflow interrupts.

@dramforever

dramforever commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@Icenowy CONFIG_ERRATA_THEAD_PMU only applies to cores with marchid = 0 and mimpid = 0, which is older cores:

https://github.com/torvalds/linux/blob/8d3ae59288f1e7d58d76558a6ee96d533bc5019f/arch/riscv/errata/thead/errata.c#L130-L144

At least on SG2044 (which is not quite RVA23), it has (standard) Sscofpmf and non-zero marchid and mimpid. I think it is safe to assume all RVA23 "thead" cores would not need this. Even if SG2044 needs this, since this condition means it doesn't apply on SG2044 anyway, this wouldn't be a functional regression.

The same goes for CMO and MAE

@RevySR
RevySR merged commit bdbcc4a into openRuyi-Project:master Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants