Re: [PATCH v19 2/7] firmware: arm_rmm: Check for RMI support at init
From: Suzuki K Poulose
Date: Fri Sep 25 2026 - 04:51:29 EST
On 25/09/2026 01:00, Gavin Shan wrote:
On 9/24/26 11:51 PM, Suzuki K Poulose wrote:
From: Steven Price <steven.price@xxxxxxx>
Query the RMI version number and check if it is a compatible version.
The first two feature registers are read and exposed for future code to
use.
We only support this for Little Endian kernels, the Big Endian kernel
support is anyway marked BROKEN and is being removed.
Signed-off-by: Steven Price <steven.price@xxxxxxx>
Co-developed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
---
v19:
* Read all implemented RmiFeatureRegisters - 5
* Use ARRAY_SIZE(rmi_feat_reg_cache) for the loop in rmi_read_features()
* Fold rmi_features() into rmi_read_features
* Fix comment for rmi_smccc_invoke()
* Drop default y
* Add retry for RMI_BLOCKED and return to caller
v18:
* Always use arm_smccc_1_2_invoke() for all RMIs making sure the unsused
parameters are 0 - Sashiko
* Move rmi_features() calls away from the arm-rmi-cmds.h to rmi.c - Gavin
v17:
* Rename ARM_RMM to ARM_RMM_RMI to make it easier to add Guest facing RSI
support, which is also in progress
v16:
* Update Kconfig text to include PCIe TDISP.
* Export rmi_feat_reg() here rather than in a later commit.
v15:
* The code is moved again, this time into the 'firmware' directory.
v14:
* This moves the basic RMI setup into the 'kernel' directory. This is
because RMI will be used for some features outside of KVM so should
be available even if KVM isn't compiled in.
---
arch/arm64/Kconfig | 1 +
arch/arm64/kernel/cpufeature.c | 1 +
drivers/firmware/Kconfig | 1 +
drivers/firmware/Makefile | 1 +
drivers/firmware/arm_rmm/Kconfig | 25 +++++++
drivers/firmware/arm_rmm/Makefile | 2 +
drivers/firmware/arm_rmm/rmi.c | 109 ++++++++++++++++++++++++++++++
include/linux/arm-rmi-cmds.h | 48 +++++++++++++
8 files changed, 188 insertions(+)
create mode 100644 drivers/firmware/arm_rmm/Kconfig
create mode 100644 drivers/firmware/arm_rmm/Makefile
create mode 100644 drivers/firmware/arm_rmm/rmi.c
create mode 100644 include/linux/arm-rmi-cmds.h
Some nitpicks below, with them addressed:
Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>
Thank you Gavin, much appreciated ! I have addressed the comments below
and the Makefile one.
Cheers
Suzuki