linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] arm64/mpam: Replace the arm64.nompam parameter with arm64.mpam
@ 2025-12-17 15:11 tanze
  2025-12-17 15:30 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: tanze @ 2025-12-17 15:11 UTC (permalink / raw)
  To: xry111, james.morse, catalin.marinas, maz
  Cc: linux-kernel, linux-arm-kernel, tanze

From: tanze <tanze@kylinos.cn>

In practical application scenarios, some manufacturers use outdated
firmware and do not add relevant configurations to the kernel command
line during deployment, which will result in system boot failure.
For manufacturers, disabling the MPAM feature by default and
enabling it via additional boot parameters only when required
is a more effective way to ensure compatibility.

Fixes: 10f885d63a0e ("arm64: Add override for MPAM")
Signed-off-by: tanze <tanze@kylinos.cn>
---
 Documentation/admin-guide/kernel-parameters.txt | 6 +++---
 arch/arm64/kernel/pi/idreg-override.c           | 8 +++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a8d0afde7f85..c10d9529147c 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -556,9 +556,6 @@ Kernel parameters
 	arm64.nomops	[ARM64] Unconditionally disable Memory Copy and Memory
 			Set instructions support
 
-	arm64.nompam	[ARM64] Unconditionally disable Memory Partitioning And
-			Monitoring support
-
 	arm64.nomte	[ARM64] Unconditionally disable Memory Tagging Extension
 			support
 
@@ -571,6 +568,9 @@ Kernel parameters
 	arm64.nosve	[ARM64] Unconditionally disable Scalable Vector
 			Extension support
 
+	arm64.mpam	[ARM64] Unconditionally enable Memory Partitioning And
+			Monitoring support
+
 	ataflop=	[HW,M68k]
 
 	atarimouse=	[HW,MOUSE] Atari Mouse
diff --git a/arch/arm64/kernel/pi/idreg-override.c b/arch/arm64/kernel/pi/idreg-override.c
index bc57b290e5e7..f4e3972155c4 100644
--- a/arch/arm64/kernel/pi/idreg-override.c
+++ b/arch/arm64/kernel/pi/idreg-override.c
@@ -248,7 +248,7 @@ static const struct {
 	{ "rodata=off",			"arm64_sw.rodataoff=1" },
 	{ "arm64.nolva",		"id_aa64mmfr2.varange=0" },
 	{ "arm64.no32bit_el0",		"id_aa64pfr0.el0=1" },
-	{ "arm64.nompam",		"id_aa64pfr0.mpam=0 id_aa64pfr1.mpam_frac=0" },
+	{ "arm64.mpam",			"id_aa64pfr0.mpam=1 id_aa64pfr1.mpam_frac=1" },
 };
 
 static int __init parse_hexdigit(const char *p, u64 *v)
@@ -409,6 +409,12 @@ void __init init_feature_override(u64 boot_status, const void *fdt,
 
 	__boot_status = boot_status;
 
+	/*
+	 * Set the boot parameter to disable the MPAM feature,
+	 * thus avoiding system boot failure.
+	 */
+	match_options("id_aa64pfr0.mpam=0 id_aa64pfr1.mpam_frac=0");
+
 	parse_cmdline(fdt, chosen);
 
 	for (i = 0; i < ARRAY_SIZE(regs); i++) {
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-17 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 15:11 [PATCH v1] arm64/mpam: Replace the arm64.nompam parameter with arm64.mpam tanze
2025-12-17 15:30 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).