Re: [PATCH v19 2/7] firmware: arm_rmm: Check for RMI support at init
From: Suzuki K Poulose <suzuki.poulose@arm.com>
Date: 2026-09-25 08:50:13
Also in:
kvm, kvmarm, linux-coco, lkml
On 25/09/2026 06:43, Gavin Shan wrote:
On 9/24/26 11:51 PM, Suzuki K Poulose wrote:quoted
From: Steven Price <steven.price@arm.com> 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@arm.com> Co-developed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- 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[...]quoted
diff --git a/drivers/firmware/arm_rmm/Makefile b/drivers/firmware/ arm_rmm/Makefile new file mode 100644 index 0000000000000..65171988fdcae --- /dev/null +++ b/drivers/firmware/arm_rmm/Makefile@@ -0,0 +1,2 @@ + +obj-$(CONFIG_ARM_RMM_RMI) = rmi.oUnnecessary blank line at the top in Makefile. Besides, why doesn't this come as below? :) obj-$(CONFIG_ARM_RMM_RMI) += rmi.o
Good point, now that the ARM_RMM_RSI is also getting merged there. Cheers Suzuki
Thanks, Gavin