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: 129551 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230872lja; Sun, 25 Feb 2018 21:10:38 -0800 (PST) X-Google-Smtp-Source: AH8x224Mb7ZSzwQKxJhb9zF5ywBdLjsLEp+QTtYH7pjxVBwhwfOwNKER1ApNK2eIKYyANxmk2H66 X-Received: by 10.99.149.4 with SMTP id p4mr7722798pgd.0.1519621838094; Sun, 25 Feb 2018 21:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621838; cv=none; d=google.com; s=arc-20160816; b=SUVKLuioijpj27D2eUEHQXahxqbCxeOcU2+Be2yKv92ML0xCkSe04eeREwgTC43uTq T22GR0m0btmKpWRuzuV9iYTYaE/Y2C2//L/TOIaCPM4RN5CWOBHAjSchovTSNgkcrdUn Z40AXaFmUx2A5qxlC8Wy7mEG70hEqjjnGS5PA3bND5B0lOeLfac9T6ImwOLH5PoFx789 QCUcbN5I2sPFr3b3P8OUL9QL0BDrdpneYq7I8/tcf9F+JlTbbELig7iMs5bu1joKeuCw U160cpovRNrc49C+1Z+/6UgTqJOR1cty8B0pPCUuCr+HEJ6apKLV+jmNWXtxCwdI1u+4 5b+A== 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=++81G+C/swZ1iLGYfIWgp6mx8Hlv5soC5jAS7wstKok=; b=gRnDb4+z8QNsKfjgnTqJzA9i4R1V4ibcJZQLV1ubghkIVzFfle+od6Ak+NS00oSOVJ cnrhLmWDQGChCf4xd2qLWm3JZwTBzNqrhdEQu+13qLYisP2QIUHEv9UrBTBv96gEwWJV yjHmEAIixdFrSYHLUdGAp6Hx/Rws7btnk2vGCx9jJ1he6QBYD/iMuo2alb8ySBr5uIHN QgV6BeAcogPXofFvMaidHEnK1Hxa01niIegLfNjBA9cMQW3KXgapbvodSVw+XxGHGr9p x/wX8vTn8ybXLylUEeFjiK3UODUJTnQvtkeKNY8DirD7EEoeyaPPuMkBiGHYBaaWUL1O Frtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjjFkl4k; 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.37; Sun, 25 Feb 2018 21:10:38 -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=cjjFkl4k; 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 S1751153AbeBZFKh (ORCPT + 11 others); 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-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 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(-) -- 2.15.0.194.g9af6a3dea062 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)