Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1245585imm; Fri, 11 May 2018 13:19:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrB2MKWT5LzEmJH/UCO2GALhL1ewoBTd6nrQ41RVDY2S6N1RDVdgTzymlWOTrPr+tWOWl9l X-Received: by 2002:a62:1306:: with SMTP id b6-v6mr231528pfj.58.1526069942164; Fri, 11 May 2018 13:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526069942; cv=none; d=google.com; s=arc-20160816; b=n8CS3k2qu4/VMjhJmJD0etrfviVdZZiQO1C+9JHmH6iLbVpxn2Rptvdr/Qrho/ZHDH XKiukt4VCU+XDRK6eK1RkH54OEUiiAPC7uXdva7l01y3h/Zk63QgqLe59snvyRZVXQIz +HCjE+3XTLyqrFe4RaiavJxvDwM6cRrhMVwp/D6TE4qe6Mh+AokRcGZumcNr5VlrjqAk 5WY1SFwad04MFy+tLngleRqQywGfDoLRx0IB33se6Lsvwf96H+DAfGBTZURIUjE4tVWP hCcuEeZM8ZyRnMwSi8gZ30nhIBOZ6X+5TeJcsVlgCrxBBzWPYEBFYeSaKIYgwz8XnXxL 8tfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=kUSRy9qu3cVMkouYl0mSw95tTS02+x7rp9QLknPAlhY=; b=Cq5ez9fnpv3t4j7FuknuxZ3Vg0QCNPyU8ZzZ6RI645Vf9pZC8FSL67OT4RZE3RlsNm 8DLzYl/NM5kSlfwW/Hes5iXwImSG4N8cFrB+CFi6ikZx8fRqxtlX3xz/qP8zlTTipww+ vXIElCVpokhlwulyiwnpmbzw5ggQGYQy8DBruOg8u/kFR0yHDcMwqAmJRlnPmVhj/twN Wgf1YO1fPg8HlNz/oYIXmI2nknHPLkixWOuROMmPjrSG6dVmy+Kajzjyi3he3gtc9q1A NNPCMQjrnUauUy73gBYyvueFp8TQ78FjFjgoaj1Ximh3QVqqkjEYJHpC3xlnsct5fcMd 6pRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=v9ePV5LP; dkim=fail header.i=@chromium.org header.s=google header.b=mEMYu5hC; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14-v6si3283504pgd.43.2018.05.11.13.18.47; Fri, 11 May 2018 13:19:02 -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=fail header.i=@google.com header.s=20161025 header.b=v9ePV5LP; dkim=fail header.i=@chromium.org header.s=google header.b=mEMYu5hC; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbeEKUSQ (ORCPT + 99 others); Fri, 11 May 2018 16:18:16 -0400 Received: from mail-vk0-f46.google.com ([209.85.213.46]:46512 "EHLO mail-vk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbeEKUSO (ORCPT ); Fri, 11 May 2018 16:18:14 -0400 Received: by mail-vk0-f46.google.com with SMTP id i190-v6so3978570vkd.13 for ; Fri, 11 May 2018 13:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kUSRy9qu3cVMkouYl0mSw95tTS02+x7rp9QLknPAlhY=; b=v9ePV5LPnS25rsvT3GElkzyt1xXKVeWtHnrDYsYbVs83K44pOxpMVV4qwjwlByDpyc s2iSC09JXSgN2rcBvK1A81zeWAnU+qDE99wYmpD03N5NKu0KWqS5PrsdV8jmcLjuTyLN gvOqC3d6lPZCLc6vxu9u4jAMVcZglhZ/0IhGYto1qiV+zwtwWADSdPv/bJAfwKf+mfil 2lqR9RUMMHqZ1C/MPK0XMJIUo0dEWot9yh4oHl+cWT7mkvlIsPHhcNd1QFaK0juXoaQO TfArxfzWyKxRWef2Tuut4KWdvMu6bQsx4C0JUL10+b0at5ejYtY6nixLZNwgQT93MN93 6SzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=kUSRy9qu3cVMkouYl0mSw95tTS02+x7rp9QLknPAlhY=; b=mEMYu5hC0Nm2H9yE5xDCvHKj9zo50wPPdaCUOsxh8nzjhS8gBqyuOs/vzdWNs2a+9w HIPcybbLJnhi7z48EmxKuBiV5YZISUE7yX+Dc+F5xa5+UU7QLKxd/a+4dq9SE6y/aTYJ 25DONdwFGzVysxvUWEH/l2sBewkUonGyZE0eQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=kUSRy9qu3cVMkouYl0mSw95tTS02+x7rp9QLknPAlhY=; b=oYeijVMr6DjcnNzPQuEVh0uY/fJcFjVPBpgA0pGh8ISABSs45rgKIk4OBpTjcOKjqg 1a5LL/lA9HbqBJHKkxPSmaMdh6mnb1ZtI+GQPVBNF9e1YdoQlYqNX47R7ykhm/qkBBGa JFlaV5wOSI0c4aMGWwSjk1oAAvv469dTxlQ0oe0KZYeYo6oVQLYkoTkinj7jUoEu570S /hvfV6sWvkKLmmbUrF1chnm9hwZ6tQSC0/l83WdCxCvNbdGq2GD3i5f3GeDVd5x0/VcG xzaL6iw/eh1wd7t0S2pp4ijeNKYJhBaGfrkrjIy39/t5lWeAI7eP/LET0dbqqBhYldV9 j1EQ== X-Gm-Message-State: ALKqPwfSZDwDjrgMr/uFn1+xBOaOz9KDW8/bBHnix/uhnrDgdB6Llsrc y8ucxqs/vCVOpxv+YCOnrAx1EG9GZDPIgXPMKmTgGA== X-Received: by 2002:a1f:c0c1:: with SMTP id q184-v6mr2559067vkf.144.1526069893646; Fri, 11 May 2018 13:18:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.48.82 with HTTP; Fri, 11 May 2018 13:18:12 -0700 (PDT) In-Reply-To: <20180509170159.29682-8-ilina@codeaurora.org> References: <20180509170159.29682-1-ilina@codeaurora.org> <20180509170159.29682-8-ilina@codeaurora.org> From: Doug Anderson Date: Fri, 11 May 2018 13:18:12 -0700 X-Google-Sender-Auth: nSM2PPACjUPVEwp3mD5GAPiQMpE Message-ID: Subject: Re: [PATCH v8 07/10] drivers: qcom: rpmh: cache sleep/wake state requests To: Lina Iyer Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, "open list:ARM/QUALCOMM SUPPORT" , Rajendra Nayak , Bjorn Andersson , LKML , Stephen Boyd , Evan Green , Matthias Kaehlcke , rplsssn@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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