Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp113165ybz; Thu, 23 Apr 2020 19:41:47 -0700 (PDT) X-Google-Smtp-Source: APiQypKKwou7/dx8uH9mxjXHjRxYAm5/0JnipIg9L/rg0vjDFuuThAYg+ncqrPZicKcdS+/QmOel X-Received: by 2002:a17:906:adb:: with SMTP id z27mr5330334ejf.263.1587696106914; Thu, 23 Apr 2020 19:41:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587696106; cv=none; d=google.com; s=arc-20160816; b=L5HAWTl3aYj+s6Wi219lcjLJU0x7xWkHGnfro0MW2miMNwlZIFmdoye66B+B7g0Www pTnoRqWDUqEm2xHH0a5i8Zt8tQlit4zuljnZUmuvltAvOx2k6K9WLsskctajCxk89jXH Mm4ud1C+fRrfBW8AeD+jt3Jjtzw4bHHnD1KkTxVnS8FPz34D1GDPDFd/NuRYDokP4Dnd Ei5s6ImIYZDJkCCN2qqoNtg53T16oSt6R3wrzPbDX0yYrCelhuzpXYi2+n4+ZhPq/Jg3 VFZAkjAVw54U6jK3RISuAen2wT+tdZDQN9WFyO/vQcYzTCIqb/yLXGFdLiVVKLqMnIwa xEWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=6++NSo7nhleVNv5D1a6ojdhyb5jaFfFZW4dq4b5kgFY=; b=BmkX6K/jOn/0m4LnY/vtIKAq+rZKS8kkPjbOb8ugCmt+VDli74OYu1oIvfIL8S+cgH k4trO4A+hTwtQP8k4c6uL71m1OVPkwdb87f14n9FbLx7ZqxNX6Gho5LvC6X7VXaD5W9d gYZs+KfIs6RDSUXgkMo5LEQ1aDXLQOAlYO2Zi3z3fJs3WZyr3FVLuJrDPwcA+OCngdSN Q6FdZOlVJJs/jsvYucUApl37VPo29i56S1+NbRzNj9i+Safossk4H4QXAstH5O7Bvf+M 41t9O6th2pzEhDWTYIpP4pR1qsS9BqmhPj7kb+4BpbSu1uciTNWoHzwaViDJaVd+Bn+b GO4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="O31mWV5/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si2344500ejq.460.2020.04.23.19.41.23; Thu, 23 Apr 2020 19:41:46 -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=pass header.i=@chromium.org header.s=google header.b="O31mWV5/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbgDXCiy (ORCPT + 99 others); Thu, 23 Apr 2020 22:38:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbgDXCiy (ORCPT ); Thu, 23 Apr 2020 22:38:54 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C11C09B044 for ; Thu, 23 Apr 2020 19:38:54 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d184so4075917pfd.4 for ; Thu, 23 Apr 2020 19:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=6++NSo7nhleVNv5D1a6ojdhyb5jaFfFZW4dq4b5kgFY=; b=O31mWV5/EXtIMVB1mhcNN22IKFHhi+5jDB6Qx13ctjtqnvxud2SS6QSRQDBj12wb6Y GMb41qjyVpuZcFQS9J2Bt+QA1h9Z1ehS7JGrWOvc3x0dg6PgJJTA1BjR09m3gYp+U/H+ DERxwZlZDUtbC18gx87qU5VzGBXCiFUl3JWQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=6++NSo7nhleVNv5D1a6ojdhyb5jaFfFZW4dq4b5kgFY=; b=nziQG2+FoST9jcDYQVPnLG+yvRijpqlTruycOKe8C1q7JbDnDqdk3y92c4Z0SZFAxu niodpS0hvAC/oGBvyhApTdjSdwkRLUz8ocLVMiQxG4xGjI4ED1lF6KIs4m5ysqdQgWdn VlGR74ECxub8vW1tBeTMWdbjtk2Icl+eMwnm1Oy28zKHc1OAJ7OypE11Wodb+lQdKucl UMOdfD+6kSOIEfL5QyGeL5bjloVnBpJw86kBvZBqX1CBfPHtKhlp9+7uMfy1tU6wk7R8 rYZ5XdITm4wooKKRWZkr8QjSnQgSzt1zhbNw2LGc2CwPSPueit4OFYYzuc5HDDISJCzT bnCw== X-Gm-Message-State: AGi0PubjX/DWPLsZPJMEczppjGC0YMx27t0qNTM0QhyPYpo7BFVovLqi p9MH8zCHZcxnpxBwzsf8pVlDLA== X-Received: by 2002:a63:1d4c:: with SMTP id d12mr6991045pgm.247.1587695933525; Thu, 23 Apr 2020 19:38:53 -0700 (PDT) Received: from chromium.org ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id 198sm4184312pfa.87.2020.04.23.19.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2020 19:38:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200422145408.v4.1.Ic7096b3b9b7828cdd41cd5469a6dee5eb6abf549@changeid> References: <20200422145408.v4.1.Ic7096b3b9b7828cdd41cd5469a6dee5eb6abf549@changeid> Subject: Re: [PATCH v4 1/5] soc: qcom: rpmh-rsc: Corrently ignore CPU_CLUSTER_PM notifications From: Stephen Boyd Cc: mka@chromium.org, mkshah@codeaurora.org, evgreen@chromium.org, Douglas Anderson , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org To: Andy Gross , Bjorn Andersson , Douglas Anderson , Greg Kroah-Hartman , rafael.j.wysocki@intel.com Date: Thu, 23 Apr 2020 19:38:52 -0700 Message-ID: <158769593201.135303.16055600803132525490@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Douglas Anderson (2020-04-22 14:54:59) > 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. >=20 > 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. >=20 > Fixes: 985427f997b6 ("soc: qcom: rpmh: Invoke rpmh_flush() for dirty cach= es") > Reported-by: Stephen Boyd > Signed-off-by: Douglas Anderson > --- Reviewed-by: Stephen Boyd