Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp499520ybl; Fri, 10 Jan 2020 02:09:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxN8CDmi1Sqf9a/hHdxoeGwyGqX9zUkWOJShRl8vYl9O9jqa06aEwoyyQMtRSXYxq/C61Yj X-Received: by 2002:aca:e084:: with SMTP id x126mr1533265oig.97.1578650946643; Fri, 10 Jan 2020 02:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578650944; cv=none; d=google.com; s=arc-20160816; b=HudivO0jlN9tf9dyTm4ZAqAVUYTwk0UtD3dOlb3w6caIPa5zImkgDhzd3MgEL4Vnx2 Dh2q/Z/FbZmuMuvBbmlBtBH6tfd/FgzRG+Bburs7FFSJxmalE5yyuJADTjcAsHxSAWqY DLjHrobeqltEveDsM9nkhyrBE5t1SWgnU9j7dbidxHa2bn5dsNp1qqy1BPr9XNOW6cYw gGG5F0hgYz6lP6TAlIqBsOb16d0tdS6+gooXP7kpLlev9yFXY/D6cpSle7aq8OhDjKOg 09a8j7ij4fu5kWHVFXtynVUFaYWuRx2g7SBUYCHGe29wCLy81SFRQJcvQmoR60+QPqZL YMlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=uwwNlxbaPVAft3MSELUaVehozNoXoPWIw5uWz2i3i8Y=; b=N5S4Va8PwjaJmUFQWuq1z2NNTJG4rvEZzuEmGEuHopZgb3og5kCoc1gDqpy3eBJsUy pKYnAAXrUEhv82FNEADGYb+/JJsN4po4ewfFDVvYN/QIJIdSNhcWJ/7nReALQ/hPhevx k5IzHMwnaAKQJyMyBOVDb4mFygZ30PDix+BVSmyZT1spC4RdGxEdvRpadA0sJpQpwHGc TR+7QT4dl6/NNtjjA8dI69wGsUPNPFwUfKngfWcF/SCLQmdVQaVdvDRUNaWpi2LchkMe CElDt7GHblxm0Jd86UlfygO5+Uy5HTcnre3e7hsdHOmxTNEqfvl/kMJc4+52u5Wev81r e/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="vCX/I+Z3"; 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 d20si1015492oti.311.2020.01.10.02.08.51; Fri, 10 Jan 2020 02:09:04 -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="vCX/I+Z3"; 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 S1727366AbgAJKH5 (ORCPT + 99 others); Fri, 10 Jan 2020 05:07:57 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:34265 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727168AbgAJKH5 (ORCPT ); Fri, 10 Jan 2020 05:07:57 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1578650876; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=uwwNlxbaPVAft3MSELUaVehozNoXoPWIw5uWz2i3i8Y=; b=vCX/I+Z3KuNCe+p21AK1SmLc2qJDb6Bs36SG/TpDPstywhug+F6u+FLqHALi9vXTDEsHqTF2 6TD+U3gQxWsmkoAMApn+uiVXfKPTMSTmIuAm3KW/Dh75fokVWar/8OeDrKpVs5Wra5sFxNA1 JNaB+zuWye19tQBtGGUSooH5C5g= 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 5e184cfb.7f2adb4d4110-smtp-out-n03; Fri, 10 Jan 2020 10:07:55 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A8F97C4479F; Fri, 10 Jan 2020 10:07:55 +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 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from aneelaka-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: aneela) by smtp.codeaurora.org (Postfix) with ESMTPSA id 27096C433CB; Fri, 10 Jan 2020 10:07:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 27096C433CB 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=aneela@codeaurora.org From: Arun Kumar Neelakantam To: bjorn.andersson@linaro.org, clew@codeaurora.org Cc: Arun Kumar Neelakantam , Andy Gross , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] soc: qcom: aoss: Reduce the AOP ACK wait time Date: Fri, 10 Jan 2020 15:37:40 +0530 Message-Id: <1578650861-2450-1-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org AOP send ACK immediately before wait thread can start waiting. In this case the probe call is blocked for default time 1sec and causing bootup delay. Reduce the default wait time to 20ms to avoid delay in IRQ miss case. Signed-off-by: Arun Kumar Neelakantam --- drivers/soc/qcom/qcom_aoss.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c index 006ac40..2cf2393 100644 --- a/drivers/soc/qcom/qcom_aoss.c +++ b/drivers/soc/qcom/qcom_aoss.c @@ -44,6 +44,8 @@ #define QMP_NUM_COOLING_RESOURCES 2 +#define QMP_ACK_TIMEOUT msecs_to_jiffies(10) + static bool qmp_cdev_max_state = 1; struct qmp_cooling_device { @@ -150,7 +152,8 @@ static int qmp_open(struct qmp *qmp) qmp_kick(qmp); - ret = wait_event_timeout(qmp->event, qmp_link_acked(qmp), HZ); + ret = wait_event_timeout(qmp->event, qmp_link_acked(qmp), + QMP_ACK_TIMEOUT); if (!ret) { dev_err(qmp->dev, "ucore didn't ack link\n"); goto timeout_close_link; @@ -160,7 +163,8 @@ static int qmp_open(struct qmp *qmp) qmp_kick(qmp); - ret = wait_event_timeout(qmp->event, qmp_ucore_channel_up(qmp), HZ); + ret = wait_event_timeout(qmp->event, qmp_ucore_channel_up(qmp), + QMP_ACK_TIMEOUT); if (!ret) { dev_err(qmp->dev, "ucore didn't open channel\n"); goto timeout_close_channel; @@ -171,7 +175,8 @@ static int qmp_open(struct qmp *qmp) qmp_kick(qmp); - ret = wait_event_timeout(qmp->event, qmp_mcore_channel_acked(qmp), HZ); + ret = wait_event_timeout(qmp->event, qmp_mcore_channel_acked(qmp), + QMP_ACK_TIMEOUT); if (!ret) { dev_err(qmp->dev, "ucore didn't ack channel\n"); goto timeout_close_channel; -- 1.9.1