From patchwork Wed Sep 1 09:11:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 505007 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp67907jai; Wed, 1 Sep 2021 02:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuohnDevlVD/HsyhClMSUYspxBrO+7Rs3QliuoV3hs+FCC9fsFeytmY0uPr57PLaLecOaC X-Received: by 2002:a02:9542:: with SMTP id y60mr6775508jah.87.1630487533017; Wed, 01 Sep 2021 02:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630487533; cv=none; d=google.com; s=arc-20160816; b=m8oWvSYNdxzrgg2zIDeJ2Wj0xhPwfeayf5AKMNuS0wvjxoHnAah99ECX8F+HQvQIzu YEVGXfMQbJmctJXcfQiMdVMOD4ZLhwCVpLjkPWRMoOL9EoN5QVMWVn7lrX6JpYU31o9d NuWTvkMQzh71WDLCXj2we41XUVAd21cJc9eVz9ubx34S808BdG3pbuEfD0arfx3S4Zc7 TXGruJ4f1QlFG6qpDgsXpbUJSlQDn0n/IRkz9WpEbfkWDO4gBP1apsnkih2exqboXUH0 1hMbVNjQ5T/GLPi9aCaPylSFVG6eepyLb4n69c6mOPf4WIIGupDutzVpB6UB9SxOTN6U kIyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gWah+IetMQ7aNpxLyaztsF0WudYoMWYnrUia/FiXZFE=; b=tRcX7edlbBScZ9UlaYKyQhgtYn1ex/H3dIF7u3EA0aYX4ZN57z02CxYh6eUcUwJaAL b5d4tQWyf4qpEzs46bdP3qDvh0lvSF70YxvPf58Op52Litn5XTzb6Zi6siPEzNqauKez wd9jM2QDdBG4DplHJ0VcMKLr9nhCJWWbWQ0U+0KuupNR+lNg6JLHI6+Cgxp9L4FjFD15 oKmzcl9ME9f0vnLl07FifzWTYeB6iyn9423xe0idnTxNjUnoguW67TNpvybRDIi/1hSq JO//laS2lgezEDa3yVxBN9zeBrY2Ex1iNcM1SnmR+Hkauvl3MEYjXHsZ6uB3C8zb78Oe nE4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aazJOhw6; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si21248562ion.51.2021.09.01.02.12.12; Wed, 01 Sep 2021 02:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aazJOhw6; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243438AbhIAJNI (ORCPT + 7 others); Wed, 1 Sep 2021 05:13:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243434AbhIAJNH (ORCPT ); Wed, 1 Sep 2021 05:13:07 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1204DC061575 for ; Wed, 1 Sep 2021 02:12:11 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id 2so1527344pfo.8 for ; Wed, 01 Sep 2021 02:12:11 -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=gWah+IetMQ7aNpxLyaztsF0WudYoMWYnrUia/FiXZFE=; b=aazJOhw6HmE6zAcrZkuwG0M7/uRCKODFPzfpvRHRaD6cLUQwpOsG1cDMogCOJZysEb Q4F2+2YU/y3IVyGuj9Bcx66RAX+frBRLcM9vPPd4HFo+COp6uOq4fZCZXtHSSMqMeSzE bGJpPBzsntnWAZcje8IrxGaXJYDH1LLwYVEU2fNh3Xisv1pezDu3TOCxa7Nhlo1VdR39 WERAywUyhhAP02r07m8yqwp5VinT2c5wCAerCFHgkDo4p9v6GlS39o3fuXdA72QBeivf hfzQWQSJ2UkxwnJ4OHS2J1HvjLMHe1OsIrm4VlI3Zx6kUfFdU/i1ZGq96Phb1JJ8Qmo7 UMvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gWah+IetMQ7aNpxLyaztsF0WudYoMWYnrUia/FiXZFE=; b=lM6+Nw07Dn14v3dAAoBgsYiTI7vxcx1+IfKjMF6k6itUuvwx9lcXnghyjycmpw80O9 R+Fq33pp/D0tIb+tpIsqD2b8OGeDgIOHOAMAhWbXUYO9DhDCzw9zCT2QqYqPAmsoCHNd ydd6BtE2In72oN46AhM9D/Ob1WRzJ7aLJ0v6/4DHhVN1fI1TmHRd128sUQYwfFXfynRV TdFJb4EW8zQDo1BGZXfVU5AuzSM7zS2YrxMwoeOMWIBHDFz1U1dgXv7XKNlymj0F3ftG jje1rBv9QK3LziauuiTZ2H6h43E7M4mE07+YwtbpXbLcXptsqORi9ZmDtxAsK2vgrMUm gjTg== X-Gm-Message-State: AOAM530hUITtn4otVdAUxta4I8VgAOp1p3SIeEIklpPPXlAuYpnd3bSr Jmty4IKU3/4xv1QpS5dEiWv+Cw== X-Received: by 2002:a63:8f4a:: with SMTP id r10mr31328737pgn.337.1630487530535; Wed, 01 Sep 2021 02:12:10 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id g141sm1062034pfb.128.2021.09.01.02.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 02:12:10 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] cpufreq: acpi: Remove acpi_cpufreq_cpu_ready() Date: Wed, 1 Sep 2021 14:41:55 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The ready() callback was implemented earlier for acpi-cpufreq driver as we wanted to use policy->cpuinfo.max_freq for which the policy was required to be verified. That is no longer the case and we can do the pr_warn() right from ->init() callback now. Remove acpi_cpufreq_cpu_ready(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/acpi-cpufreq.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) -- 2.31.1.272.g89b43f80a514 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index b49612895c78..28467d83c745 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -889,6 +889,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) policy->fast_switch_possible = !acpi_pstate_strict && !(policy_is_shared(policy) && policy->shared_type != CPUFREQ_SHARED_TYPE_ANY); + if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency) + pr_warn(FW_WARN "P-state 0 is not max freq\n"); + return result; err_unreg: @@ -918,16 +921,6 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } -static void acpi_cpufreq_cpu_ready(struct cpufreq_policy *policy) -{ - struct acpi_processor_performance *perf = per_cpu_ptr(acpi_perf_data, - policy->cpu); - unsigned int freq = policy->freq_table[0].frequency; - - if (perf->states[0].core_frequency * 1000 != freq) - pr_warn(FW_WARN "P-state 0 is not max freq\n"); -} - static int acpi_cpufreq_resume(struct cpufreq_policy *policy) { struct acpi_cpufreq_data *data = policy->driver_data; @@ -955,7 +948,6 @@ static struct cpufreq_driver acpi_cpufreq_driver = { .bios_limit = acpi_processor_get_bios_limit, .init = acpi_cpufreq_cpu_init, .exit = acpi_cpufreq_cpu_exit, - .ready = acpi_cpufreq_cpu_ready, .resume = acpi_cpufreq_resume, .name = "acpi-cpufreq", .attr = acpi_cpufreq_attr,