[PATCH v19 5/7] firmware: arm_rmm: Activate the RMM

From: Suzuki K Poulose

Date: Thu Sep 24 2026 - 10:00:05 EST


From: Steven Price <steven.price@xxxxxxx>

Activate the RMM after the basic configuration. This is a memory
transferring stateful operation.

Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
Signed-off-by: Steven Price <steven.price@xxxxxxx>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
---
Changes since v17:
* Inline RMM_ACTIVATE command and remove the definitions from arm-rmi-cmds.h
* Use scope-based cleanup to free sro object
Changes since v16:
* Split into a new patch
---
drivers/firmware/arm_rmm/rmi.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_rmm/rmi.c b/drivers/firmware/arm_rmm/rmi.c
index 035f21d3f26b6..0859f256e192b 100644
--- a/drivers/firmware/arm_rmm/rmi.c
+++ b/drivers/firmware/arm_rmm/rmi.c
@@ -834,7 +834,18 @@ static int __init arm64_init_rmi(void)
if (ret)
return ret;

- return 0;
+ /* Activate the RMM */
+ struct rmi_sro_state *sro __free(kfree) = kmalloc_obj(*sro);
+ if (!sro)
+ return -ENOMEM;
+
+ ret = rmi_sro_memxfer_cmd(sro, GFP_KERNEL, SMC_RMI_RMM_ACTIVATE);
+ if (ret) {
+ pr_err("RMM activate failed (%d)\n", ret);
+ ret = ret < 0 ? ret : -ENXIO;
+ }
+
+ return ret;
}

/*
--
2.43.0