Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp769787imm; Wed, 23 May 2018 05:23:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrE/6rBHEXIMdyvaDSpdGwF2RbiJalX/gvFKviuy4/uOKAX1vpU9dLYUVyQG2oDSneL9+yD X-Received: by 2002:a17:902:7782:: with SMTP id o2-v6mr2817828pll.247.1527078215653; Wed, 23 May 2018 05:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527078215; cv=none; d=google.com; s=arc-20160816; b=x4FNSJHHMv+AS99dX1i7wADODxM9kV8edAKtO9OgvAEiwsMpJBYkzYiHmsmMF+A9bo 9OpDojR4pozYtpm7lD9KCENYqIvF+VbEeqYaLSKgHg6WY+/Ja1vo3McObtBEqVsgweSd vzd7wzEdHiN2+yKqiPoSL0pNK4eeDKQOjhVWDSXDMz7WFhz5KfN3z8Nb1KfICJWKEl4g 6fQeYcDFF/1UNXlUKvB3zQ1ydecFpVdcNpOzlCG7FWdz67k1rxSXPIlTmmTZyzQwlkbX 3hyQWuqD6KY7Th7GdZqtz/dhfeS/OM49XxAYaIJCXLm3Wob/RAcbtwxwGbth78iaBzbP GNsg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=CBjyZL02ARVIY1Q8K5quzWJPfoMH9xcLTjaD3SNon6c=; b=gLDtsBNImfcpq/xiUMX+1nO6L3sypdAKz57l2L+HeVZhYKmA4/SPIXlCjhx02JfTDs pjblUpBGbjz01y962gjCjNqlDdNhfTx9cO3RstkqRpDLxP2m0E8FeKZbDgdgImOs++wn PKw6Lpd7ffWj4kfL08dXzcRuQP0ReKE1u1Z9IQlC/RsGvLUruWK/Er6mrkGtxhuD8z/N rzU/mTtW8gWPs00X9PlHAIAv/p36V8uhGgrEnK4An9GpH9I/Rg19BCqBckP/sEShJtrs x+qoJyVIx7pvoHfvLIACGcWty2C/B2kOsQS8OVt03egxkNwd/y5mClQSR/a0phXpBcXL aX3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XtTCxq5a; dkim=pass header.i=@codeaurora.org header.s=default header.b=Va4BD0RV; 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 e8-v6si14738232pgq.173.2018.05.23.05.23.21; Wed, 23 May 2018 05:23:35 -0700 (PDT) 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=pass header.i=@codeaurora.org header.s=default header.b=XtTCxq5a; dkim=pass header.i=@codeaurora.org header.s=default header.b=Va4BD0RV; 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 S932903AbeEWMWE (ORCPT + 99 others); Wed, 23 May 2018 08:22:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40690 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932620AbeEWMWA (ORCPT ); Wed, 23 May 2018 08:22:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6189560AF9; Wed, 23 May 2018 12:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527078120; bh=D71SQvwmapymN1nEnp5ISj0pPD+RuOqJXqsfq6hksyM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=XtTCxq5aVEDw1FSaMwGeatv3t7YlQDfxElm2MH+nSCTYdMyZl3tJB0Q6otiepctnI djN/UpJefsbob/p7JVG7ktXN3wuiDgefTkjDszsu+PJ/PXTQZGmvMCLcln7j0X82lU UCrV31rzyayvosmDiyevA9w/oOC5mkCdRtuaNE28= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,FROM_LOCAL_NOVOWEL,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.206.16.80] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rplsssn@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A14E860314; Wed, 23 May 2018 12:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527078119; bh=D71SQvwmapymN1nEnp5ISj0pPD+RuOqJXqsfq6hksyM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Va4BD0RVlXxDGG2rxryfkb3+5a7CpTj7cBgP2pHuZJhT4zaJ85+0N2To98DwRERyU yomZSfe9thmwYVwXMztGFyb45hlWlJyrpxE1HbOkKdseheu/iNFqmhnicPXaJKyqZj 108iYv50zyhIShu4hS2L3sWLkIIMXS1Ag/dBkX90= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A14E860314 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rplsssn@codeaurora.org Subject: Re: [PATCH v8 07/10] drivers: qcom: rpmh: cache sleep/wake state requests To: Doug Anderson , Lina Iyer Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, "open list:ARM/QUALCOMM SUPPORT" , Rajendra Nayak , msivasub@codeaurora.org, mkshah@codeaurora.org, Bjorn Andersson , LKML , Stephen Boyd , Evan Green , Matthias Kaehlcke References: <20180509170159.29682-1-ilina@codeaurora.org> <20180509170159.29682-8-ilina@codeaurora.org> From: Raju P L S S S N Message-ID: <2c6fc480-7894-2a69-b1ff-fc3cbc96a9a1@codeaurora.org> Date: Wed, 23 May 2018 17:51:48 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 5/12/2018 1:48 AM, Doug Anderson wrote: > Hi, > > On Wed, May 9, 2018 at 10:01 AM, Lina Iyer wrote: >> /** >> * struct rpmh_request: the message to be sent to rpmh-rsc >> * >> @@ -54,9 +71,15 @@ struct rpmh_request { >> * struct rpmh_ctrlr: our representation of the controller >> * >> * @drv: the controller instance >> + * @cache: the list of cached requests >> + * @lock: synchronize access to the controller data > > nit: this makes it sound like this lock will be grabbed for all calls > into rpmh-rsc. In fact, it only protects access to the cache. > Ideally name it cache_lock and document that it's for protecting the > cache. > > >> +/** >> + * rpmh_flush: Flushes the buffered active and sleep sets to TCS >> + * >> + * @dev: The device making the request >> + * >> + * Return: -EBUSY if the controller is busy, probably waiting on a response >> + * to a RPMH request sent earlier. >> + * >> + * This function is generally called from the sleep code from the last CPU > > "is generally" implies that sometimes it's not called from the sleep > code. Change to "is always". If "is generally" is more correct, you > can't run lockless right? > > > -Doug > Yes. Will change in next patch. Thanks, Raju