From patchwork Mon Mar 27 22:04:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9647683 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 27245602C8 for ; Mon, 27 Mar 2017 22:47:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 195B22836D for ; Mon, 27 Mar 2017 22:47:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D35128364; Mon, 27 Mar 2017 22:47:13 +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=-6.9 required=2.0 tests=BAYES_00,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 8EC2F200DF for ; Mon, 27 Mar 2017 22:47:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbdC0WqB (ORCPT ); Mon, 27 Mar 2017 18:46:01 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:50763 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbdC0Wno (ORCPT ); Mon, 27 Mar 2017 18:43:44 -0400 Received: from adkt166.ipv4.supernova.orange.pl (79.184.253.166) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id ef392ac9d6b3c1dc; Tue, 28 Mar 2017 00:37:07 +0200 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Srinivas Pandruvada , Doug Smythies Subject: [PATCH 02/16] cpufreq: intel_pstate: Drop pointless initialization of PID parameters Date: Tue, 28 Mar 2017 00:04:30 +0200 Message-ID: <13687383.3o6irlutMi@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.10.0+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <6409323.DYHvh3CYlO@aspire.rjw.lan> References: <6409323.DYHvh3CYlO@aspire.rjw.lan> MIME-Version: 1.0 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 From: Rafael J. Wysocki The P-state selection algorithm used by intel_pstate for Atom processors is not based on the PID controller and the initialization of PID parametrs for those processors is pointless and confusing, so drop it. Signed-off-by: Rafael J. Wysocki --- drivers/cpufreq/intel_pstate.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) Index: linux-pm/drivers/cpufreq/intel_pstate.c =================================================================== --- linux-pm.orig/drivers/cpufreq/intel_pstate.c +++ linux-pm/drivers/cpufreq/intel_pstate.c @@ -1540,14 +1540,6 @@ static struct cpu_defaults core_params = }; static const struct cpu_defaults silvermont_params = { - .pid_policy = { - .sample_rate_ms = 10, - .deadband = 0, - .setpoint = 60, - .p_gain_pct = 14, - .d_gain_pct = 0, - .i_gain_pct = 4, - }, .funcs = { .get_max = atom_get_max_pstate, .get_max_physical = atom_get_max_pstate, @@ -1561,14 +1553,6 @@ static const struct cpu_defaults silverm }; static const struct cpu_defaults airmont_params = { - .pid_policy = { - .sample_rate_ms = 10, - .deadband = 0, - .setpoint = 60, - .p_gain_pct = 14, - .d_gain_pct = 0, - .i_gain_pct = 4, - }, .funcs = { .get_max = atom_get_max_pstate, .get_max_physical = atom_get_max_pstate, @@ -1602,14 +1586,6 @@ static const struct cpu_defaults knl_par }; static const struct cpu_defaults bxt_params = { - .pid_policy = { - .sample_rate_ms = 10, - .deadband = 0, - .setpoint = 60, - .p_gain_pct = 14, - .d_gain_pct = 0, - .i_gain_pct = 4, - }, .funcs = { .get_max = core_get_max_pstate, .get_max_physical = core_get_max_pstate_physical, @@ -2637,9 +2613,9 @@ static int __init intel_pstate_init(void return -ENODEV; cpu_def = (struct cpu_defaults *)id->driver_data; - - copy_pid_params(&cpu_def->pid_policy); copy_cpu_funcs(&cpu_def->funcs); + if (pstate_funcs.get_target_pstate == get_target_pstate_use_performance) + copy_pid_params(&cpu_def->pid_policy); } if (intel_pstate_msrs_not_valid())