From: Steven Price <steven.price@arm.com>
To: sashiko-reviews@lists.linux.dev
Cc: Marc Zyngier <maz@kernel.org>,
kvm@vger.kernel.org, kvmarm@lists.linux.dev,
Oliver Upton <oupton@kernel.org>
Subject: Re: [PATCH 3/6] firmware: arm_rmm: Check for RMI support at init
Date: Thu, 16 Jul 2026 15:28:46 +0100 [thread overview]
Message-ID: <29ca4cae-c492-4e18-be63-0a8584ade1c7@arm.com> (raw)
In-Reply-To: <20260715150656.4D0A61F00A3A@smtp.kernel.org>
On 15/07/2026 16:06, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The function `is_rmi_available()` is declared in the header but its implementation is missing.
> --
>
> --- Patch [3]: [PATCH 3/6] firmware: arm_rmm: Check for RMI support at init ---
> commit 422535e6880c00ddffdc5f970e459e2cf571e957
> Author: Steven Price <steven.price@arm.com>
>
> firmware: arm_rmm: Check for RMI support at init
>
> 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.
>
>> diff --git a/drivers/firmware/arm_rmm/rmi.c b/drivers/firmware/arm_rmm/rmi.c
>> new file mode 100644
>> index 0000000000000..c4850976544ff
>> --- /dev/null
>> +++ b/drivers/firmware/arm_rmm/rmi.c
>
> [ ... ]
>
>> +static int __init arm64_init_rmi(void)
>> +{
>> + int ret;
>> +
>> + /* Continue without realm support if we can't agree on a version */
>> + ret = rmi_check_version();
>> + if (ret)
>> + return ret;
>> +
>> + ret = rmi_read_features();
>> + if (ret)
>> + return ret;
>> +
>> + return 0;
>> +}
>> +
>> +/*
>> + * Note arm64_init_rmi() must be called before kvm_init_rmi() otherwise KVM
>> + * will not support realm guests. subsys_initcall() is called before
>> + * module_init() (used for KVM) so this is OK.
>> + */
>> +subsys_initcall(arm64_init_rmi);
>
> [Severity: Low]
> Is the implementation of is_rmi_available() missing here?
Short answer: no.
Long answer - the previous patch added the definition and the following
patch adds the implementation. That's clearly wrong and I'll fix it.
Steve
> It is declared for external callers in include/linux/arm-rmi-cmds.h:
>
> bool is_rmi_available(void);
>
> However, the corresponding definition appears to be missing from
> drivers/firmware/arm_rmm/rmi.c, which could lead to link-time undefined
> reference errors when another subsystem attempts to use it.
>
next prev parent reply other threads:[~2026-07-16 14:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 14:27 [PATCH 0/6] firmware: arm_rmm: Add RMM v2.0 support Steven Price
2026-07-15 14:27 ` [PATCH 1/6] firmware: arm_rmm: Add SMC definitions for calling the RMM Steven Price
2026-07-15 14:38 ` sashiko-bot
2026-07-16 10:59 ` Steven Price
2026-07-15 14:27 ` [PATCH 2/6] firmware: arm_rmm: Add wrappers for direct RMI calls Steven Price
2026-07-15 14:49 ` sashiko-bot
2026-07-16 14:28 ` Steven Price
2026-07-15 14:27 ` [PATCH 3/6] firmware: arm_rmm: Check for RMI support at init Steven Price
2026-07-15 15:06 ` sashiko-bot
2026-07-16 14:28 ` Steven Price [this message]
2026-07-15 14:27 ` [PATCH 4/6] firmware: arm_rmm: Configure the RMM with the host's page size Steven Price
2026-07-15 15:18 ` sashiko-bot
2026-07-16 15:41 ` Steven Price
2026-07-15 14:27 ` [PATCH 5/6] firmware: arm_rmm: Add support for SRO Steven Price
2026-07-15 15:29 ` sashiko-bot
2026-07-16 16:04 ` Steven Price
2026-07-15 14:27 ` [PATCH 6/6] firmware: arm_rmm: Ensure the RMM has GPT entries for memory Steven Price
2026-07-15 15:47 ` sashiko-bot
2026-07-20 15:03 ` Steven Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29ca4cae-c492-4e18-be63-0a8584ade1c7@arm.com \
--to=steven.price@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox