From patchwork Wed May 11 14:56:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 12846288 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 D2029C433EF for ; Wed, 11 May 2022 14:58:36 +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:References:In-Reply-To: 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: List-Owner; bh=rF9QCoOyq4goEfXYZAsWazaNbDYSspjZ8ZraTa2PbhY=; b=w/S015JMZDhyE3 78rA0+S7oxtPSfPnrn5VDIwkg7TLrKXi+gxCBFiwUS/++G/IBvjFswnz7E4PbFU4SDadry7KCKhen e1B4f/ja5M0WbY2hMxvEC7wZByiIirZmSHegXlSmPnBIzFj4PFILCxTsf914SpWTHe1uDOicAvOqo s84HMkUwkP8SHDtJ5k+eft+FIj4D1hU/MIhns0UIKzYlEYvqCRu5nAm6piW0XsmwywOIJv853P23l aMcnq3Pja9DVcqq3FMCxcj9Kr/gPCFYN+dGHxDln20x1JRqpTFonrLpLmA10rKg78tiNJsvxXf9JE AFmWQDzaqncwDpPvpTZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nonmT-007LwJ-NX; Wed, 11 May 2022 14:57:37 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nonmE-007Lni-0S for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2022 14:57:23 +0000 Received: by mail-lj1-x229.google.com with SMTP id t25so2955643ljd.6 for ; Wed, 11 May 2022 07:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5o32wUvvQH//2mVRnrNn2QEStbroChjE5Xk/XzAuRBk=; b=dki0vUPuO6N2MH4IL3ZTgEaxHGtGP6p6K0m8Q72dfkfKBbFT0OwqRrUiuBrl3lXLgZ JFjAobUlKptUEqnzST5BCRTsTA/rZijsUSqp69imeyxWu9csCASx04zP2ecPcCxgtG29 SEmcuQQFzv+jHpS16Oml5yWyakl16G2yDbL598oH0xaLD25bYYNYmY35usC091wBaR97 d5YeKaCQ7WmbxTgul/MLdJgLW9GdTi2tlX77R14DOyZ7VpC+5Y0IiIgtn5XFhIrNNUS6 fdD2XyMqPjitot5O893/T4TZDMsiuEanmcy0qR0CybUhE0Bs2o3a9vnlxr12ytHgUslf DDaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5o32wUvvQH//2mVRnrNn2QEStbroChjE5Xk/XzAuRBk=; b=e3140T2Q1roI0NUwB7BVJ08gcarxdie1GR2+xYUEuvxsGW0e68IxhpYoCfByzMF707 rWKbdD+666SKpkB0SKZazIg0qyTd8EOIkW8lxlhmyBBI2o5OsHXrtazqIIJis8ZVfWA5 MJmFH8kHkJa44Z2vvK6o3mx18FstjHUkN8kzBoucxBpWUT6vSRwaU4jYLNAT9stnLOyJ /EpTm+VoRcDW0huOWqEJMw7dYXHZShE689MvnPjtROWwDXpvKlVaVOoS4Z9kDzjHyTzG 38su6HxID8/1yXfkR3+/jgfB4K4pARdWkhlb2+pGWdHIU7lTGDo0RJQ3vz2jR5c50gdC RqOw== X-Gm-Message-State: AOAM530me4UA5gxl9O/Dd3Xrn+OieFxrhOjKvvv4suR2BefufXsSgX+I EFiAiV1/zM7SLesCTOipwtTt1A== X-Google-Smtp-Source: ABdhPJxN7/QyIiPpFUbdwfUHavikSQxiBF96wJKrFR+5weGOmkPZiZowCNcAmTYK4Y2f75InPhl2lQ== X-Received: by 2002:a05:651c:b90:b0:250:7fa3:b234 with SMTP id bg16-20020a05651c0b9000b002507fa3b234mr17825253ljb.188.1652281039986; Wed, 11 May 2022 07:57:19 -0700 (PDT) Received: from localhost.localdomain (h-98-128-181-154.NA.cust.bahnhof.se. [98.128.181.154]) by smtp.gmail.com with ESMTPSA id z26-20020a19f71a000000b0047255d210f3sm320793lfe.34.2022.05.11.07.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 07:57:19 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" , Geert Uytterhoeven , Maulik Shah , Gabriel Fernandez , Alexandre Torgue , Dmitry Osipenko , Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/14] PM: domains: Add GENPD_FLAG_RPM_ALWAYS_ON for the always-on governor Date: Wed, 11 May 2022 16:56:51 +0200 Message-Id: <20220511145704.698189-2-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220511145704.698189-1-ulf.hansson@linaro.org> References: <20220511145704.698189-1-ulf.hansson@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_075722_084214_8C08BF50 X-CRM114-Status: GOOD ( 12.90 ) 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 Rather than relying on the genpd provider to set the corresponding flag, GENPD_FLAG_RPM_ALWAYS_ON, when the always-on governor is being used, let's add it in pm_genpd_init(). In this way, it starts to benefits all genpd providers immediately. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 18cd7965e5d6..262bda9b56ef 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2016,6 +2016,10 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd->dev_ops.start = pm_clk_resume; } + /* The always-on governor works better with the corresponding flag. */ + if (gov == &pm_domain_always_on_gov) + genpd->flags |= GENPD_FLAG_RPM_ALWAYS_ON; + /* Always-on domains must be powered on at initialization. */ if ((genpd_is_always_on(genpd) || genpd_is_rpm_always_on(genpd)) && !genpd_status_on(genpd))