From patchwork Tue Feb 28 21:44:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 9597001 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 5F29460429 for ; Tue, 28 Feb 2017 21:47:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48C872842B for ; Tue, 28 Feb 2017 21:47:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D92C2858B; Tue, 28 Feb 2017 21:47:15 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 185422842B for ; Tue, 28 Feb 2017 21:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbdB1VrN (ORCPT ); Tue, 28 Feb 2017 16:47:13 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34413 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbdB1VrM (ORCPT ); Tue, 28 Feb 2017 16:47:12 -0500 Received: by mail-qk0-f193.google.com with SMTP id s186so6095937qkb.1; Tue, 28 Feb 2017 13:44:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:reply-to:organization; bh=FFatWqdkOXvwbOJESmkCNKb8EzNExBHjGZtJa33dpMA=; b=cFQZ38IJtdm+yXf443K7aDd75lRow92CFCiakjcqb0JD1yLXpKPQU9PR50bxk5bI3e KXNlXTAt+TTRoUX7Suayf+gtpJ0n9rDjeNNuNxMDq6JSNZ8kDkHqAU/v2GdENdH4qjiR GDSRae5NKUSOqidlx27+Bdq9/Al31CIs47kiNaBx91Be/Fc+PsGQujKVXDZ+boqbZay0 RQXgJZM2h4b9zC38+shCSHe4cIR9xmbZS/ishfFKSaeKDhSLDk7EKsylxoCR8WFPLM+P m+i4YyEumkTwaA27RmmtNnn9nHVnjyzrTIWi/OuxsSUe8CVh7sxKV6ub/Cpj4LJULHHd 7QRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to:organization; bh=FFatWqdkOXvwbOJESmkCNKb8EzNExBHjGZtJa33dpMA=; b=oU4/ZLLaBdoFosmvilC3tok1eJVmuPOZPtkvctCT1JtwqzKoaSQsc6blC30Eolnxai ZAQ1V+EnmzTsOJsMyQhy33fTE3lSgIoi3N/P4p0YGCMtfIHA+co8Hr0ClhBrpOhzQuKj pBwf4Nu8a/SV7Q6WjzekhdV8OcCqJPDeAD9bP0rgTglmLyh8v2HLi14JCoRoKYNOj/zy qLayUODede7ll/YvPynWfZDtRYxCwASmBwJH56RDyvz/k1RPg3xK1pd9bJoNLuhMOjuC 2Qb+SbO8DZRHImSW8WfC+HvdG0yfh4xAQ/hJrmKJM5JeO6vwhodESJWhxfy3BEj5bATJ xuCw== X-Gm-Message-State: AMke39kw4lQoIgUCb0iLDdwhzN+dhkC2LgkuiogRRB7pXb/jRN8cfnzI+JbsisYEe1rKqg== X-Received: by 10.55.127.4 with SMTP id a4mr5721242qkd.215.1488318287264; Tue, 28 Feb 2017 13:44:47 -0800 (PST) Received: from z87.localdomain (pool-96-230-116-151.bstnma.fios.verizon.net. [96.230.116.151]) by smtp.gmail.com with ESMTPSA id a26sm1832357qtb.28.2017.02.28.13.44.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Feb 2017 13:44:46 -0800 (PST) From: Len Brown To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH] cpufreq: Add the "cpufreq.off=1" cmdline option Date: Tue, 28 Feb 2017 16:44:16 -0500 Message-Id: <5fd2c737538635f032e8cfa115c802145f0a9911.1488318151.git.len.brown@intel.com> X-Mailer: git-send-email 2.11.0.161.g6610af872 Reply-To: Len Brown Organization: Intel Open Source Technology Center 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: Len Brown Add the "cpufreq.off=1" cmdline option. At boot-time, this allows a user to request CONFIG_CPU_FREQ=n behavior from a kernel built with CONFIG_CPU_FREQ=y. This is analogous to the existing "cpuidle.off=1" option and CONFIG_CPU_IDLE=y This capability is valuable when we need to debug end-user issues in the BIOS or in Linux. It is also convenient for enabling comparisons, which may otherwise require a new kernel, or help from BIOS SETUP, which may be buggy or unavailable. Signed-off-by: Len Brown --- Documentation/admin-guide/kernel-parameters.txt | 3 +++ drivers/cpufreq/cpufreq.c | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index be7c0d9506b1..3988d2311f97 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -662,6 +662,9 @@ cpuidle.off=1 [CPU_IDLE] disable the cpuidle sub-system + cpufreq.off=1 [CPU_FREQ] + disable the cpufreq sub-system + cpu_init_udelay=N [X86] Delay for N microsec between assert and de-assert of APIC INIT to start processors. This delay occurs diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index cc475eff90b3..1c90782e3e11 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2543,4 +2543,5 @@ static int __init cpufreq_core_init(void) return 0; } +module_param(off, int, 0444); core_initcall(cpufreq_core_init);