Re: [PATCH v2 3/3] soc: qcom: rpmh-rsc: Output debug information from RSC

Navya Malempati <[email protected]> Thu, 6 Aug 2026 12:17:35 +0530
Newsgroups org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>

On 7/17/2026 1:19 PM, Maulik Shah wrote:
> From: "Raju P.L.S.S.S.N" <[email protected]>
> 
> When an RPMh transfer times out there is no visibility into which
> TCS was stuck, what commands it was carrying, or whether the
> completion IRQ was pending at the GIC. Add rpmh_rsc_debug() to
> capture this state at timeout:
> 
> - Iterates all in-use TCSes and dumps per-TCS control register
>    state (controller status, AMC mode, IRQ status) and per-command
>    register state (address, data, message ID, completion status).
>    The accelerator type (ARC/VRM/BCM) is decoded from the address
>    using cmd_db_hw_type_str().
> 
> - Queries the GIC pending state for the RSC IRQ via
>    irq_get_irqchip_state() to distinguish two failure modes:
>    * AOSS firmware did not respond (IRQ never fired)
>    * Linux lockup (IRQ pending at GIC but handler never ran)
> 
> - Reports the completion object state to cross-check with the
>    IRQ status.
> 
> Store the IRQ number in struct rsc_drv to enable the GIC query.
> 
> Signed-off-by: Raju P.L.S.S.S.N <[email protected]>
> Co-developed-by: Maulik Shah <[email protected]>
> Signed-off-by: Maulik Shah <[email protected]>
Reviewed-by: Navya Malempati <[email protected]>

Thanks,
Navya