From patchwork Mon Nov 27 13:50:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13469614 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 B48B9C4167B for ; Mon, 27 Nov 2023 13:51:13 +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=WoYHh2C2Hvh6ooiCAjnAuaf2Fl8ASIJfQdSFkJRaE7M=; b=D9eOqK4BEaTCW4 hm6mUFtnO4usbRwlk1FplsXl5qVUDgNCE0UDI+MYow9gcNke1HUnNY5+bFHd8vy3MCJ2uMW3jm0xe p21ab1T9hyzgtaHI63dc4XEUO7ZPKsDrZEaWYqJKdABGOejyDu2zbdHGi44p/SVWFpWI23dRwmKyV EkQgbjVLwrrRHTsOzNN6+6oeIZ5nInH+j3YT2ZYhQ6FrpkCv5oxCiPqcy+vc7rUEGo1h5dl3oMUtS 6sLULy51OSLn1yOyrhUkEkGtNX11hUq1Gjo7kfPYNk4bhRLY4Ze7HFYt6HfB0EiwkHiQgh3LMYvwM ZX+YADD9xDq9fW5M0PZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7c0c-002c5U-38; Mon, 27 Nov 2023 13:50:46 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7c0a-002c4a-15 for linux-arm-kernel@lists.infradead.org; Mon, 27 Nov 2023 13:50:45 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507a29c7eefso5528824e87.1 for ; Mon, 27 Nov 2023 05:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701093041; x=1701697841; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VHnnOST8qodLmJFznIgEimpV+tpqmVRkoEWPEvmIUa4=; b=rFJS2ybzjlHnJprUm99j77Ms4obW32S/9lLqp735lYsGfR7C+zdK9RrFHNYvNIJG2w KQoZj2aSnycNq14+BPDZprC3UFmOWjFEdrAL1q1jAEtiJQI1W0PiFXZ2xHEaW9FzUMoS +pRE14VR5I0qAHdoceIOmBNDQivuZ+Tmu2jnKX0CNMtBGQEhzWpHpyuQnS/oPfY9T+vv i98ybJA4+J1j6alOfm7WiyRO+4vWUIYNbEijDhBpRvOzAZPsqY4TOLfgqgz5BujP+pyO KjxRhpS/6cMdiVXHVpHy4i8BtjWrtAImecLL+h/ItlxijreyQsH5TspMhY6EReO3kd3P kFmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701093042; x=1701697842; 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=VHnnOST8qodLmJFznIgEimpV+tpqmVRkoEWPEvmIUa4=; b=PRQ214Vm2zAP1FZXrpYHT2TTDNZpOdBNbpZB/eTtucKamNChTfIYX3Si3ksmy+bIT6 zaVB/7ATJEmmWzVs/MwBCW9Q/9H2FATTTDZYAJsnBAJL2qcflJODGHh39ZzfNA5k9Yr4 O7ZW+7SAFGpVuNKNpHfIuFohqsifccl9VZaDRMEzI53lN7jN4/NX/tyD7jwyAVxHxRxP mN0lJbdtUkUeN2jKQ5XLP++XqSdfFxw80c8mBPXvVhkOSH/QxXO5yktcoTJPE03bmCfg 25nT0wHmdzmspvUqiEpPUmDu5c4WdalJcI3i0jiSpgcywHjsAidBazyfR+yBc27a83RO 38Ag== X-Gm-Message-State: AOJu0Yw17E1XhT50Ju/R4p9B0ecHBL8L1anUui9AXGELuS+MNLkmUwDJ ZNUSjlOL0t2KCUIjiHgFvGEn9g== X-Google-Smtp-Source: AGHT+IGDiNX5D7/anI1R+Tudw4bfEQ/qcFxbTMxwrBkuAl4rMaVjucnEIl1eTqCSkKJvrItPiZdwTg== X-Received: by 2002:ac2:4210:0:b0:50a:9fb9:91b with SMTP id y16-20020ac24210000000b0050a9fb9091bmr6551854lfh.64.1701093040398; Mon, 27 Nov 2023 05:50:40 -0800 (PST) Received: from uffe-tuxpro14.. (h-178-174-189-39.A498.priv.bahnhof.se. [178.174.189.39]) by smtp.gmail.com with ESMTPSA id t7-20020a19ad07000000b0050a71ac3f45sm1472663lfc.203.2023.11.27.05.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:50:39 -0800 (PST) From: Ulf Hansson To: Sudeep Holla , Cristian Marussi Cc: Nikunj Kela , Prasad Sodagudi , Alexandre Torgue , Ulf Hansson , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] pmdomain: arm: Avoid polling for scmi_perf_domain Date: Mon, 27 Nov 2023 14:50:33 +0100 Message-Id: <20231127135033.136442-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-20231127_055044_379566_EE3899A1 X-CRM114-Status: GOOD ( 11.25 ) 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 It was a mistake to prefer polling based mode when setting a performance level for a domain. Let's instead rely on the protocol to decide what is best and thus avoid polling when possible. Reported-by: Nikunj Kela Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain") Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla --- drivers/pmdomain/arm/scmi_perf_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pmdomain/arm/scmi_perf_domain.c b/drivers/pmdomain/arm/scmi_perf_domain.c index bc3f78abb6da..709bbc448fad 100644 --- a/drivers/pmdomain/arm/scmi_perf_domain.c +++ b/drivers/pmdomain/arm/scmi_perf_domain.c @@ -35,7 +35,7 @@ scmi_pd_set_perf_state(struct generic_pm_domain *genpd, unsigned int state) if (!state) return -EINVAL; - ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, true); + ret = pd->perf_ops->level_set(pd->ph, pd->domain_id, state, false); if (ret) dev_warn(&genpd->dev, "Failed with %d when trying to set %d perf level", ret, state);