From patchwork Mon Feb 26 05:09:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129543 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230586lja; Sun, 25 Feb 2018 21:10:16 -0800 (PST) X-Google-Smtp-Source: AH8x227qfWq/AQKXiq4ZafPn4Vx61A9gw2RSpGJXcSliSNI/YWydp+qgnICtZ0AJdFgGtfwLa2sj X-Received: by 10.99.42.148 with SMTP id q142mr7471148pgq.115.1519621816650; Sun, 25 Feb 2018 21:10:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621816; cv=none; d=google.com; s=arc-20160816; b=Tpr15WPbK2zK4m8Dlrfjyz62QXeEI93KgAR55IE/EXmH4+oA7bMR5+/xOi/YRoj8n7 p6s9CLuailBSUkHymHr14/5TENAu+d8XwQR/I3ejPxgun5RQ0t6Qj4o1XkvRStqk/lTj cB8a4Oa1WA0Jm5UlsWjRdq8fdRqdSLZayhHqdy1dr297HtDizPU8A/wBlRZYEP/hz5f4 NAH1MhleMxmTvuIlKHP5g8OhQnOqHaSVUshlpF1P+Hh6sImPtC3gI/ZJ6GketYgff3p+ LpFdsHOi0/9/dnTph7Hf9515wACvGIlAJFRbYK0ob7KDQgkVpxMpo0mjsApYZT7oA2V8 N8UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=rr2wbJ0GjtmkpEP0+Gb4ygwsQWUcusus4wEQfY/Bn254JsAdaFbDvmVMzbEuN/SKvy pKxWQmOSwNmeP4/aTurtBNKyEWYpSTrQc6HGlUBKPUn2N5jAVnEwgBewp+aSiU+et5Vq doxDX4TP/oSm7eDv72CvcMeR9aRQuUv7zkS+Z6RcNcTua6C2y01A8HEhW4olXa+tXniQ CgXCvv3B3HK7XWQnpowL0S4Bm041okSUqk+seyF8pYhtsFse+DNQfZQqbg3tKUHWt9ok a09J5KoVPMDcvVsM9HcKJFyij0kX9wNG5vEmdh/VSdwQjW2zI2PTvuz28kpiMvRV0dxq R2qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMW4Eq24; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.10.16; Sun, 25 Feb 2018 21:10:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PMW4Eq24; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 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 S1751963AbeBZFKP (ORCPT + 11 others); Mon, 26 Feb 2018 00:10:15 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38458 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeBZFKP (ORCPT ); Mon, 26 Feb 2018 00:10:15 -0500 Received: by mail-pl0-f66.google.com with SMTP id d4so8656815pll.5 for ; Sun, 25 Feb 2018 21:10:15 -0800 (PST) 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 :in-reply-to:references; bh=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=PMW4Eq24hBzqkOzf/0z8IUZmOdXofq8Ed4zsN7dsc87ixzgcGux9kCCoiKJfFPZ8NS JkIj+H0Xg+jnexe4Jx3gHUAC5RFOz93d+AEndyARhNv513Q3rlR2WG6krEo9pCg5X5Uo L2SrpUO7BavSXfQiuMx7D1d0z7YlQHIzJK5pc= 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:in-reply-to:references; bh=1K0fXZHrW+EBKHP5ADnHtlBn1AcfLerNfQHxQ+r00FI=; b=dTzTCQQH8lv4hNGZnZcGPwnl8kuJaaqwU3LxQaikqdB0619fXNo9Qy6ANKTj49jKv6 cnoxmvXxG39YW3FDOMfNsTvMpT8gO6GPz3jbvUouXg+iB4tHhuZFH0N3ybbfUfDkIFdD rsIY+lO84CQcCTS5M/+cj6v5gqRjbvWvQq7BudX7TXakfnPWKB7P/aHE0HLQsTHsXSS5 Yx3NHZD5dDMzQH5LoFkZ7ClHLz/D5pz/Rnm0ubFXFvhBpc5JJRXLvgA1jjh+QJOgy3tA ybpQBUaUfW6Nw6SyunP26WxSfIrzpthhL7Gr2bK/BjasxptEYfLJgd+MN7030T6oK87S oWNw== X-Gm-Message-State: APf1xPAgBgWKukOk/RpxeHjoVIg8Lf/tC91uJTG11E7gtPxncyLqBjZl jQYCQeg1MNPuxIDR3MdclcmmbA== X-Received: by 2002:a17:902:6805:: with SMTP id h5-v6mr9413628plk.46.1519621814792; Sun, 25 Feb 2018 21:10:14 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id s62sm12512453pgc.12.2018.02.25.21.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:14 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 17/27] cpufreq: pxa: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:00 +0530 Message-Id: <8e6f90ab32a92c6256885f5b48837e49eb623168.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from pxa driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++-- drivers/cpufreq/pxa3xx-cpufreq.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 06b024a3e474..46254e583982 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -292,10 +292,10 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) pr_info("using %s frequency table\n", pxa255_turbo_table ? "turbo" : "run"); - cpufreq_table_validate_and_show(policy, pxa255_freq_table); + policy->freq_table = pxa255_freq_table; } else if (cpu_is_pxa27x()) { - cpufreq_table_validate_and_show(policy, pxa27x_freq_table); + policy->freq_table = pxa27x_freq_table; } pr_info("frequency change support initialized\n"); diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index a01275900389..7acc7fa4536d 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -108,7 +108,9 @@ static int setup_freqs_table(struct cpufreq_policy *policy, pxa3xx_freqs_num = num; pxa3xx_freqs_table = table; - return cpufreq_table_validate_and_show(policy, table); + policy->freq_table = table; + + return 0; } static void __update_core_freq(struct pxa3xx_freq_info *info)