Received: by 10.213.65.68 with SMTP id h4csp55813imn; Fri, 16 Mar 2018 17:38:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELtkjZNlAzr2ALd1Dm3eSXOsjVFVLpMYUvP/8cAourqeWjEOcWXJMCk/byV2UoCvHGU+xkfK X-Received: by 10.99.181.10 with SMTP id y10mr3053044pge.222.1521247114656; Fri, 16 Mar 2018 17:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521247114; cv=none; d=google.com; s=arc-20160816; b=l2kkTAHBBCd7q0+v0+h3xn4owdh6hSmGPPw/OuSBMPPwpstwQFWp2jdJ1WmeyTe4eT 4vJkzc8QMp+CGbfN7cKi2FCPGTEXMv2aVBxsmFrg0XZOILXz1R1SfHFI1d9QAAxOKdbN MSycaAnupcmVPEdAmrICeoJmwYCfSgRMafuofNpELPjs3IE3Ty+tgXfmvuEtwxadW691 +QKJkGNJQXioxj1wlc7QmLzA5kwYmuDyYPxCj109FrgyadJn+6Ao7iXRfDh6cF5uwvG4 I5XUK0eSXE6ZyrCvTPwbppU0tcAlisQJLYThuOENwG8fhfrGN8iRxv5GebSFDVxG46O1 7LfQ== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=7Y7iAw5ZWS9EVo2o7S/4oDvMExib6ni3lWIrBPyt6tg=; b=Q4X9BVZIj36B0QPs70p26DurJK0ifQpIjpOQnQ7xDFBPy7ZNvHHSOB0vDRaLvRTDf1 VZlOUFSBuqQtm+Gh0Pn4f0Vsg8oVp7p/xgRX82QpNgbSXNGAjaZSMGteGezPyLddEBiu Q+nk8YqU1Y1oX83ZM/Kq/4K75SqkK8q9/8MeR+xr9Qmjl+a1NfGk+/2cbnWqG59PVKx1 OKc0uFkCIkAWQcbT5zZbGOo7QpWGIfnCF7xXmT1yeHHXHzCgvuVq/u//biXD2FEhiW3W dgDZrFfNd7E0VzTrnhEz2pOvETN2g7Ltbsq9bj2k8aHZj8U+R40gbrVIE9q3HOBw6thL orUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hVBdqOtv; 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=pass (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 u27si6401035pfk.241.2018.03.16.17.38.20; Fri, 16 Mar 2018 17:38:34 -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=@chromium.org header.s=google header.b=hVBdqOtv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752765AbeCQAhJ (ORCPT + 99 others); Fri, 16 Mar 2018 20:37:09 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:35611 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829AbeCQAhH (ORCPT ); Fri, 16 Mar 2018 20:37:07 -0400 Received: by mail-oi0-f47.google.com with SMTP id a189so3076448oii.2 for ; Fri, 16 Mar 2018 17:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Y7iAw5ZWS9EVo2o7S/4oDvMExib6ni3lWIrBPyt6tg=; b=hVBdqOtv3hI9j63fncpYWPAWrPUDDsa0yCpkZfBZ/ebeOuJwlq7eDg8TY2gpwgoT6N TPRg3i2lxmN9S3elYmR0DqVjsEE3pBoRcemJnU85quuS+ncCbn+epkcdp7W1O4Bii0Wu VcPnTzAlQ8z3IP/BqJ/F7qL7lSi/rf/amlK1k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Y7iAw5ZWS9EVo2o7S/4oDvMExib6ni3lWIrBPyt6tg=; b=nHV1Ynn4sWofpbg9Ykb8bIssq/VmFMmczBkS5gnu7gRuizCidCeVlaKWhObl6Gso62 5hU69duVuGsvbHq46DUNQtN2S9fmNdSq26RfPDIhsBi2J9c/i6X/vDIJTyyIoyLH5N6D MovPIgIrwvsaZba3EZjfSzkKlHFk/bQ/OVGEakRDal4W1vaAeztrh3pYobLn5OEd4t4Z w5G2bzVcJnGS2dPPY7ubzRT+a+ebaRTqqfRfocink/FwIlVZuQ8+jIRf7JKJUh+PDxVn 7VpnBtAA2dinTc5OFzG8Ls2B3e8sRmu7Sso94nmDgXRa4x8sH6kR6wMgDLttyo05KjXx 27Ig== X-Gm-Message-State: AElRT7HC6LfB1Ow6zmYZTMUtzw+34RbmTvlAgLbqMYMBs6y/hJxezuWq BtYuZbBBibKt9uN4SyiU3V9IswR9C5g= X-Received: by 10.202.53.134 with SMTP id c128mr2420094oia.74.1521247026738; Fri, 16 Mar 2018 17:37:06 -0700 (PDT) Received: from mail-ot0-f178.google.com (mail-ot0-f178.google.com. [74.125.82.178]) by smtp.gmail.com with ESMTPSA id m62sm4768947oig.6.2018.03.16.17.37.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 17:37:05 -0700 (PDT) Received: by mail-ot0-f178.google.com with SMTP id 79-v6so12070788oth.11 for ; Fri, 16 Mar 2018 17:37:05 -0700 (PDT) X-Received: by 2002:a9d:5b10:: with SMTP id x16-v6mr2690209oth.53.1521247024728; Fri, 16 Mar 2018 17:37:04 -0700 (PDT) MIME-Version: 1.0 References: <20180309232543.24636-1-ilina@codeaurora.org> <20180309232543.24636-8-ilina@codeaurora.org> In-Reply-To: <20180309232543.24636-8-ilina@codeaurora.org> From: Evan Green Date: Sat, 17 Mar 2018 00:36:28 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 07/10] drivers: qcom: rpmh: cache sleep/wake state requests To: Lina Iyer Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, Rajendra Nayak , Bjorn Andersson , linux-kernel@vger.kernel.org, sboyd@kernel.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 On Fri, Mar 9, 2018 at 3:27 PM Lina Iyer wrote: > Active state requests are sent immediately to the mailbox controller, > while sleep and wake state requests are cached in this driver to avoid > taxing the mailbox controller repeatedly. The cached values will be sent > to the controller when the rpmh_flush() is called. > Generally, flushing is a system PM activity and may be called from the > system PM drivers when the system is entering suspend or deeper sleep > modes during cpuidle. > Also allow invalidating the cached requests, so they may be re-populated > again. > Signed-off-by: Lina Iyer > --- > Changes in v4: > - remove locking for ->dirty in invalidate > - fix send_single > Changes in v3: > - Remove locking for flush function > - Improve comments > --- > drivers/soc/qcom/rpmh.c | 203 +++++++++++++++++++++++++++++++++++++++++++++++- > include/soc/qcom/rpmh.h | 10 +++ > 2 files changed, 212 insertions(+), 1 deletion(-) Reviewed-by: Evan Green