mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg@redhat.com>
To: cpufreq@vger.kernel.org
Cc: davej@redhat.com, linux-kernel@vger.kernel.org,
	borislav.petkov@amd.com, mark.langsdorf@amd.com,
	andreas.herrmann3@amd.com, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH v4 7/7] cpufreq: Add boost alias to cpb
Date: Mon, 18 Jul 2011 12:37:42 -0400	[thread overview]
Message-ID: <1311007062-2050-8-git-send-email-mjg@redhat.com> (raw)
In-Reply-To: <1311007062-2050-1-git-send-email-mjg@redhat.com>

cpb is AMD's name for the dynamic overclocking present in their chips.
Intel provide similar functionality, so add "boost" as an alias. In the
long run we can then transition to using that rather than cpb.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 Documentation/cpu-freq/user-guide.txt |    5 +++++
 drivers/cpufreq/acpi-cpufreq.c        |    8 +++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt
index 04f6b32..a692d3f 100644
--- a/Documentation/cpu-freq/user-guide.txt
+++ b/Documentation/cpu-freq/user-guide.txt
@@ -214,6 +214,11 @@ bios_limit :			If the BIOS tells the OS to limit a CPU to
 				which can be detected through the generic
 				thermal driver.
 
+boost:				Some CPUs support clocking themselves to above
+				their rated frequency depending on temperature
+				and power constraints. This file allows this
+				to be enabled or disabled.
+
 If you have selected the "userspace" governor which allows you to
 set the CPU operating frequency to a specific value, you can read out
 the current frequency in
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 0a92277..30c66cc 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -172,11 +172,8 @@ static ssize_t show_cpb(struct cpufreq_policy *policy, char *buf)
 	return sprintf(buf, "%u\n", cpb_state(cpu));
 }
 
-#define define_one_rw(_name) \
-static struct freq_attr _name = \
-	__ATTR(_name, 0644, show_##_name, store_##_name)
-
-define_one_rw(cpb);
+static struct freq_attr cpb = __ATTR(cpb, 0644, show_cpb, store_cpb);
+static struct freq_attr boost = __ATTR(boost, 0644, show_cpb, store_cpb);
 
 static int check_est_cpu(unsigned int cpuid)
 {
@@ -933,6 +930,7 @@ static int acpi_cpufreq_resume(struct cpufreq_policy *policy)
 static struct freq_attr *acpi_cpufreq_attr[] = {
 	&cpufreq_freq_attr_scaling_available_freqs,
 	&cpb,
+	&boost,
 	NULL,
 };
 
-- 
1.7.6


      parent reply	other threads:[~2011-07-18 16:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 16:37 [PATCH v4] Move modern AMD cpufreq support to acpi-cpufreq Matthew Garrett
2011-07-18 16:37 ` [PATCH v4 1/7] x86: Add AMD HW_PSTATE cpu feature bit and MSRs Matthew Garrett
2011-07-18 16:37 ` [PATCH v4 2/7] acpi-cpufreq: Add support for modern AMD CPUs Matthew Garrett
2011-07-18 16:37 ` [PATCH v4 3/7] acpi-cpufreq: Add support for disabling dynamic overclocking Matthew Garrett
2011-07-22 14:41   ` Borislav Petkov
2011-07-22 14:49     ` Matthew Garrett
2011-07-24  3:06   ` Andy Lutomirski
2011-07-24  3:28     ` Matthew Garrett
2011-07-24  3:15   ` Andy Lutomirski
2011-07-24  3:33     ` Matthew Garrett
2011-07-24  3:42       ` Andrew Lutomirski
2011-07-24  3:49         ` Matthew Garrett
2011-07-24  9:36           ` Borislav Petkov
2011-07-18 16:37 ` [PATCH v4 4/7] ACPI: Add fixups for AMD P-state figures Matthew Garrett
2011-07-18 16:37 ` [PATCH v4 5/7] cpufreq: Add compatibility hack to powernow-k8 Matthew Garrett
2011-07-18 16:37 ` [PATCH v4 6/7] cpufreq: Remove support for hardware P-state chips from powernow-k8 Matthew Garrett
2011-07-22 14:43   ` Borislav Petkov
2011-07-18 16:37 ` Matthew Garrett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311007062-2050-8-git-send-email-mjg@redhat.com \
    --to=mjg@redhat.com \
    --cc=andreas.herrmann3@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome