Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp904592ybt; Wed, 1 Jul 2020 13:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEHRiXVBs9IESs3rhwvvkuCpvpsMsx/FqeZTrJ++qrQ1bpQ8m6L38HrcpKXNG1XXwEccvS X-Received: by 2002:a50:f149:: with SMTP id z9mr31625595edl.167.1593633698169; Wed, 01 Jul 2020 13:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593633698; cv=none; d=google.com; s=arc-20160816; b=XPMq3p6qfVIP6w2sNObYhumX5cGZHAMV5NxREUHaRrUqXvqJntED/rgMWSdgddkybH Ny7sD6V4lNmtu97KDzghVFA8Ajyx0gPGXwATlihRC8IZmaHJwZETjH0VSqy/JakoNS4n 2ov/nGpQDxmYoO5Yv7dndOXstYHMlnDna2jRfe2/xmqZ8muoCMpXO2SUkgsJwpn6lrNG hzk2wNJd6c1J3FGYhNSnXg4lf6R1nhcko4tq5NhqlB89HMLLcUlUhCUvzjV8pVlmzCbQ 4cm1yQo6EcLEo5uEhdOE8aBU/XZxDhkWgpUlAXlaWT1sOHKYjzwgAV00Xe7Ry2LyRCqx UyjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature; bh=+Pn1474j/5xsTytr2L5ZmcpTGg1W/hqe1WIx/N9tLNU=; b=XIBK0TQ4IzdNV8hhHc1Ss043oQCt+CBi39lMrf88C0A8C+woZx8TCu+UZWuLjS2lLo iQ53gqbGEj+Hri4wD9h4VqpOTUPxyFh2Tf4xvxgGPENWCj6rUq7D8WLTzh73dLmyqoiY ssUKXJ5OBiE8+hpGVDd3/dNuGnt5xLZyyzyS2LsYkuT2RzEYhf9iqaVThD84FTFv2lsq U+BPKIirXmLAnRWGuBsEMzAhBt9GUE+b9j0e6GPM1Cz01cs4qX1cvQPQW20qMdoTDOMo Xt2fB8TBePMRn7kIaAexy+DvU1ft0F+XoyOyb/1wvK2KJFUOp3qaxvnRVFc+UT5Nsikj 7eyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=pG2o1w3z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si4485392ejd.191.2020.07.01.13.01.14; Wed, 01 Jul 2020 13:01:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=pG2o1w3z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgGAUAZ (ORCPT + 99 others); Wed, 1 Jul 2020 16:00:25 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:45377 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbgGAUAY (ORCPT ); Wed, 1 Jul 2020 16:00:24 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1593633624; h=Content-Transfer-Encoding: MIME-Version: Message-Id: Date: Subject: Cc: To: From: Sender; bh=+Pn1474j/5xsTytr2L5ZmcpTGg1W/hqe1WIx/N9tLNU=; b=pG2o1w3zg6SW/c7x9eNZ7EICKfcGDTVwMVo61dzbcdUNXPBLKFlOdRt6GYOa/3HrQTPfLadW 2kDok35QJ7VSRxxv81N6QqNgCQOY1DUZRiDcNmpr5DpZyti6mPkxs+3OF5DpRt5QIsyhjj+y yLY/P5nSDOBmgQ/nLDUGBzTRlYI= X-Mailgun-Sending-Ip: 69.72.43.7 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 smtp-out-n15.prod.us-west-2.postgun.com with SMTP id 5efceb496f2ee827da04f369 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 01 Jul 2020 20:00:09 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 497D5C433CB; Wed, 1 Jul 2020 20:00:09 +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 blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1CF91C433CA; Wed, 1 Jul 2020 20:00:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1CF91C433CA 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=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, rishabhb@codeaurora.org Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, tsoni@codeaurora.org, sidgup@codeaurora.org, stable@vger.kernel.org, Sibi Sankar Subject: [RESEND v1] soc: qcom: pdr: Reorder the PD state indication ack Date: Thu, 2 Jul 2020 01:29:54 +0530 Message-Id: <20200701195954.9007-1-sibis@codeaurora.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Protection Domains (PD) have a mechanism to keep its resources enabled until the PD down indication is acked. Reorder the PD state indication ack so that clients get to release the relevant resources before the PD goes down. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Rishabh Bhatnagar Signed-off-by: Sibi Sankar --- I couldn't find the previous patch on patchworks. Resending the patch since it would need to land on stable trees as well drivers/soc/qcom/pdr_interface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index a90d707da6894..088dc99f77f3f 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -279,13 +279,15 @@ static void pdr_indack_work(struct work_struct *work) list_for_each_entry_safe(ind, tmp, &pdr->indack_list, node) { pds = ind->pds; - pdr_send_indack_msg(pdr, pds, ind->transaction_id); mutex_lock(&pdr->status_lock); pds->state = ind->curr_state; pdr->status(pds->state, pds->service_path, pdr->priv); mutex_unlock(&pdr->status_lock); + /* Ack the indication after clients release the PD resources */ + pdr_send_indack_msg(pdr, pds, ind->transaction_id); + mutex_lock(&pdr->list_lock); list_del(&ind->node); mutex_unlock(&pdr->list_lock); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project