Skip to contentSkip to conversation

acpi-cpufreq: Move modern AMD cpufreq support to acpi-cpufreq

PATCH In review Andre Przywara 3 participants 14 messages Sep 4, 2012 – Sep 17, 2012 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover acpi-cpufreq: Move modern AMD cpufreq support to acpi-cpufreq

Hi,

now the second, revised version of the patch set. I now tested loading both drivers after each other in several combinations, after two bug fixes this now works as expected.
I added a patch to move messages from powernow-k8 after the initialization phase, so it remains silent if driver loading fails.

I also rearranged the patches so that the powernow-k8 feature removal patch is now the last one and is somewhat optional. I still prefer to have it in, but it can be dropped if needed. Then powernow-k8 will still support modern AMD CPUs, but will emit a warning message.

Regards,
Andre

Changes from v1:
* added hints to Kconfig about CPU support
* merge documentation from separate patch into the feature patch
* add deprecation warning
* prefix acpi-cpufreq warning messages with module name
* bugfix: avoid boost init it driver registration failed
* bugfix: fix module redirect request call (was not reached before)

#1 lore raw

PATCH v2 1/8 acpi-cpufreq: Add support for modern AMD CPUs

From: Matthew Garrett <[email protected]>

The programming model for P-states on modern AMD CPUs is very similar to that of Intel and VIA. It makes sense to consolidate this support into one driver rather than duplicating functionality between two of them. This patch adds support for AMDs with hardware P-state control to acpi-cpufreq.

---
 arch/x86/include/asm/msr-index.h |  2 ++
 drivers/cpufreq/Kconfig.x86      |  3 ++-
 drivers/cpufreq/acpi-cpufreq.c   | 43 ++++++++++++++++++++++++++++++++++------
 3 files changed, 41 insertions(+), 7 deletions(-)
arch/x86/include/asm/msr-index.h +2 -0
index 957ec87..1e1f3eb 100644
@@ -248,6 +248,8 @@
 
 #define MSR_IA32_PERF_STATUS		0x00000198
 #define MSR_IA32_PERF_CTL		0x00000199
+#define MSR_AMD_PERF_STATUS		0xc0010063
+#define MSR_AMD_PERF_CTL		0xc0010062
 
 #define MSR_IA32_MPERF			0x000000e7
 #define MSR_IA32_APERF			0x000000e8
drivers/cpufreq/Kconfig.x86 +2 -1
index 78ff7ee..8d12e37 100644
@@ -23,7 +23,8 @@ config X86_ACPI_CPUFREQ
 	help
 	  This driver adds a CPUFreq driver which utilizes the ACPI
 	  Processor Performance States.
-	  This driver also supports Intel Enhanced Speedstep.
+	  This driver also supports Intel Enhanced Speedstep and newer
+	  AMD CPUs.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called acpi-cpufreq.
drivers/cpufreq/acpi-cpufreq.c +37 -6

102 lines not on this page · raw message

Signature · 1 line
1.7.12
#2 lore raw

PATCH v2 2/8 acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs

In reply to Andre Przywara

To workaround some Windows specific behavior, the ACPI _PSD table on AMD desktop boards advertises all cores as dependent, meaning that they all can only use the same P-state. acpi-cpufreq strictly obeys this description, instantiating one CPU only and symlinking the others. But the hardware can have distinct frequencies for each core and powernow-k8 did it that way.
So, in order to use the hardware to its full potential and keep the original powernow-k8 behavior, lets override the _PSD table setting on AMD hardware.
We use the siblings table, as it matches the current hardware behavior.

---
 drivers/cpufreq/acpi-cpufreq.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/cpufreq/acpi-cpufreq.c +10 -0
index 067a61f..70e7173 100644
@@ -51,6 +51,8 @@ MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski");
 MODULE_DESCRIPTION("ACPI Processor P-States Driver");
 MODULE_LICENSE("GPL");
 
+#define PFX "acpi-cpufreq: "
+
 enum {
 	UNDEFINED_CAPABLE = 0,
 	SYSTEM_INTEL_MSR_CAPABLE,
@@ -586,6 +588,14 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 		policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
 		cpumask_copy(policy->cpus, cpu_core_mask(cpu));
 	}
+
+	if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) {
+		cpumask_clear(policy->cpus);
+		cpumask_set_cpu(cpu, policy->cpus);
+		cpumask_copy(policy->related_cpus, cpu_sibling_mask(cpu));
+		policy->shared_type = CPUFREQ_SHARED_TYPE_HW;
+		pr_info_once(PFX "overriding BIOS provided _PSD data\n");
+	}
 #endif
 
 	/* capability check */
Signature · 1 line
1.7.12

A message that is not in the archive (sent off-list or not yet received): CACJDEmrOoZ_azqTrtfoGC-O=H0V=AHy8VExoFYYPhbUUx+7UAg@mail.gmail.com

#4 lore raw

Re: [PATCH 2/8 v2] acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs

Quoted 14 lines · Konrad Rzeszutek Wilk
Quoted 10 lines · On Sep 4, 2012 4:26 AM, "Andre Przywara" <[email protected]…

To workaround some Windows specific behavior, the ACPI _PSD table on AMD desktop boards advertises all cores as dependent, meaning that they all can only use the same P-state. acpi-cpufreq strictly obeys this description, instantiating one CPU only and symlinking the others. But the hardware can have distinct frequencies for each core and powernow-k8 did it that way.
So, in order to use the hardware to its full potential and keep the original powernow-k8 behavior, lets override the _PSD table setting on AMD hardware.

Quoted 2 lines

Can you tell on which motherboards this different freq on cores can be exposed?

Actually I think the motherboard is not the limiting factor here.
Per-core P-states are possible on AMD Family 10h and greater CPUs, so Phenoms/Barcelona and beyond. You may need an AM2+/AM3 board, though. Fam10h CPUs run in some older AM2-only boards, but the power-management capabilities may be limited here. This definitely applies to the voltage (single power plane only), but the older BIOS on these boards may limit the frequency switching also.

The actual reason for this patch is the (Fam10h) BKDG [1] recommendation in chapter 2.4.2.13.4 _PSD (P-State Dependency). There advertising only one possible P-state per package is recommended - for desktop CPUs (which are supposed to run Windows ;-) This was to overcome some nasty interaction between the Windows scheduler and their version of the ondemand governor.

Regards,
Andre.

[1] http://support.amd.com/us/Processor_TechDocs/31116.pdf

Signature · 2 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
#5 lore raw

Re: [PATCH 2/8 v2] acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs

Quoted 2 lines · Andre Przywara
Quoted 1 line · Konrad Rzeszutek Wilk

...

Quoted 2 lines

This was to overcome some nasty interaction between the Windows scheduler and their version of the ondemand governor.

Whoever is/was responsible for this, can you explain him/her that this was a bad idea and why.

Is this part of a BKDG?
Can you point to a public spec and the exact wording of the "Windows scheduler workaround" BIOS vendors shall do?

Quoted 1 line

+ pr_info_once(PFX "overriding BIOS provided _PSD data\n");

The message shows up on nearly every platform wether a _PSD function exists or not. This is wrong.

If it's _PSD info that should get ignored/overwritten, this should be done where _PSD is obtained:
processor_perflib.c

Are you sure that it will never make sense for AMD to make use of _PSD tables?
If yes, then always ignoring might be an option.

If not, this might need a more specific check, e.g.:
- Latest Windows version support called via OSI interface? Latest Windowses should/may not need this anymore?
- Check for Desktop CPUs that are affected by the bad spec?

Hm, as powernow-k8 never made use of _PSD, ignoring it for now sounds like a good thing to do. Still the ignoring should get moved to processor_perflib.c, best with a pointer or at least a comment that _PSD can be dangerous on AMD platforms. At some day _PSD may make sense for AMD platforms as well?

Thomas

#6 lore raw

PATCH v2 3/8 cpufreq: Add warning message to powernow-k8

In reply to Andre Przywara

cpufreq modules are often loaded from init scripts that assume that all recent AMD systems will use powernow-k8.
To inform the user of the change of support and ease the transition to acpi-cpufreq, emit a warning message.

---
 drivers/cpufreq/Kconfig.x86   | 3 ++-
 drivers/cpufreq/powernow-k8.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/cpufreq/Kconfig.x86 +2 -1
index 8d12e37..b36ca1f 100644
@@ -96,7 +96,8 @@ config X86_POWERNOW_K8
 	select CPU_FREQ_TABLE
 	depends on ACPI && ACPI_PROCESSOR
 	help
-	  This adds the CPUFreq driver for K8/K10 Opteron/Athlon64 processors.
+	  This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors.
+	  Support for K10 and newer processors is now in acpi-cpufreq.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called powernow-k8.
drivers/cpufreq/powernow-k8.c +3 -0
index c0e8164..16c7fb6 100644
@@ -1560,6 +1560,9 @@ static int __cpuinit powernowk8_init(void)
 	if (!x86_match_cpu(powernow_k8_ids))
 		return -ENODEV;
 
+	if (static_cpu_has(X86_FEATURE_HW_PSTATE))
+		pr_warn(PFX "support for this CPU is deprecated, use acpi-cpufreq instead.\n");
+
 	for_each_online_cpu(i) {
 		int rc;
 		smp_call_function_single(i, check_supported_cpu, &rc, 1);
Signature · 1 line
1.7.12
#7 lore raw

PATCH v2 4/8 powernow-k8: delay info messages until initialization has succeeded

In reply to Andre Przywara

powernow-k8 is quite prematurely crying Hooray and outputs diagnostic messages, although the actual initialization can still fail. Since now we may have acpi-cpufreq already loaded, we move the messages at the end of the init routine to avoid confusing output if the loading of powernow-k8 should not succeed.

---
 drivers/cpufreq/powernow-k8.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
drivers/cpufreq/powernow-k8.c +14 -10
index 16c7fb6..8ff0621 100644
@@ -1573,9 +1573,6 @@ static int __cpuinit powernowk8_init(void)
 	if (supported_cpus != num_online_cpus())
 		return -ENODEV;
 
-	printk(KERN_INFO PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
-		num_online_nodes(), boot_cpu_data.x86_model_id, supported_cpus);
-
 	if (boot_cpu_has(X86_FEATURE_CPB)) {
 
 		cpb_capable = true;
@@ -1594,16 +1591,23 @@ static int __cpuinit powernowk8_init(void)
 			struct msr *reg = per_cpu_ptr(msrs, cpu);
 			cpb_enabled |= !(!!(reg->l & BIT(25)));
 		}
-
-		printk(KERN_INFO PFX "Core Performance Boosting: %s.\n",
-			(cpb_enabled ? "on" : "off"));
 	}
 
 	rv = cpufreq_register_driver(&cpufreq_amd64_driver);
-	if (rv < 0 && boot_cpu_has(X86_FEATURE_CPB)) {
-		unregister_cpu_notifier(&cpb_nb);
-		msrs_free(msrs);
-		msrs = NULL;
+
+	if (!rv)
+		pr_info(PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
+			num_online_nodes(), boot_cpu_data.x86_model_id,
+			supported_cpus);
+
+	if (boot_cpu_has(X86_FEATURE_CPB)) {
+		if (rv < 0) {
+			unregister_cpu_notifier(&cpb_nb);
+			msrs_free(msrs);
+			msrs = NULL;
+		} else
+			pr_info(PFX "Core Performance Boosting: %s.\n",
+				(cpb_enabled ? "on" : "off"));
 	}
 	return rv;
 }
Signature · 1 line
1.7.12
#8 lore raw

PATCH v2 5/8 ACPI: Add fixups for AMD P-state figures

In reply to Andre Przywara

From: Matthew Garrett <[email protected]>

Some AMD systems may round the frequencies in ACPI tables to 100MHz boundaries. We can obtain the real frequencies from MSRs, so add a quirk to fix these frequencies up on AMD systems.

---
 arch/x86/include/asm/msr-index.h |  1 +
 drivers/acpi/processor_perflib.c | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
arch/x86/include/asm/msr-index.h +1 -0
index 1e1f3eb..fbee971 100644
@@ -248,6 +248,7 @@
 
 #define MSR_IA32_PERF_STATUS		0x00000198
 #define MSR_IA32_PERF_CTL		0x00000199
+#define MSR_AMD_PSTATE_DEF_BASE		0xc0010064
 #define MSR_AMD_PERF_STATUS		0xc0010063
 #define MSR_AMD_PERF_CTL		0xc0010062
 
drivers/acpi/processor_perflib.c +30 -0
index a093dc1..836bfe0 100644
@@ -324,6 +324,34 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
 	return result;
 }
 
+#ifdef CONFIG_X86
+/*
+ * Some AMDs have 50MHz frequency multiples, but only provide 100MHz rounding
+ * in their ACPI data. Calculate the real values and fix up the _PSS data.
+ */
+static void amd_fixup_frequency(struct acpi_processor_px *px, int i)
+{
+	u32 hi, lo, fid, did;
+	int index = px->control & 0x00000007;
+
+	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+		return;
+
+	if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10)
+	    || boot_cpu_data.x86 == 0x11) {
+		rdmsr(MSR_AMD_PSTATE_DEF_BASE + index, lo, hi);
+		fid = lo & 0x3f;
+		did = (lo >> 6) & 7;
+		if (boot_cpu_data.x86 == 0x10)
+			px->core_frequency = (100 * (fid + 0x10)) >> did;
+		else
+			px->core_frequency = (100 * (fid + 8)) >> did;
+	}
+}
+#else
+static void amd_fixup_frequency(struct acpi_processor_px *px, int i) {};
+#endif
+
 static int acpi_processor_get_performance_states(struct acpi_processor *pr)
 {
 	int result = 0;
@@ -379,6 +407,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
 			goto end;
 		}
 
+		amd_fixup_frequency(px, i);
+
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "State [%d]: core_frequency[%d] power[%d] transition_latency[%d] bus_master_latency[%d] control[0x%x] status[0x%x]\n",
 				  i,
Signature · 1 line
1.7.12
#9 lore raw

PATCH v2 6/8 acpi-cpufreq: Add support for disabling dynamic overclocking

In reply to Andre Przywara

One feature present in powernow-k8 that isn't present in acpi-cpufreq is support for enabling or disabling AMD's core performance boost technology. This patch adds support to acpi-cpufreq, but also includes support for Intel's dynamic acceleration.

The original boost disabling sysfs file was per CPU, but acted globally. Also the naming (cpb) was at least not intuitive. So lets introduce a single file simply called "boost", which sits once in /sys/devices/system/cpu/cpufreq.
This should be the only way of using this feature, so add documentation about the rationale and the usage.

A following patch will re-introduce the cpb knob for compatibility reasons on AMD CPUs.

Per-CPU boost switching is possible, but not trivial and is thus postponed to a later patch series.

---
 Documentation/ABI/testing/sysfs-devices-system-cpu |  11 ++
 Documentation/cpu-freq/boost.txt                   |  93 +++++++++++
 drivers/cpufreq/acpi-cpufreq.c                     | 177 +++++++++++++++++++++
 3 files changed, 281 insertions(+)
 create mode 100644 Documentation/cpu-freq/boost.txt
Documentation/ABI/testing/sysfs-devices-system-cpu +11 -0
index 5dab364..6943133 100644
@@ -176,3 +176,14 @@ Description:	Disable L3 cache indices
 		All AMD processors with L3 caches provide this functionality.
 		For details, see BKDGs at
 		http://developer.amd.com/documentation/guides/Pages/default.aspx
+
+
+What:		/sys/devices/system/cpu/cpufreq/boost
+Date:		August 2012
+Contact:	Linux kernel mailing list <[email protected]>
+Description:	Processor frequency boosting control
+
+		This switch controls the boost setting for the whole system.
+		Boosting allows the CPU and the firmware to run at a frequency
+		beyound it's nominal limit.
+		More details can be found in Documentation/cpu-freq/boost.txt
Documentation/cpu-freq/boost.txt new file +93 -0

93 lines not on this page · raw message

drivers/cpufreq/acpi-cpufreq.c +177 -0

213 lines not on this page · raw message

Signature · 1 line
1.7.12
#10 lore raw

PATCH v2 7/8 acpi-cpufreq: Add compatibility for legacy AMD cpb sysfs knob

In reply to Andre Przywara

The powernow-k8 driver supported a sysfs knob called "cpb", which was instantiated per CPU, but actually acted globally for the whole system. To keep some compatibility with this feature, we re-introduce this behavior here, but:
a) only enable it on AMD CPUs and
b) protect it with a Kconfig switch

I'd like to consider this feature obsolete. Lets keep it around for some kernel versions and then phase it out.

---
 drivers/cpufreq/Kconfig.x86    | 12 +++++++++++
 drivers/cpufreq/acpi-cpufreq.c | 46 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 56 insertions(+), 2 deletions(-)
drivers/cpufreq/Kconfig.x86 +12 -0
index b36ca1f..934854a 100644
@@ -33,6 +33,18 @@ config X86_ACPI_CPUFREQ
 
 	  If in doubt, say N.
 
+config X86_ACPI_CPUFREQ_CPB
+	default y
+	bool "Legacy cpb sysfs knob support for AMD CPUs"
+	depends on X86_ACPI_CPUFREQ && CPU_SUP_AMD
+	help
+	  The powernow-k8 driver used to provide a sysfs knob called "cpb"
+	  to disable the Core Performance Boosting feature of AMD CPUs. This
+	  file has now been superseeded by the more generic "boost" entry.
+
+	  By enabling this option the acpi_cpufreq driver provides the old
+	  entry in addition to the new boost ones, for compatibility reasons.
+
 config ELAN_CPUFREQ
 	tristate "AMD Elan SC400 and SC410"
 	select CPU_FREQ_TABLE
drivers/cpufreq/acpi-cpufreq.c +44 -2

76 lines not on this page · raw message

Signature · 1 line
1.7.12
#11 lore raw

PATCH v2 8/8 cpufreq: Remove support for hardware P-state chips from powernow-k8

In reply to Andre Przywara

From: Matthew Garrett <[email protected]>

These chips are now supported by acpi-cpufreq, so we can delete all the code handling them.

Andre: Tighten the deprecation warning message. Trigger load of acpi-cpufreq and let the load of the module finally fail. This avoids the problem of users ending up without any cpufreq support after the transition.

---
 drivers/cpufreq/Makefile      |   2 +-
 drivers/cpufreq/powernow-k8.c | 392 +++---------------------------------------
 drivers/cpufreq/powernow-k8.h |  32 ----
 3 files changed, 29 insertions(+), 397 deletions(-)
drivers/cpufreq/Makefile +1 -1
index 9531fc2..b99790f 100644
@@ -19,7 +19,7 @@ obj-$(CONFIG_CPU_FREQ_TABLE)		+= freq_table.o
 # K8 systems. ACPI is preferred to all other hardware-specific drivers.
 # speedstep-* is preferred over p4-clockmod.
 
-obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o mperf.o
+obj-$(CONFIG_X86_POWERNOW_K8)		+= powernow-k8.o
 obj-$(CONFIG_X86_ACPI_CPUFREQ)		+= acpi-cpufreq.o mperf.o
 obj-$(CONFIG_X86_PCC_CPUFREQ)		+= pcc-cpufreq.o
 obj-$(CONFIG_X86_POWERNOW_K6)		+= powernow-k6.o
drivers/cpufreq/powernow-k8.c +28 -364

586 lines not on this page · raw message

drivers/cpufreq/powernow-k8.h +0 -32
index 3744d26..79329d4 100644
@@ -5,24 +5,11 @@
  *  http://www.gnu.org/licenses/gpl.html
  */
 
-enum pstate {
-	HW_PSTATE_INVALID = 0xff,
-	HW_PSTATE_0 = 0,
-	HW_PSTATE_1 = 1,
-	HW_PSTATE_2 = 2,
-	HW_PSTATE_3 = 3,
-	HW_PSTATE_4 = 4,
-	HW_PSTATE_5 = 5,
-	HW_PSTATE_6 = 6,
-	HW_PSTATE_7 = 7,
-};
-
 struct powernow_k8_data {
 	unsigned int cpu;
 
 	u32 numps;  /* number of p-states */
 	u32 batps;  /* number of p-states supported on battery */
-	u32 max_hw_pstate; /* maximum legal hardware pstate */
 
 	/* these values are constant when the PSB is used to determine
 	 * vid/fid pairings, but are modified during the ->target() call
@@ -37,7 +24,6 @@ struct powernow_k8_data {
 	/* keep track of the current fid / vid or pstate */
 	u32 currvid;
 	u32 currfid;
-	enum pstate currpstate;
 
 	/* the powernow_table includes all frequency and vid/fid pairings:
 	 * fid are the lower 8 bits of the index, vid are the upper 8 bits.
@@ -97,23 +83,6 @@ struct powernow_k8_data {
 #define MSR_S_HI_CURRENT_VID      0x0000003f
 #define MSR_C_HI_STP_GNT_BENIGN	  0x00000001
 
-
-/* Hardware Pstate _PSS and MSR definitions */
-#define USE_HW_PSTATE		0x00000080
-#define HW_PSTATE_MASK 		0x00000007
-#define HW_PSTATE_VALID_MASK 	0x80000000
-#define HW_PSTATE_MAX_MASK	0x000000f0
-#define HW_PSTATE_MAX_SHIFT	4
-#define MSR_PSTATE_DEF_BASE 	0xc0010064 /* base of Pstate MSRs */
-#define MSR_PSTATE_STATUS 	0xc0010063 /* Pstate Status MSR */
-#define MSR_PSTATE_CTRL 	0xc0010062 /* Pstate control MSR */
-#define MSR_PSTATE_CUR_LIMIT	0xc0010061 /* pstate current limit MSR */
-
-/* define the two driver architectures */
-#define CPU_OPTERON 0
-#define CPU_HW_PSTATE 1
-
-
 /*
  * There are restrictions frequencies have to follow:
  * - only 1 entry in the low fid table ( <=1.4GHz )
@@ -218,5 +187,4 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid);
 
 static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index);
 
-static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table);
 static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table);
Signature · 1 line
1.7.12
#12 lore raw
In reply to Andre Przywara
Quoted 16 lines · Andre Przywara

Hi,

now the second, revised version of the patch set. I now tested loading both drivers after each other in several combinations, after two bug fixes this now works as expected.
I added a patch to move messages from powernow-k8 after the initialization phase, so it remains silent if driver loading fails.

I also rearranged the patches so that the powernow-k8 feature removal patch is now the last one and is somewhat optional. I still prefer to have it in, but it can be dropped if needed. Then powernow-k8 will still support modern AMD CPUs, but will emit a warning message.

Regards,
Andre

Quoted 7 lines

Changes from v1:
* added hints to Kconfig about CPU support
* merge documentation from separate patch into the feature patch
* add deprecation warning
* prefix acpi-cpufreq warning messages with module name
* bugfix: avoid boost init it driver registration failed
* bugfix: fix module redirect request call (was not reached before)

I have applied the whole series to the linux-next branch of the linux-pm.git tree, but I'm quite unsure about [7/8]. Is it really necessary? I mean, since we want users to switch to a different driver anyway, which already has a knob providing the functionality in question, what's the point really?

Rafael

#13 lore raw
Quoted 25 lines · Rafael J. Wysocki
Quoted 16 lines · Andre Przywara

Hi,

now the second, revised version of the patch set. I now tested loading both drivers after each other in several combinations, after two bug fixes this now works as expected.
I added a patch to move messages from powernow-k8 after the initialization phase, so it remains silent if driver loading fails.

I also rearranged the patches so that the powernow-k8 feature removal patch is now the last one and is somewhat optional. I still prefer to have it in, but it can be dropped if needed. Then powernow-k8 will still support modern AMD CPUs, but will emit a warning message.

Regards,
Andre

Quoted 7 lines

Changes from v1:
* added hints to Kconfig about CPU support
* merge documentation from separate patch into the feature patch
* add deprecation warning
* prefix acpi-cpufreq warning messages with module name
* bugfix: avoid boost init it driver registration failed
* bugfix: fix module redirect request call (was not reached before)

Quoted 4 lines

I have applied the whole series to the linux-next branch of the linux-pm.git tree, but I'm quite unsure about [7/8]. Is it really necessary? I mean, since we want users to switch to a different driver anyway, which already has a knob providing the functionality in question, what's the point really?

Afaik this was mostly for compiler people or other developers doing benchmarks to be able to avoid fluctating numbers caused by turbo/boost mode.

I don't know whether it's used by any userspace tool. If, it would certainly be an AMD specific tool for developers. If you (AMD) know a userspace tool out there it may make sense to keep it the one or other kernel round, otherwise I guess it can simply be deleted.

I will add the functionality (to enable/disable turbo/boost mode) to cpupower userspace tool as soon as this is in. Shouldn't be much more than a -t option and a
one liner to read out or set another cpufreq sysfs file.

Thomas

#14 lore raw
Quoted 6 lines · Thomas Renninger
Quoted 5 lines · Rafael J. Wysocki
Quoted 2 lines · Andre Przywara

Hi,

I have applied the whole series to the linux-next branch of the linux-pm.git

Thanks!

Quoted 9 lines
Quoted 3 lines

tree, but I'm quite unsure about [7/8]. Is it really necessary? I mean, since we want users to switch to a different driver anyway, which already has a knob providing the functionality in question, what's the point really?

Afaik this was mostly for compiler people or other developers doing benchmarks to be able to avoid fluctating numbers caused by turbo/boost mode.

I don't know whether it's used by any userspace tool.

Well, at least we use it here in quite some scripts, both for testing and for benchmarking.
As this has been in for 2.5 year by now, I'd like to keep it for one or two more major releases and then remove it.

Quoted 9 lines

If, it would certainly
be an AMD specific tool for developers. If you (AMD) know a userspace tool out there it may make sense to keep it the one or other kernel round, otherwise I guess it can simply be deleted.

I will add the functionality (to enable/disable turbo/boost mode) to cpupower userspace tool as soon as this is in. Shouldn't be much more than a -t option and a
one liner to read out or set another cpufreq sysfs file.

Thanks, that would be nice.

Regards,
Andre.

Signature · 2 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany