From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B68121B1BC for ; Fri, 24 Jan 2025 08:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737709134; cv=none; b=k+H11ziDD3NKPaWW+Qbj/omqH1jUWOM0Jww3VbqtOBYnWoGbQTpyE5lxB7Cpp6X734sTqJpG6SSbQCwFdWd3UlZVLeRTWY0nKdg/Klr6hMK4dNutbMY+ycLjmIYW+VdpnywcCwBZsgiVuX+nf75i5D13T/uTXe7WDTXGavIDhsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737709134; c=relaxed/simple; bh=bXRFxc8mF6V5TgGKJMgWIksw91YHqbMB+UstyP1aTGA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q8wjT+Dp6+J6sw0LkovWJHunVFWzLmzLqdxghh7OWii06YuCwNjvObJXNPrOUUdv/3ATiP8/TBWOqBrTyTf6Q+xQwoQdseOItb3ahwKHn1sgB3BjH63S29EX+ZuS52E4qHVfjQvYWIvGF5a/FPNF5RZeORe+Swff1CzofgCX/78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GxOkKQCm; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GxOkKQCm" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-21628b3fe7dso31758075ad.3 for ; Fri, 24 Jan 2025 00:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737709132; x=1738313932; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fMoNvFkgp1qWLsX17FcDuwLCN8OyZaPo8LJZUOBX12E=; b=GxOkKQCmN64sAQBrURY/UX3/rTlcOpjQu9QkW7ktzBaiNDZsAp5IaXIULOYk00GmFY fqnKhbrMf00/rywIkf5SBBmusZooCqymVaMuTCrYgq33XxPYC72zqvooHCnaYjs1dY2n 29ojGscsaHE6Wlk12Nd4aVX++Ep4TqXjem4sA9ApsaBZd9t7dsR/Ji1VAJQfzL1Hoglt C+JvfJHXOb4fFjQagsloJGCftur8P+vbt1KOaQ8KZ+3Wg4rVUy7gAmMqHKV8DTVA9MR1 eC9dHYa3W/Po/NtLP0q86Y0D9qmbz53aY/ZZYcRmEFzobQ3s4YkVLR5k1vGYatuFiS2X VF/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737709132; x=1738313932; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fMoNvFkgp1qWLsX17FcDuwLCN8OyZaPo8LJZUOBX12E=; b=Zjvu30QZm20U4wyJcfY+VpRTIN32VUuUqzxCIX/guoy22pRKryaA0otgmKFsKHf7ra Ywt0vBwPtpjeSr1tMJrURNtZ1h6T6/4VWHG1JI4Cbs1whEBytGpXQ/C5Yfj8mhUqwxjk hNu35np8FVmX2Saz1NJz6/LuveCzEP00Cc2J805UFhyby8q/2a8Eawo/pxBFSA05Km8r SuYzTUogirha/cmJKuyXGcEKAqiCuLrFRcTIkebZQEBj3BpoIErxvQYjvU88811qlcGE JQBm78PXFoe/t1EYi4Zv1JiuUcpHvdql5za3i3Vh6E356RL5qnb1+at2ecs2RBGnLWBA zDWQ== X-Forwarded-Encrypted: i=1; AJvYcCWUJ6J/ScihL2tw4OobzriqTK9FtkgSjUZl702GQD9veuEZl4+UPiX8R0ArPrDthpcU/fOmdWoHTHV6HYY=@vger.kernel.org X-Gm-Message-State: AOJu0Ywqkxhai2mid6JN0y2/4rHBDK0J/Y+Ex5G+CyPMH2QLQ685gnJf 9IbSozM3QmlMfUU0o/QI7POBwfM0DJ7YvbdEKq60k4eTQ3KLGjQiKUXOY2A/TZ0= X-Gm-Gg: ASbGncsUDr6v5FBLL0wfq+1TBd49T1DUa/essqiVSdzjlA76ynRkhjow1ZTuITkb0aC Y6vTrPyPPog8gPrJ/oyBvC80HVjJEAo0XsxCCm2c2zfroLCdURXCgnC1lJaNJph9itymqPykg/M PImIMyjPEYcW7XJTe+ncx8iu89TXDnMEa+Iq0ZD2CbhjoP9Tq5em2AXgAXU5DizSFUXZPHweTjt ems6hIvfcs+S01yt3dMH2ndCcSYci6gGJDAv/E9klAZm19LoLxR2L815AyLYbb5PAoXko/CQd1p mwr15fY= X-Google-Smtp-Source: AGHT+IF2An5pDAZVb9/MWyUP0DaYrumqgTX24QmkS+YPaDLqPFaLEbPC4ywZvWfU/YeOBmq2oXhZoQ== X-Received: by 2002:a05:6a20:3d86:b0:1e1:b1bb:87a0 with SMTP id adf61e73a8af0-1eb21591728mr52880822637.34.1737709131715; Fri, 24 Jan 2025 00:58:51 -0800 (PST) Received: from localhost ([122.172.84.139]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ac48f897339sm979618a12.19.2025.01.24.00.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 00:58:51 -0800 (PST) From: Viresh Kumar To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Lifeng Zheng , linux-kernel@vger.kernel.org Subject: [PATCH 06/15] cpufreq: cppc: Set policy->boost_supported Date: Fri, 24 Jan 2025 14:28:10 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit With a later commit, the cpufreq core will call the ->set_boost() callback only if the policy supports boost frequency. The boost_supported flag is set by the cpufreq core if policy->freq_table is set and one or more boost frequencies are present. For other drivers, the flag must be set explicitly. With this, the local variable boost_supported isn't required anymore. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cppc_cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 7fa89b601d2a..08117fb9c1eb 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -34,8 +34,6 @@ */ static LIST_HEAD(cpu_data_list); -static bool boost_supported; - static struct cpufreq_driver cppc_cpufreq_driver; #ifdef CONFIG_ACPI_CPPC_CPUFREQ_FIE @@ -653,7 +651,7 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) * is supported. */ if (caps->highest_perf > caps->nominal_perf) - boost_supported = true; + policy->boost_supported = true; /* Set policy->cur to max now. The governors will adjust later. */ policy->cur = cppc_perf_to_khz(caps, caps->highest_perf); @@ -791,11 +789,6 @@ static int cppc_cpufreq_set_boost(struct cpufreq_policy *policy, int state) struct cppc_perf_caps *caps = &cpu_data->perf_caps; int ret; - if (!boost_supported) { - pr_err("BOOST not supported by CPU or firmware\n"); - return -EINVAL; - } - if (state) policy->max = cppc_perf_to_khz(caps, caps->highest_perf); else -- 2.31.1.272.g89b43f80a514