From patchwork Mon Feb 26 05:09:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241283 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5840360208 for ; Mon, 26 Feb 2018 05:10:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A18F292DF for ; Mon, 26 Feb 2018 05:10:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EDEA297C3; Mon, 26 Feb 2018 05:10:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D53AD292DF for ; Mon, 26 Feb 2018 05:10:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751153AbeBZFKh (ORCPT ); Mon, 26 Feb 2018 00:10:37 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:44404 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeBZFKg (ORCPT ); Mon, 26 Feb 2018 00:10:36 -0500 Received: by mail-pf0-f194.google.com with SMTP id 17so6072475pfw.11 for ; Sun, 25 Feb 2018 21:10:36 -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=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=cjjFkl4kAKINHLaW1C1nsMyX9/v0Fll/Ntinc6L8p8U8yJfXGc/WiItcYgswwbq8yO kawZUYB2z77CEBIzLVA5arj7Zr/wD5uDofV5WmXSKsX8GrElSGPst+bLuGOPp0qBF0yY 7mUYeyKl8cSktCijaxZNtq9pwQF21C0rb5D24= 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=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=m4IqVijkYJ65ZepxnduSogz5lPf/JTHANhxl4JnyZKSuyhPxiAYG5udBIHuDPJOVM7 2ediDDMia9YwbWcuf38wfGqt6IOkzIXEbR5thmaqSUxR2VAQIYETKlo0x1e+ly4PKRac rVHGrqtEG/gyjG9EHmAIqQsPWkH7VvQtYTP+p1EgUdBgwVZnmTxTtnZwgXuYW71xy9RI pCqY6FHD2zbG4dmDJSdcjXAeLClXXCA8T5Hze33DqH+aessTM+8e4rth8wopgA8jpnLL WtqlilsQVA/UJeWOUIABHp/ug2Li0EHguvx12vudVAI4UVjjDXGFnzSX/tqH9r0C6sU3 dWJA== X-Gm-Message-State: APf1xPDhwcFE+MVEUXr9S3qYD+h1x4Kq2PYRsncMCx4lb49hlhaBRHnu eRVNOceiWjFziRnu/r0YTBkIWhzo5mE= X-Google-Smtp-Source: AH8x224rOZJo1vaWyvOWsdgq+o6TBaqxEPhJSdAt3YrJDRHFVXKHCMEOf4RwU6iesokyvxNdTk7ibw== X-Received: by 10.98.217.211 with SMTP id b80mr9512218pfl.107.1519621836301; Sun, 25 Feb 2018 21:10:36 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id u22sm13006292pgv.77.2018.02.25.21.10.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:35 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 25/27] cpufreq: speedstep: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:08 +0530 Message-Id: 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 X-Virus-Scanned: ClamAV using ClamSMTP 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 speedstep driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/speedstep-centrino.c | 4 ++-- drivers/cpufreq/speedstep-ich.c | 4 +++- drivers/cpufreq/speedstep-smi.c | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 4fa5adf16c70..a1fb735685db 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c @@ -394,9 +394,9 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ + policy->freq_table = per_cpu(centrino_model, policy->cpu)->op_points; - return cpufreq_table_validate_and_show(policy, - per_cpu(centrino_model, policy->cpu)->op_points); + return 0; } static int centrino_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 0412a246a785..fbbcb88db061 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -304,7 +304,9 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) if (gf.ret) return gf.ret; - return cpufreq_table_validate_and_show(policy, speedstep_freqs); + policy->freq_table = speedstep_freqs; + + return 0; } diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index d23f24ccff38..01fe70dae20b 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c @@ -266,7 +266,9 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) pr_debug("workaround worked.\n"); } - return cpufreq_table_validate_and_show(policy, speedstep_freqs); + policy->freq_table = speedstep_freqs; + + return 0; } static unsigned int speedstep_get(unsigned int cpu)