[PATCH v19 7/7] firmware: arm_rmm: Add wrappers for Realm related RMI commands

Catalin Marinas catalin.marinas at arm.com
Fri Sep 25 04:56:39 PDT 2026


On Thu, Sep 24, 2026 at 02:52:01PM +0100, Suzuki K Poulose wrote:
> + * rmi_rec_create() - Create a REC
> + * @rd: PA of the RD
> + * @rec: PA of the target REC
> + * @params: PA of REC parameters
> + * @sro: Allocated SRO context to be used
> + *
> + * Create a REC using the parameters specified in the struct rec_params pointed
> + * to by @params.
> + *
> + * Return: 0 on success, positive RMI result code or negative Linux error code
> + */
> +static inline long rmi_rec_create(unsigned long rd,
> +				  unsigned long rec,
> +				  unsigned long params,
> +				  struct rmi_sro_state *sro)
> +{
> +	long ret;
> +
> +	sro->addr_count = 0;
> +	sro->regs = (struct arm_smccc_1_2_regs) {
> +		SMC_RMI_REC_CREATE, rd, rec, params
> +	};
> +	ret = rmi_sro_memxfer_execute(sro, GFP_KERNEL);
> +	rmi_sro_free(sro);
> +
> +	return ret;
> +}

Nit: isn't this just open-coding rmi_sro_memxfer_cmd()?

-- 
Catalin



More information about the linux-arm-kernel mailing list