Re: [PATCH 1/2] platform: arm64: Add Radxa SVC GLINK driver
From: Konrad Dybcio
Date: Fri Sep 04 2026 - 06:42:59 EST
On 8/31/26 5:09 PM, Xilin Wu wrote:
> Add an rpmsg client for the RADXA_SVC_ADSP_APPS firmware service used
> on supported Radxa boards with Qualcomm SoCs.
>
> Expose fan control through the standard hwmon pwm1 and pwm1_enable
> attributes. SET_PROFILE only changes the fan curve, so map its quiet and
> performance curves to automatic modes instead of platform_profile.
>
> Signed-off-by: Xilin Wu <sophon@xxxxxxxxx>
> ---
[...]
> +static int radxa_svc_request(struct radxa_svc_glink *svc, u32 opcode,
> + const void *req_payload, size_t req_len,
> + void *rsp_payload, size_t *rsp_len);
I don't think you need this forward-declaration
[...]
> + reinit_completion(&svc->rsp);
> +
> + spin_lock_irqsave(&svc->rsp_lock, flags);
GPT says:
High: A late response from a timed-out request can complete and corrupt
the next transaction.
In patch 1, radxa_svc_request() clears pending and returns after the
5-second timeout, then a later request calls reinit_completion() and
installs its new pending_seq (patch lines 526-540, 550-555). The callback
sets do_complete under rsp_lock, drops the lock, and only then calls
complete() (patch lines 612-624).
Konrad