Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5929420ybv; Wed, 12 Feb 2020 02:58:14 -0800 (PST) X-Google-Smtp-Source: APXvYqwHbrQCsMcEP5w3cfsyuo5IFJgL0OfM3YFI5jx+TSdKFsMTxNitFscMN7Jn8Wos5r9hNsnM X-Received: by 2002:aca:b483:: with SMTP id d125mr5970714oif.167.1581505094171; Wed, 12 Feb 2020 02:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581505094; cv=none; d=google.com; s=arc-20160816; b=PYnXpObdpAIreXeet4MKSHJeDt0zDhe3ErCa927NWLej0p/wOyFwY7BWj1btQxfxA1 X7sKihJunTHsDT385pLZY7OLxhCaeF1dYANN8Uvf+YJ5jh4ds1fcMal3I2pmTrqcUWVi hyPk2pS7EZUu8JFh1DHZ2dUIeLp2zjfZlBwSE7lkCip2v0udlAwcDZJArr2jf2BI9SHQ 5jHykt74IwswBA514MgS4YB01fdnnCzdieWwKWtbgiF3/J0CillDRbiwpmyUxNOVfcY6 pSNK4r17Z+TrkQMHs1qYXPr9yHOJKenAJHu6WaAA+su1UAPLG0RBnD8Zu0wC9p4aJ1lh 2kpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=TjtUiZ8AZKDj9nYoSWQ3/cgkK6mw6KArwXSKQ2bbv/4=; b=pwx4bq+m9nlTPOTjsUFLqwohDlMkgaL7aB61anMQgVG4V9opw/I82DqMoP/rflXEEl zc0cGGGRCNc/xm3E2oPIZTTGejhpH75gehH624pvY9O2ljrn8C+/qU5ioRZzjq//M0l5 /NqAiRjlKdcHVn9QzejFodMomf9AkodvJMzCjFxzSztW/HrITmXW9VdJhmnf09Zkp0U9 diegmp9JWc9CgZ2+Kl0e1OHMWrekuDI50FKmUj9mA62AzaUwoqNtcV/lJmbYl8Utuxi5 kQYGtR+eb6D5k3ue7dQNl/3CZffXyPYuhooMW0p/uhNOFvlk/vNN7aNZwu0HbHYkpbq4 2TXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=C+Er12Ts; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si29184otk.164.2020.02.12.02.58.02; Wed, 12 Feb 2020 02:58:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=C+Er12Ts; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728010AbgBLK4u (ORCPT + 99 others); Wed, 12 Feb 2020 05:56:50 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:45597 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbgBLK4u (ORCPT ); Wed, 12 Feb 2020 05:56:50 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1581505009; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=TjtUiZ8AZKDj9nYoSWQ3/cgkK6mw6KArwXSKQ2bbv/4=; b=C+Er12Ts1V79SOj9ABs3N0qsY7wxFu65jeQslSxpoGEghcveuI9MeQdpCX7JPpNiSz5WV+5/ uHvNSLcKSDzmv1cXqT1jab8o3IjQo19CrAZJLS8sRTwn4991jtgAsUSEMMazFNwUYb2cLZbQ QilkXhPRXfgA0gOTe1EEmtGkdTE= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e43d9ef.7ffa6786fab0-smtp-out-n01; Wed, 12 Feb 2020 10:56:47 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B0CC3C447A3; Wed, 12 Feb 2020 10:56:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mkshah-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id 647A0C4479F; Wed, 12 Feb 2020 10:56:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 647A0C4479F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=mkshah@codeaurora.org From: Maulik Shah To: swboyd@chromium.org, mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, agross@kernel.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, Maulik Shah Subject: [PATCH 2/2] soc: qcom: rpmh-rsc: Log interrupt status when TCS is busy Date: Wed, 12 Feb 2020 16:26:12 +0530 Message-Id: <1581504972-22632-3-git-send-email-mkshah@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581504972-22632-1-git-send-email-mkshah@codeaurora.org> References: <1581504972-22632-1-git-send-email-mkshah@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lina Iyer 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. Signed-off-by: Lina Iyer Signed-off-by: Maulik Shah --- 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 3595e4d..1dc05c3 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -421,8 +421,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); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation