Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2752823ybb; Fri, 27 Mar 2020 11:24:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvMarBrJ0AXbdDjCLuaJ/DUCCkAu8aji8KprWPcx43PskAr+sAxuTgUhK7O5Al/R2M2GDQT X-Received: by 2002:a9d:6957:: with SMTP id p23mr10953955oto.299.1585333443554; Fri, 27 Mar 2020 11:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585333443; cv=none; d=google.com; s=arc-20160816; b=fLckZvyUkYbkgAPlA5M+ecyhN2qg+ssyllSPMZd0owX0pUN2pOzdRpkeZT47oDhZ3d rcAxfDbXstQhbS4iBYI4PMYmxFn/ixrEpziumJwZBqcoU89QrfCK5YGRtj149ym8u8vP 1C0WjdXam+LYE1CweuS5J2biu2H8+HxGRZa1F0NAuVfxDaCYK0vLv2tfqlheBU9Zr71u yXcihNLxJY/Qrlo6r3+t9j1TfuqxUNnpW+n80dJozk2NMJVjo/McDef0Tq+vlxRc7wyN l2p0VMZl09EMYr4+FporeUX72MS74XGlHqWsbGyTj4jiX1ew16Exvlemk2TkYn4DsSlO WhQQ== 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=FMqfnFJfOBNCe0ahBd62eMY+XQaeL21j8Kfs+r5ufSA=; b=dzyrE3AUo63UpAXgSvGEx4km3z7g8LCniLMBJ/rzW/OwRPVBPpI5NJvu7CfVNWLajm rBhnkCXi+jalJBZF4WPmlsNs+AuWbiwx256w+DVAQ8rJ2mFFRvMXIYD+sgFA2Y5/N8Jo kymGnwGeLWRPGvs3XyGo7SJHsHQVedp/CLridbCU7XH89rnk+an9GrWSJ6l8q5P5uwiX LOd+v50QZ1G/ErShRLfacfqmrkHuofZTzfl/916n8gzgLbpN9Ft87UianYdOtmlQ/UrV htIw7ryAl/wBgBrqG7IEX6IkGNSMqgxg9sx4IksdXrc8ZXbhfgFZG+8Co8zVQkTVi8do brow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G7WCrgsc; 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 184si2484841oig.33.2020.03.27.11.23.48; Fri, 27 Mar 2020 11:24:03 -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=G7WCrgsc; 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 S1727593AbgC0SWo (ORCPT + 99 others); Fri, 27 Mar 2020 14:22:44 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:38614 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbgC0SWo (ORCPT ); Fri, 27 Mar 2020 14:22:44 -0400 Received: by mail-vs1-f66.google.com with SMTP id x206so6834824vsx.5 for ; Fri, 27 Mar 2020 11:22:44 -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=FMqfnFJfOBNCe0ahBd62eMY+XQaeL21j8Kfs+r5ufSA=; b=G7WCrgscZMeRk0ftZqju+5xPkj8WyWt0QH3xSwv9B6HzbWbeum1U4B64GLxHjdb9Qt SG2/j74SA5xNvA3oZy3EIZDIkGC3tvKLMwcsJVmo/w88jkaO/mufMSy/6mKQG5xd+3yt r1mtAyJ6LsEE3cGbfLXKlEvld8VsPvVFft+PI= 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=FMqfnFJfOBNCe0ahBd62eMY+XQaeL21j8Kfs+r5ufSA=; b=fZvMCdn9T/qtEJQKsh3Qpc16DuoJYdr1wzFgPqeimOlQz4SJXyGwu5DhB/rnQkYYST O3qe48NrDP8Uq8504gtZF+4YAevR+7Mmu8BOdsQVDpBx+q5dz+rxt8QDXDhBXlPACZQL Js73GCd/ctE4+sYcvtOVUVHbgeKbOaY36etC/3i/9uVdg8gF2a+8MMAtB/AxlTPqI3pc YpQD35/YqYA3mn+tBxAAGSI5LTGUPx1R8FtyOw5y5a1tok1VSyRMwrjGcg5tMhF1+VBa Z+d8X6UhX1n9su2COcSLIeya/M4lfZphxehmFoOR4VlM8GojJYhrezAA9XMEI9AhB+iC yP0A== X-Gm-Message-State: AGi0PubuFac5SaJOLJcxoM/pPGPj2RScjd3eaKgLSONpiO2xF1MiAa9y javxekq+ex/5cT6QwR9yppiSilouhZ0= X-Received: by 2002:a67:f24d:: with SMTP id y13mr283643vsm.72.1585333363239; Fri, 27 Mar 2020 11:22:43 -0700 (PDT) Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com. [209.85.217.53]) by smtp.gmail.com with ESMTPSA id o39sm3165433uad.6.2020.03.27.11.22.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Mar 2020 11:22:42 -0700 (PDT) Received: by mail-vs1-f53.google.com with SMTP id r7so3923617vsg.7 for ; Fri, 27 Mar 2020 11:22:42 -0700 (PDT) X-Received: by 2002:a67:7c02:: with SMTP id x2mr277589vsc.45.1585333361883; Fri, 27 Mar 2020 11:22:41 -0700 (PDT) MIME-Version: 1.0 References: <1585244270-637-1-git-send-email-mkshah@codeaurora.org> <1585244270-637-5-git-send-email-mkshah@codeaurora.org> <7bd2c923-4003-a1c4-610f-548e79a94d35@codeaurora.org> In-Reply-To: <7bd2c923-4003-a1c4-610f-548e79a94d35@codeaurora.org> From: Doug Anderson Date: Fri, 27 Mar 2020 11:22:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v14 4/6] soc: qcom: rpmh: Invoke rpmh_flush() for dirty caches To: Maulik Shah Cc: Stephen Boyd , Evan Green , Bjorn Andersson , LKML , linux-arm-msm , Andy Gross , Matthias Kaehlcke , Rajendra Nayak , Lina Iyer , lsrao@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 Fri, Mar 27, 2020 at 4:00 AM Maulik Shah wrote: > > * @ctrlr: controller making request to flush cached data > * > - * Return: -EBUSY if the controller is busy, probably waiting on a response > - * to a RPMH request sent earlier. > + * Return: 0 on success, error number otherwise. > * > - * This function is always called from the sleep code from the last CPU > - * that is powering down the entire system. Since no other RPMH API would be > - * executing at this time, it is safe to run lockless. > + * This function can either be called from sleep code on the last CPU > + * (thus no spinlock needed) or with the ctrlr->cache_lock already held. > > Now you can remove the "or with the ctrlr->cache_lock already held" > since it's no longer true. > > It can be true for other RSCs, so i kept as it is. I don't really understand this. The cache_lock is only a concept in "rpmh.c". How could another RSC grab the cache lock? If nothing else, can you remove this comment until support for those other RSCs are added and we can evaluate then? -Doug