-
Notifications
You must be signed in to change notification settings - Fork 109
[Deepin-Kernel-SIG] [linux 6.18.y] [Deepin] [AOSC] arm64: disable mpam in tsv110 #1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -215,6 +215,17 @@ static const struct ftr_set_desc sw_features __prel64_initconst = { | |||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| static struct arm64_ftr_override __read_mostly aosc_feature_override; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| static const struct ftr_set_desc aosc_features __prel64_initconst = { | ||||||||||||||||||||||||||||||||||||||||||
| .name = "aosc", | ||||||||||||||||||||||||||||||||||||||||||
| .override = &aosc_feature_override, | ||||||||||||||||||||||||||||||||||||||||||
| .fields = { | ||||||||||||||||||||||||||||||||||||||||||
| FIELD("try_mpam", 0, NULL), | ||||||||||||||||||||||||||||||||||||||||||
| {} | ||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| static const | ||||||||||||||||||||||||||||||||||||||||||
| PREL64(const struct ftr_set_desc, reg) regs[] __prel64_initconst = { | ||||||||||||||||||||||||||||||||||||||||||
| { &mmfr0 }, | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -226,6 +237,7 @@ PREL64(const struct ftr_set_desc, reg) regs[] __prel64_initconst = { | |||||||||||||||||||||||||||||||||||||||||
| { &isar2 }, | ||||||||||||||||||||||||||||||||||||||||||
| { &smfr0 }, | ||||||||||||||||||||||||||||||||||||||||||
| { &sw_features }, | ||||||||||||||||||||||||||||||||||||||||||
| { &aosc_features }, | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| static const struct { | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -390,6 +402,27 @@ static __init void parse_cmdline(const void *fdt, int chosen) | |||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && prop) | ||||||||||||||||||||||||||||||||||||||||||
| __parse_cmdline(prop, true); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||||||||||
| * Sorry but we have to work OotB on some platforms with broken | ||||||||||||||||||||||||||||||||||||||||||
| * firmware, notably W510. Use "aosc.try_mpam=1" if you really need | ||||||||||||||||||||||||||||||||||||||||||
| * MPAM on AOSC. | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+407
to
+409
|
||||||||||||||||||||||||||||||||||||||||||
| * Sorry but we have to work OotB on some platforms with broken | |
| * firmware, notably W510. Use "aosc.try_mpam=1" if you really need | |
| * MPAM on AOSC. | |
| * Some platforms (notably TSV110 / W510) ship with firmware that | |
| * advertises MPAM but is not reliable enough for use out of the box. | |
| * | |
| * By default, for all CPUs in mpam_disable_list we forcibly disable | |
| * MPAM early by injecting "arm64.nompam" into the effective | |
| * command line (see the loop below). | |
| * | |
| * The "aosc.try_mpam=1" boot parameter provides an opt-in override | |
| * for systems where the firmware is known to be good: when this | |
| * parameter is present, arm64_apply_feature_override() will succeed | |
| * and we will NOT add "arm64.nompam", so MPAM remains enabled. |
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment uses the abbreviation "OotB", which may be unclear to readers outside this context. Consider spelling this out (e.g., "out of the box") and tightening the wording to be more descriptive of the technical reason (firmware reports MPAM incorrectly on TSV110/W510) rather than apologetic.
| * Sorry but we have to work OotB on some platforms with broken | |
| * firmware, notably W510. Use "aosc.try_mpam=1" if you really need | |
| * MPAM on AOSC. | |
| * Disable MPAM by default on platforms with firmware that reports | |
| * MPAM incorrectly, notably TSV110/W510. Use "aosc.try_mpam=1" if | |
| * you really need MPAM on AOSC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aosc_feature_overrideappears to be used only during early command-line parsing (to decide whether to auto-applyarm64.nompamon TSV110). Since it is not referenced afterinit_feature_override()completes, consider marking it__initdata(and dropping__read_mostly) so it can be freed with other init-only data instead of permanently occupying.data..read_mostly.