From patchwork Wed Dec 11 12:26:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Loehle X-Patchwork-Id: 13903433 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA07E1AF0D8; Wed, 11 Dec 2024 12:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733919991; cv=none; b=cuTWIJLJZXpkMPgWr5fr0NlWoiGgI8PS9lUPPYygFaTbz7JzuWTIiLXnuOYPN/JTi8SM1e9pt+xmJKUsq1wbzwKZDt+SLC3Uls241YD32bG4uT+LqQ6EsikNFtVLFDp2qIEW/3UpfUSm/eq4Jz4aVCShgoJ5fGZTkaHqbZpmusA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733919991; c=relaxed/simple; bh=DOc0cHF0YJN5zNirMv5yMsYZg+/U1TycZSF5KDmMGdc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IO56FzMOXkxXSoNEr5dp/2sgYlf/KAjT4C9yYgUD+d0As5LqELPGQh2AhJSWmtG0xwJIkGyMM4xCnKaCb+gwY4L4ITQ/JVEr7l5URuFtLy4B+v1Dwt6/AaC6QOLLPo5RbsmUBG63wo48cCFl1v+aZU+6GqOvkJ5W+TNlv9DsC8A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 37BD91063; Wed, 11 Dec 2024 04:26:57 -0800 (PST) Received: from e127648.cambridge.arm.com (e127648.arm.com [10.1.37.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E7BD03F5A1; Wed, 11 Dec 2024 04:26:26 -0800 (PST) From: Christian Loehle To: rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Loehle , Huang Rui , gautham.shenoy@amd.com, Mario Limonciello , Perry Yuan Subject: [PATCH 1/2] cpufreq: amd-pstate: Use CPUFREQ_POLICY_UNKNOWN Date: Wed, 11 Dec 2024 12:26:04 +0000 Message-Id: <20241211122605.3048503-2-christian.loehle@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241211122605.3048503-1-christian.loehle@arm.com> References: <20241211122605.3048503-1-christian.loehle@arm.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 epp_policy uses the same values as cpufreq_policy.policy and resets to CPUFREQ_POLICY_UNKNOWN during offlining. Be consistent about it and initialize to CPUFREQ_POLICY_UNKNOWN instead of 0, too. No functional change intended. Cc: Huang Rui Cc: Cc: Mario Limonciello Cc: Perry Yuan Signed-off-by: Christian Loehle --- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index d7630bab2516..546e69cbdf76 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1449,7 +1449,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy) return -ENOMEM; cpudata->cpu = policy->cpu; - cpudata->epp_policy = 0; + cpudata->epp_policy = CPUFREQ_POLICY_UNKNOWN; ret = amd_pstate_init_perf(cpudata); if (ret) From patchwork Wed Dec 11 12:26:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Loehle X-Patchwork-Id: 13903434 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7611F229139; Wed, 11 Dec 2024 12:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733919994; cv=none; b=KgVQVDqfddmoGh8/IdbLRJFPXeca0wRH5MY7IdulZvweu5XXNjwfpqf8gRWFjWY/Q1xKEVhc2Cp4fYv9pkHzOzAppw+9H5IZKjstVq0ip9R8AE3kAl/22ONS8wTvFnxpLCmnYWiFGt8NmtrpOSnWk8YeoaCdsD9RS0n01/a+K8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733919994; c=relaxed/simple; bh=1VG2yaHEbYqPxvj/8YriPFWgs/zn/sApY4f9nQmhDNk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gnJk6vPG8sveptOY3vJq4yVo2TUOrbAd73+jNx7logSwvxD5XSLL7CZElMolMJB4RsMhr2N+IFNjYuAEtxZq1+S2CJmafhDOtaoCJcaDdn9+CqrphzHrW0SV0qJjxiq4S3Y4V74h8mQ3+2I429Wc7nnioa/j0KLacYcox38ECUU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3025C1692; Wed, 11 Dec 2024 04:27:00 -0800 (PST) Received: from e127648.cambridge.arm.com (e127648.arm.com [10.1.37.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 68C373F5A1; Wed, 11 Dec 2024 04:26:30 -0800 (PST) From: Christian Loehle To: rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Loehle , Srinivas Pandruvada , Len Brown Subject: [PATCH 2/2] cpufreq: intel_pstate: Use CPUFREQ_POLICY_UNKNOWN Date: Wed, 11 Dec 2024 12:26:05 +0000 Message-Id: <20241211122605.3048503-3-christian.loehle@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241211122605.3048503-1-christian.loehle@arm.com> References: <20241211122605.3048503-1-christian.loehle@arm.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 epp_policy uses the same values as cpufreq_policy.policy and resets to CPUFREQ_POLICY_UNKNOWN during offlining. Be consistent about it and initialize to CPUFREQ_POLICY_UNKNOWN instead of 0, too. No functional change intended. Cc: Srinivas Pandruvada Cc: Len Brown Signed-off-by: Christian Loehle --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b8e2396a708a..5dacd9d26879 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -2709,7 +2709,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum) } cpu->epp_powersave = -EINVAL; - cpu->epp_policy = 0; + cpu->epp_policy = CPUFREQ_POLICY_UNKNOWN; intel_pstate_get_cpu_pstates(cpu);