Dominik Brodowski | 2 Oct 2003 17:47
Picon

[PATCH] remove invalid setting in powernow-k8

The Powernow-K8 cpufreq driver does not yet depend on CPUFreq 
Frequency Table support - but work is going on in this direction.
Nevertheless, remove this dependency, but mark this driver as being 
"experimental".

Also, fix up the invalid usage of pol->policy in drv_init() and mark it
with a warning in drv_verify()

 arch/i386/kernel/cpu/cpufreq/Kconfig       |    2 +-
 arch/i386/kernel/cpu/cpufreq/powernow-k8.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/Kconfig linux/arch/i386/kernel/cpu/cpufreq/Kconfig
--- linux-original/arch/i386/kernel/cpu/cpufreq/Kconfig	2003-10-02 17:36:39.255184952 +0200
+++ linux/arch/i386/kernel/cpu/cpufreq/Kconfig	2003-10-02 17:40:41.915295008 +0200
 <at>  <at>  -90,7 +90,7  <at>  <at> 

 config X86_POWERNOW_K8
 	tristate "AMD Opteron/Athlon64 PowerNow!"
-	depends on CPU_FREQ_TABLE
+	depends on CPU_FREQ && EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors.

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2003-10-02 17:36:39.256184800 +0200
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2003-10-02 17:40:19.927637640 +0200
 <at>  <at>  -935,6 +935,7  <at>  <at> 
 		return -ENODEV;
 	}
(Continue reading)

Dominik Brodowski | 3 Oct 2003 19:29
Picon

Re: Fw: Re: [OOPS] [2.6.0-test5-bk8] cpufreq and sysfs problem...

Thanks for noticing this. Attached patch [for 2.6.0-test6-bk] should fix it.

	Dominik

diff -ruN linux-original/drivers/cpufreq/cpufreq.c linux/drivers/cpufreq/cpufreq.c
--- linux-original/drivers/cpufreq/cpufreq.c	2003-10-02 17:36:42.000000000 +0200
+++ linux/drivers/cpufreq/cpufreq.c	2003-10-03 19:09:45.336175240 +0200
 <at>  <at>  -449,6 +449,9  <at>  <at> 
 	if (!kobject_get(&data->kobj))
 		return -EFAULT;

+	if (cpufreq_driver->target)
+		__cpufreq_governor(data, CPUFREQ_GOV_STOP);
+
 	kobject_unregister(&data->kobj);

 	kobject_put(&data->kobj);
 <at>  <at>  -459,9 +462,6  <at>  <at> 
 	 */
 	wait_for_completion(&data->kobj_unregister);

-	if (cpufreq_driver->target)
-		__cpufreq_governor(data, CPUFREQ_GOV_STOP);
-
 	if (cpufreq_driver->exit)
 		cpufreq_driver->exit(data);
Dominik Brodowski | 4 Oct 2003 00:36
Picon

[RFC] split up cpufreq.c in several files, x86 autoloader

I've a patch ready which splits up drivers/cpufreq/cpufreq.c into several
files. Instead of

-rw-r--r--    1 linux    users       26014 2003-10-03 23:31 cpufreq.c

it's this:

-rw-r--r--    1 linux    users       11625 2003-10-04 00:17 cpufreq_core.c
	driver and device {un}registration. Can be split up further if
	there's need to do so

-rw-r--r--    1 linux    users        2832 2003-10-04 00:10 cpufreq_governor.c
	cpufreq_governor and friends, and governor {un}registration

-rw-r--r--    1 linux    users        1221 2003-10-04 00:19 cpufreq.h
	prototypes for shared variables and functions

-rw-r--r--    1 linux    users        4913 2003-10-04 00:13 cpufreq_notifiers.c
	cpufreq notifier lists

-rw-r--r--    1 linux    users        7576 2003-10-04 00:14 cpufreq_sysfs.c
	cpufreq sysfs and kobject handling

What's the general opinion about such a split-up?

And what does the public think about this:
Except for a small part [cpufreq_notifiers.c] the rest of the cpufreq core
could be built as a module. drivers/acpi/processor.ko would depend on it,
though [until my ACPI patches are accepted, at least], and it couldn't be
available for a certain ARM architecture IIRC. For x86, it'd make life,
(Continue reading)

AthlonRob | 4 Oct 2003 01:23

Re: [RFC] split up cpufreq.c in several files, x86 autoloader

On Fri, 2003-10-03 at 15:36, Dominik Brodowski wrote:

> For x86 there is a wide choice of cpufreq drivers. Especially for
> distributions and inexperienced users [no pun intended] it might become more
> and more difficult to select the best driver: "I got a mobile Pentium-4-M,
> p4-clockmod or speedstep-ich?" is one good example. Should the detection of
> the "best" cpufreq driver be made available as an optional(!)
> "cpufreq-autoload" module in arch/i386/kernel/cpu/cpufreq/?

I like that idea, as well as the module idea.

I would be sure and take in to account, however, Dell laptops not
wanting to work with some (all?) drivers in this autoload section.

Rob
Pavel Machek | 5 Oct 2003 22:23
Picon

Kconfig help fixes

Hi!

This seems to be needed...
							Pavel

Index: drivers/cpufreq/Kconfig
===================================================================
RCS file: /home/pavel/sf/bitbucket/bkcvs/linux-2.5/drivers/cpufreq/Kconfig,v
retrieving revision 1.4
diff -u -r1.4 Kconfig
--- drivers/cpufreq/Kconfig	5 Sep 2003 19:15:37 -0000	1.4
+++ drivers/cpufreq/Kconfig	5 Oct 2003 20:09:21 -0000
 <at>  <at>  -6,7 +6,7  <at>  <at> 
 	  CPUFreq. Please note that it is recommended to use the sysfs
 	  interface instead (which is built automatically). 
 	  
-	  For details, take a look at linux/Documentation/cpufreq. 
+	  For details, take a look at linux/Documentation/cpu-freq. 
 	  
 	  If in doubt, say N.

 <at>  <at>  -64,7 +64,7  <at>  <at> 
           be able to set the CPU dynamically, like on LART 
 	  ( http://www.lart.tudelft.nl/ )

-	  For details, take a look at linux/Documentation/cpufreq. 
+	  For details, take a look at linux/Documentation/cpu-freq.

 	  If in doubt, say Y.

(Continue reading)

Jeroen Van der Vegt | 6 Oct 2003 11:19
Picon
Picon

Userspace: available processorspeeds

Hello,

I'm trying to write a userspace processor-speed governor for my laptop, 
an Asus L3000D. It has an AMD Athlon Mobile processor and runs on Linux 
2.6.0-test5 (and Debian unstable).

For some reason, my laptop crashes when the speed changes from maximum 
to minimum at once. So my program is to step the speed only to the next 
level available. This is repeated every 5 seconds, so both the maximum 
and minimum speed are reachable.
The available speeds are printed when the module PowerNow is loaded, but 
isn't there a 'better' way to retrieve this information? There doesn't 
seem to be a file listing all possible speeds in either /proc nor /sys. 
Have I overlooked a file perhaps, or is there some function call I can use?

Besides this, I have experienced the following weirdness: according to 
/sys/.../scaling_min_freq, my processor's minimum speed is 532 Mhz. I 
have, however, had it running at 292Mhz (as reported by /proc/cpuinfo). 
It's not really reproducible unfortunately, and I only noticed it once 
or twice.The laptops keeps working fine though, so it's not much of a 
problem to that respect. Any actions I should take the next time I see it?

Regards,

Jeroen van der Vegt.
Ducrot Bruno | 6 Oct 2003 14:38

Re: Userspace: available processorspeeds

On Mon, Oct 06, 2003 at 11:19:25AM +0200, Jeroen Van der Vegt wrote:
> Hello,
> 
> I'm trying to write a userspace processor-speed governor for my laptop, 
> an Asus L3000D. It has an AMD Athlon Mobile processor and runs on Linux 
> 2.6.0-test5 (and Debian unstable).
> 
> For some reason, my laptop crashes when the speed changes from maximum 
> to minimum at once. So my program is to step the speed only to the next 
> level available. This is repeated every 5 seconds, so both the maximum 
> and minimum speed are reachable.

Please be sure to upgrade to linux-2.6.0-test6 at least, due to some bugs
in previous versions in powernow-k7.

> The available speeds are printed when the module PowerNow is loaded, but 
> isn't there a 'better' way to retrieve this information? There doesn't 
> seem to be a file listing all possible speeds in either /proc nor /sys. 
> Have I overlooked a file perhaps, or is there some function call I can use?
> 
> Besides this, I have experienced the following weirdness: according to 
> /sys/.../scaling_min_freq, my processor's minimum speed is 532 Mhz. I 
> have, however, had it running at 292Mhz (as reported by /proc/cpuinfo). 

Strange.  Perhaps a bug somewhere in core?

> It's not really reproducible unfortunately, and I only noticed it once 
> or twice.The laptops keeps working fine though, so it's not much of a 
> problem to that respect. Any actions I should take the next time I see it?

(Continue reading)

Alex Simonov | 6 Oct 2003 17:37
Picon
Favicon

Re: Broken PST for Sony Vaio FX-502 with Athlon XP 1900+ fixed !


--- Ducrot Bruno <ducrot <at> poupinou.org> wrote:
> On Wed, Oct 01, 2003 at 07:13:13AM -0700, Alex
> Simonov wrote:
> 
> I think you can replace the powernow-k7.c of
> your kernel
> with the cvs version, without changing all.
> 
> There are not enough change in core (yet) with
> the one
> you have I guess.

Hi Bruno, 

Thank you very much for the advice. I took the
powernow-k7.c from the CVS, and compiled it with
my "fake" PST. I had to fix only the missing
define for the wrmsrl and rdmsrl symbols. So far
the powernow scaling for my XP 1900+ seems to
work. 
Just one question-the x86info utility displays
either "Voltage changes wont happen" or Frequency
changes wont happen" depending on that if you're
changing the speed up or down, because of the
CVID and CFID bits set to 0 in each change_fid or
change_vid function? Does this mean that VID/FID
is not changing? The MSR register values are set
anyway, is there any definitive way to make sure
if I have the correct voltage output?
(Continue reading)

Dave Jones | 6 Oct 2003 21:59
Picon
Favicon

Re: Userspace: available processorspeeds

On Mon, Oct 06, 2003 at 11:19:25AM +0200, Jeroen Van der Vegt wrote:

 > Besides this, I have experienced the following weirdness: according to 
 > /sys/.../scaling_min_freq, my processor's minimum speed is 532 Mhz. I 
 > have, however, had it running at 292Mhz (as reported by /proc/cpuinfo). 

The 532 is a calculated speed using FSB speed * a multipler.
The 292 is an estimate based upon bogomips calculation at boot time,
and also, is subject to thermal throttling by ACPI if present.

Think of '532' as actual speed, and '292' as effective speed.

		Dave

--

-- 
 Dave Jones     http://www.codemonkey.org.uk
Dominik Brodowski | 6 Oct 2003 21:54
Picon

[PATCHES 2.6] ACPI processor driver updates [idle, throttling, cpufreq, thermal]

The following patches which
- a) replace the broken ACPI CPUfreq driver with a better, flexible variant,
- b) modularize the processor.c code: instead of one large file there are
     many small files.
- c) improve passive cooling support
- d) allow for easy adding of proper locking and ref-counting in processor.c
have been re-diffed against linux-2.6.0-test6-bk-current and are available
on my website. 
Len, I'll send them to you in private e-mail for easier merging later.

Please apply.

	Dominik

http://www.brodo.de/patches/2003-10-06/acpi-2.6.0-test6-2-remove_previous_pstates_implementation
	The previous arch/i386/kernel/cpu/cpufreq/acpi.c CPUfreq
	driver was broken, of bad design, and needs to replaced 
	by something better. But, as a first step, remove all 
	parts related to P-States from ACPI code.

http://www.brodo.de/patches/2003-10-06/acpi-2.6.0-test6-2-processor_submodules
	Add a "submodule interface" to drivers/acpi/processor.c

	It allows to create other "modules" which access the acpi_handle 
	for the processor, and which get notified if the event value 
	maches the value passed in acpi_processor_register_notify.

http://www.brodo.de/patches/2003-10-06/acpi-2.6.0-test6-2-processor_perflib
	This patch adds a new "P-States library" to drivers/acpi/

(Continue reading)


Gmane