Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aa301db authored by Lina Iyer's avatar Lina Iyer Committed by Maulik Shah
Browse files

soc: qcom: rpmh-rsc: log interrupt status when TCS is busy



To debug issues when TCS is busy, report interrupt status as well. If
the interrupt line is pending at GIC, then Linux was too busy to process
the interrupt and if not pending then AOSS was too busy to handle the
request.

Change-Id: I8fd8289c74a8e1d6c771b77c2800a52f18c3a0b2
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent d1c78026
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -462,8 +462,14 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg)
	do {
		ret = tcs_write(drv, msg);
		if (ret == -EBUSY) {
			pr_info_ratelimited("DRV:%s TCS Busy, retrying RPMH message send: addr=%#x\n",
					    drv->name, msg->cmds[0].addr);
			bool irq_sts;

			irq_get_irqchip_state(drv->irq, IRQCHIP_STATE_PENDING,
					      &irq_sts);
			pr_info_ratelimited("DRV:%s TCS Busy, retrying RPMH message send: addr=%#x interrupt status=%s\n",
					    drv->name, msg->cmds[0].addr,
					    irq_sts ?
					    "PENDING" : "NOT PENDING");
			udelay(10);
		}
	} while (ret == -EBUSY);