From patchwork Tue Oct 18 15:28:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13010757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 919FBC4332F for ; Tue, 18 Oct 2022 15:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FPICG/d1A2OLXbqzHUNvqPgBiwLg/K1oanDtdu0GF8U=; b=CDmuErxBQ8Go1A BgNpTVwbFLk4z1rvklwg7Dj/zaouCfFJgsmWcDS8Bei91UoyCeIl6zP/t7CAzGDetZ1rHvSQDRvoO gmDl9KDYtSv9FmKiOcljKGpE22RVy1pDdxHjg/ANzkaru6lnKb1yOuUsVtvtV//naZa4kbrph7IR1 wsrpBm7t3QWRYkco6O+9Fdgg70y0TEqJ2kdPvwvNxh5d6gB48zkfK0Ota9IiZL9GXP869aIIBzE/a 2RcoXxTdpYfPXoNXla/BGymjXKxPCylI3jF3XKfDcGRhRc0LMPLbEGEu+nFBYKK5ApptgpWXDtRpN gjB1ilY501rf3vcwlWPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okoWf-007eN8-Iz; Tue, 18 Oct 2022 15:29:07 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okoWY-007eC8-05 for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 15:29:00 +0000 Received: by mail-lf1-x134.google.com with SMTP id g1so23120469lfu.12 for ; Tue, 18 Oct 2022 08:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UIeALh8fZBeYzvBT8RoZsVBwMsxQV7EeSc9KIgaLlgw=; b=kpeH0bz9eRnfvvtktOE/T2E70VrhjVcvAeYSRRVAuMs3K+90aVYoqiuQ59jrW+LdFd i+UTvad4xLM5mVmwSn7MDZNhcJPxw3fbU8NExMK10+tKhX2dOvuE5CcR9brexP/Q1rpK IHuFiq5n+Qs0GVgMQn6VFHxwa4AyZ3vVrCphDa1It0LOL5ZbZSJe0HNIPXVF3d1N3m/o 1yLr9kAiA+pWpTmMBthXUADD1UFkfp6UbPG+Ll2CxZZ8qjhcrJR0i1SEnl983IXnr5Fr 7nVuFKGJuTotJ0b5JrQQhbc2rRZOM/K/hPgudVsiDUR2zZItUhhnkIgqLx69gXv8KIOG Be+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UIeALh8fZBeYzvBT8RoZsVBwMsxQV7EeSc9KIgaLlgw=; b=6YG2WLzhISq1ql5QXBzonIzg/XCobiM2AxidvCSAzPe6j3TkWe7ky+/+gFISVSNp9H N2H9lJXXBg0ghNRr33vhMZRM5e82lgYZgM/5zvjcErjICS2FyjnjHbOyLzdFVmj7SlwA 2eAKeGN4mU5AHQlqFuR0Q63X5V2coXPskLyZAekVG4pU5eUvNkGUsmAC/BegyZuhWovv Vva+tZy03L+DLIiIrJ2T4ClDvQjVMkFG703YfhniiClb6XOYsZMo9LQvkF4LbUBWzmBV S1pgQlo4dEvCK2iq9Vzz+/kf7cbvt43Y5vZW4mn39ARvESjvkHj8/lHXe126o7XEAZJ9 htAQ== X-Gm-Message-State: ACrzQf2DrO9lXOQL339e58MP2mpZb61eqv+v7rF2H+xnyIeE3y3CNWvu iJHDKJmJzMUPPj9bX+7zJa3M2rycivnDPQ== X-Google-Smtp-Source: AMsMyM60LIozWQYCRb+12A7XPwe4sg4aiqTqYnKiIOle1SX8YxcVPpsrIV+Humq3U19eHlORKp3lew== X-Received: by 2002:a19:f80c:0:b0:4a4:5923:5174 with SMTP id a12-20020a19f80c000000b004a459235174mr1250336lff.151.1666106933561; Tue, 18 Oct 2022 08:28:53 -0700 (PDT) Received: from uffe-XPS13.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id a9-20020a05651c030900b0026ddd41aecasm1998617ljp.135.2022.10.18.08.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 08:28:52 -0700 (PDT) From: Ulf Hansson To: Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: Dmitry Baryshkov , Maulik Shah , Rajendra Nayak , Sudeep Holla , Amit Pundir , Ulf Hansson , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/6] soc: qcom: Add APSS RSC to the CPU cluster PM domain Date: Tue, 18 Oct 2022 17:28:31 +0200 Message-Id: <20221018152837.619426-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_082858_088229_6E8643C3 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes in v3: - Re-worked the genpd patch (patch4) and updated the commit-msg. - No other changes. The APSS RSC is a part of the CPU cluster PM domain and it's responsible for flushing 'sleep' and 'wake' votes to avoid wasting energy. In particular, this needs to be done when last CPU in the cluster enters a deeper idlestate. To make this work, this series makes the APSS RSC device to become attached to its corresponding CPU cluster PM domain, which are being managed by the cpuidle-psci-domain through genpd. More details are available in the commit messages for each patch. Assuming there is an agreement to apply this, I suggest Bjorn to funnel this via his qcom tree for v6.2. Note that, there is also a related error report [1], [2], that this series should be fixing. Although, as $subject series seems a bit too heavy for stable kernels there's another minor workarounds in pipe [2] for 6.1-rc back to v5.18. That said, we may then need to make a revert of [2] for v6.2, assuming it gets merged for v6.1-rc[n]. Kind regards Ulf Hansson [1] https://lore.kernel.org/linux-pm/07c29682-41d7-5624-b08a-35dd0c223d1e@linaro.org/ [2] https://lore.kernel.org/linux-arm-msm/20221018145348.4051809-1-amit.pundir@linaro.org/ Lina Iyer (1): soc: qcom: rpmh-rsc: Attach RSC to cluster PM domain Maulik Shah (5): dt-bindings: soc: qcom: Update devicetree binding document for rpmh-rsc arm64: dts: qcom: Add power-domains property for apps_rsc PM: domains: Store the next hrtimer wakeup in genpd soc: qcom: rpmh-rsc: Save base address of drv soc: qcom: rpmh-rsc: Write CONTROL_TCS with next timer wakeup .../bindings/soc/qcom/qcom,rpmh-rsc.yaml | 5 + arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 + arch/arm64/boot/dts/qcom/sm8450.dtsi | 1 + drivers/base/power/domain.c | 26 ++++ drivers/base/power/domain_governor.c | 3 + drivers/soc/qcom/rpmh-internal.h | 9 +- drivers/soc/qcom/rpmh-rsc.c | 146 ++++++++++++++++-- drivers/soc/qcom/rpmh.c | 4 +- include/linux/pm_domain.h | 7 + 11 files changed, 188 insertions(+), 16 deletions(-)