Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp764028ima; Wed, 24 Oct 2018 08:52:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5dQhBlXnHqdfOxQp7J90JWRDJifPeZ6gG6sFc8riECpJXdPYwc3c7tJEjS4WB05IRAf7DVt X-Received: by 2002:a62:b209:: with SMTP id x9-v6mr3265595pfe.148.1540396349211; Wed, 24 Oct 2018 08:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540396349; cv=none; d=google.com; s=arc-20160816; b=gHfUG0zZWxS32DOSAIpb8GUQCyq9riri3/YcxtAs2hG6DxSYyo23xEnZxu9STz+T+F 2xmsPnK59kiMInjdr9abppHrzEus8uHwkfD/EfSWDmw4dS8aw87SnQfvo1YWPJmF5+wI tB+jHYslthqRiRTW/aArRJnQtZ90Z7XY434k8PrpDmevBI/7aaRhbgoU6VGTciTfuDkf d818o0nukNJNRWIPfNkUz/RDAY0iw7D2rZhWr9+rGrINI134J/nrHvyJxPRv6c8J6ltc Xq9GSckKle4i4hltn4rOiNNHMV6xdsNIXsPaJ4OpLmKnV/VSsm6KgdDW+BMUf/AJi0Dz RjUQ== 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; bh=prdvgaD3Efp/A4t6iK6tEVlDOLQznWC6F6kezvMzyuQ=; b=SWKfYMpM+1CxEvOM30WZ0SqKpQ3BV4NUdhZzJtf3RF+YFrXHrpAAUfAahtlrCRbHBX JOE6a1pIIxTWtColHiJRmwmr3Hi2WjRGfqdB7ECto0A6VTfgHn1AEknQakJ8UvY6/kpu DLZU3xpSOfgWRSVdG3B+8UfaF4PW/wFlnLC1EBFiVjfXPFuuEjZbK/gLZUy0cv+wzor5 RFNCiMhCWexBF8MrDuNx2ah06arqAxO+DWj9qA0zLwh7qxE86qllUF9D7r+jkWjqvwRr pQgDGLalJL39NmxHQdbbVstawKmELjIPfcZW0IVx+373vEUjpl6L7OD5GbUV4PzYTUvA 5ulg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CG+2vd4X; 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 r29-v6si5533503pff.262.2018.10.24.08.52.12; Wed, 24 Oct 2018 08:52:29 -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=CG+2vd4X; 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 S1726884AbeJYAT0 (ORCPT + 99 others); Wed, 24 Oct 2018 20:19:26 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39729 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726575AbeJYATZ (ORCPT ); Wed, 24 Oct 2018 20:19:25 -0400 Received: by mail-lj1-f194.google.com with SMTP id p1-v6so5254194ljg.6 for ; Wed, 24 Oct 2018 08:50:48 -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=prdvgaD3Efp/A4t6iK6tEVlDOLQznWC6F6kezvMzyuQ=; b=CG+2vd4Xbdfwh64rYVgJnhx2d/SGfjJ+sJDl82kkV8dg9APT4MVjHR+93gkAhupzeD FkSA6uD8GDEORooaIwMwQUJpzIItRBPBRI39AOjX7H6/1tRi9uM9Wo1aafKckWI9gV7R CkWHexa2AkYJ3FsiF0CvyLEVVlg0YGEGPMqLQ= 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=prdvgaD3Efp/A4t6iK6tEVlDOLQznWC6F6kezvMzyuQ=; b=SnJey+J80epK6ec5gV0hs1yGrIDM05eEADan7w4yqD33vvCtaEEeM5+kfUUAfzBLpm tII2SwjcWQH7NnDgcRETo1osjN7kEryJ3lgmvsm6d59g/a/pfzJsKmeeRHn05LcwIa7J RLMMOl40uq0tUGOVm9Lk0GUR/NjAaU4T52g8BTFLlvd/v3Arh92LZDOkxHcISptX6/af G2Wb7XgEa0OAXbgqrNVn3RDTpFAxm2OxdXgJFiOOEzfgtGe07svQUznCPM2H2nSz8f42 D7PG88RVp95qvCL3tYeLRZTMhPopQWIpEs51velbc09SkDTd2+mwtTuxbE/TlheBOiX/ XUfA== X-Gm-Message-State: AGRZ1gIvsqA3vDg/7vFBE++FZ+xXr+gBn8CDeDO8h0iY5Iaj4DY2J1hl 0QlE8oY5g70fJT1OfxdEq+v6cXxpscE= X-Received: by 2002:a2e:9584:: with SMTP id w4-v6mr2199549ljh.118.1540396247565; Wed, 24 Oct 2018 08:50:47 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id q5-v6sm741261lfj.85.2018.10.24.08.50.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 08:50:46 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id v6-v6so5241428ljc.11 for ; Wed, 24 Oct 2018 08:50:46 -0700 (PDT) X-Received: by 2002:a2e:6c0c:: with SMTP id h12-v6mr2124622ljc.112.1540396245978; Wed, 24 Oct 2018 08:50:45 -0700 (PDT) MIME-Version: 1.0 References: <1540315748-29158-1-git-send-email-rplsssn@codeaurora.org> In-Reply-To: <1540315748-29158-1-git-send-email-rplsssn@codeaurora.org> From: Evan Green Date: Wed, 24 Oct 2018 08:50:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RESEND] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately To: rplsssn@codeaurora.org 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, linux-pm@vger.kernel.org, sboyd@kernel.org, Doug Anderson , mka@chromium.org, Lina Iyer 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 Tue, Oct 23, 2018 at 10:29 AM Raju P.L.S.S.S.N wrote: > > Fix the redundant call being made to send the sleep and wake requests > immediately to the controller. > > As per the patch[1], the sleep and wake request votes are cached in rpmh > controller and sent during rpmh_flush(). These requests needs to be sent > only during entry of deeper system low power modes or suspend. > > [1]https://patchwork.kernel.org/patch/10477533/ > > Signed-off-by: Raju P.L.S.S.S.N > Reviewed-by: Lina Iyer > --- > drivers/soc/qcom/rpmh.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c > index e6e98d4..877fe78 100644 > --- a/drivers/soc/qcom/rpmh.c > +++ b/drivers/soc/qcom/rpmh.c > @@ -228,9 +228,8 @@ static int __rpmh_write(const struct device *dev, enum rpmh_state state, > WARN_ON(irqs_disabled()); > ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg); > } else { > - ret = rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr), > - &rpm_msg->msg); > /* Clean up our call by spoofing tx_done */ > + ret = 0; > rpmh_tx_done(&rpm_msg->msg, ret); > } > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of the Code Aurora Forum, hosted by The Linux Foundation. > I think this makes sense to me, though the paths through here can be a little winding. Reviewed-by: Evan Green