Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1441841ybz; Wed, 22 Apr 2020 21:48:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKQgx/0nkAtumdXSFWJdXtcEFgGYmKZcYOCIkMsCJ4mThQeBxRx0Xi+lbf48yPO0EAJLrrU X-Received: by 2002:a17:906:3d69:: with SMTP id r9mr1264443ejf.20.1587617338329; Wed, 22 Apr 2020 21:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587617338; cv=none; d=google.com; s=arc-20160816; b=BfBagnQRH1j4Qymo/aUKLE2V4ZBNUyf3l1NBIisV3ZUfVT0/qWb912K8b6sU5VmLrj AQpfu/YCaXOBWDe3/XXU9d90rmfwDayh7UZTQ9hXR9Sx6yjrMQKamxgrsvIOH/3m//PU ODXvdY6PwvdtF8LHD6iBZCl+UfIf5/gdY99KqtpBFeWE6tUTY3ar9oVAVCsmSGx+pHHx LfrFfdjVrvNyQUUSs4jc6vC3OUsXFB5UYNP1Dk68m++nFTUaqcw4MBPq0L5NZeJqUqqU gMwlsixkv5qTXyfh9eXzpHcWa0Pw5J9HxxSvutSdlgONqAI3fRKpfDztRa/a4H17zyh2 8YrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=vh9IJdgT9/A9ldq1KMRZu9hcfpyIPJCDLUN3HH4MeW4=; b=MxQP0hki2Mlxw+kEfOjXRCkHUFpqY9PoExO5xIzvhFW/V071nEgwOQrl3LuFmAZg2t WP3/QMXJkfDRRrZbOZOrq7XpN0doD22NG+yiwkIbbzj3+2Xx6M319VQ9TD/8WOUiUqjj dNTWf9LcZJSwMBXwRk0FcDiwNwCgrpgV3pq4gnC90s4JjjCiGfugsI9VCOJ2aCKI6G4l gofe0W1LpCmKGhcmxwY+63lHh9JFWnFKnU+N8hJEzWfcjq7onZS42HfA7iXmWt/+Ptrm hL4vuddwHbz+9Praoog/VhcSZ5PrUd9CGJGwyqVQn9mN7mXwUQYky0PZIoxJQ0nCJjJl B/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=PUgNeRn8; 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 j23si619670ejt.284.2020.04.22.21.48.35; Wed, 22 Apr 2020 21:48:58 -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=PUgNeRn8; 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 S1726032AbgDWEpQ (ORCPT + 99 others); Thu, 23 Apr 2020 00:45:16 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:53852 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgDWEpP (ORCPT ); Thu, 23 Apr 2020 00:45:15 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1587617115; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=vh9IJdgT9/A9ldq1KMRZu9hcfpyIPJCDLUN3HH4MeW4=; b=PUgNeRn8uvmPHfjF+n+CbOWR90qXedz0zpzQjOuYOGKEPK4t1F0nm9GsjYJbRQSKWYHKHmob raoIQV0hnfL01hAccQY/xPbhHfIZh9qvz2atODEztG1BHmv29I2O3NpNLLd8IE3Uo6gANVce BTgR1WskwCza5tyyPgngT79XV68= 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 5ea11d59.7f7df0fc6ea0-smtp-out-n05; Thu, 23 Apr 2020 04:45:13 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 22C4CC43636; Thu, 23 Apr 2020 04:45:12 +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 [192.168.43.129] (unknown [106.222.0.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id A4BDAC433CB; Thu, 23 Apr 2020 04:45:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A4BDAC433CB 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 Subject: Re: [PATCH v4 1/5] soc: qcom: rpmh-rsc: Corrently ignore CPU_CLUSTER_PM notifications To: Douglas Anderson , Greg Kroah-Hartman , rafael.j.wysocki@intel.com, Andy Gross , Bjorn Andersson Cc: mka@chromium.org, swboyd@chromium.org, evgreen@chromium.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200422145408.v4.1.Ic7096b3b9b7828cdd41cd5469a6dee5eb6abf549@changeid> From: Maulik Shah Message-ID: <7e060977-611e-abf5-af76-1cc91660a8ba@codeaurora.org> Date: Thu, 23 Apr 2020 10:15:04 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200422145408.v4.1.Ic7096b3b9b7828cdd41cd5469a6dee5eb6abf549@changeid> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, there is a typo in subject, Corrently to correctly. Other than this, fix seems good to me. Reviewed-by: Maulik Shah Thanks, Maulik On 4/23/2020 3:24 AM, Douglas Anderson wrote: > Our switch statement doesn't have entries for CPU_CLUSTER_PM_ENTER, > CPU_CLUSTER_PM_ENTER_FAILED, and CPU_CLUSTER_PM_EXIT and doesn't have > a default. This means that we'll try to do a flush in those cases but > we won't necessarily be the last CPU down. That's not so ideal since > our (lack of) locking assumes we're on the last CPU. > > Luckily this isn't as big a problem as you'd think since (at least on > the SoC I tested) we don't get these notifications except on full > system suspend. ...and on full system suspend we get them on the last > CPU down. That means that the worst problem we hit is flushing twice. > Still, it's good to make it correct. > > Fixes: 985427f997b6 ("soc: qcom: rpmh: Invoke rpmh_flush() for dirty caches") > Reported-by: Stephen Boyd > Signed-off-by: Douglas Anderson > --- > > Changes in v4: > - ("...Corrently ignore CPU_CLUSTER_PM notifications") split out for v4. > > Changes in v3: None > Changes in v2: None > > drivers/soc/qcom/rpmh-rsc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c > index a9e15699f55f..3571a99fc839 100644 > --- a/drivers/soc/qcom/rpmh-rsc.c > +++ b/drivers/soc/qcom/rpmh-rsc.c > @@ -806,6 +806,8 @@ static int rpmh_rsc_cpu_pm_callback(struct notifier_block *nfb, > case CPU_PM_EXIT: > cpumask_clear_cpu(smp_processor_id(), &drv->cpus_entered_pm); > goto exit; > + default: > + return NOTIFY_DONE; > } > > ret = rpmh_rsc_ctrlr_is_busy(drv); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation