Re: [PATCH 2/6] firmware: arm_rmm: Add wrappers for direct RMI calls

Steven Price <[email protected]>
Newsgroups dev.linux.lists.kvmarm,dev.linux.lists.linux-coco,org.infradead.lists.linux-arm-kernel,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 06/08/2026 12:53, Will Deacon wrote:
> On Wed, Jul 15, 2026 at 03:27:33PM +0100, Steven Price wrote:
>> The wrappers make the call sites easier to read and deal with the
>> boilerplate of handling the error codes from the RMM.
>>
>> Signed-off-by: Steven Price <[email protected]>
>> ---
>> Changes from v14:
>>  * Update to RMM v2.0-bet2 spec.
>>  * Move SRO related wrappers to a later patch due to dependencies.
>>  * Common wrappers are split into include/linux/arm-rmi-cmds.h.
>> Changes from v13:
>>  * Update to RMM v2.0-bet1 spec including some SRO support (there still
>>    some FIXMEs where SRO support is incomplete).
>> Changes from v12:
>>  * Update to RMM v2.0 specification
>> Changes from v8:
>>  * Switch from arm_smccc_1_2_smc() to arm_smccc_1_2_invoke() in
>>    rmi_rtt_read_entry() for consistency.
>> Changes from v7:
>>  * Minor renaming of parameters and updated comments
>> Changes from v5:
>>  * Further improve comments
>> Changes from v4:
>>  * Improve comments
>> Changes from v2:
>>  * Make output arguments optional.
>>  * Mask RIPAS value rmi_rtt_read_entry()
>>  * Drop unused rmi_rtt_get_phys()
>> ---
>>  arch/arm64/include/asm/rmi_cmds.h | 67 +++++++++++++++++++++++
> 
> This doesn't need to be in the arch code. Please work with Aneesh to put
> this somewhere else.

v16 moved the bulk of these to include/linux/arm-rmi-cmds.h [1] but left
the KVM related ones in arch/arm64/include/asm/rmi_cmds.h [2].

Do you want me to move the KVM related ones out of arch code also? It
seemed sensible to me to leave it in arch code because these RMI
functions are only used by KVM arch code.

Thanks,
Steve

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.