From 7aa301db5bb061ef5d403bd6d40b9bdc5e8e4bef Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Tue, 27 Aug 2019 15:09:42 -0600 Subject: [PATCH] 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: Lina Iyer --- drivers/soc/qcom/rpmh-rsc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index c9ce4ca0c2e7..9944dc304e8a 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -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);