cpufreq longhaul trouble
Hi,
It seems that longhaul support in 2.6.0-test7 is still not working properly...:-(.
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported.
longhaul: Bogus values Min:0.000 Max:0.000. Voltage scaling disabled.
longhaul: MinMult=5.0x MaxMult=6.0x
longhaul: FSB: 0MHz Lowestspeed=0MHz Highestspeed=0MHz
------------[ cut here ]------------ kernel BUG at drivers/cpufreq/cpufreq_userspace.c:502! invalid operand: 0000 [#1] CPU: 0 EIP: 0060:[<c022b363>] Not tainted EFLAGS: 00010246
EIP is at cpufreq_governor_userspace+0xb3/0x1b0
eax: 00000000 ebx: 00000001 ecx: c13410a0 edx: 00000000
esi: cf53ae40 edi: 00000001 ebp: 00000000 esp: ccd63e64
ds: 007b es: 007b ss: 0068
Process modprobe (pid: 1898, threadinfo=ccd62000 task=cd3a4d80)
Stack: 00000001 cf53ae40 00000001 cf53ae40 c022a8b8 cf53ae40 00000001
00000000
00000000 ccd63ee4 cf53ae40 c022ac1e cf53ae40 00000001 cf53ae64
ccd63ee4
cf53ae40 cf53ae84 c022acb9 cf53ae40 ccd63ee4 cf53ae40 00000000
ccd62000
Call Trace:
[<c022a8b8>] __cpufreq_governor+0x68/0x120
[<c022ac1e>] __cpufreq_set_policy+0xde/0x140
[<c022acb9>] cpufreq_set_policy+0x39/0x70
[<c022a405>] cpufreq_add_dev+0x185/0x2a0
[<c014d89c>] unmap_vm_area+0x2c/0x80
[<c01d9253>] sysdev_driver_register+0x93/0x100
[<c022af81>] cpufreq_register_driver+0x91/0xa0
[<d082e4d4>] longhaul_init+0x54/0x56 [longhaul]
[<c01366bd>] sys_init_module+0x10d/0x230
[<c010b247>] syscall_call+0x7/0xb
Code: 0f 0b f6 01 80 7c 2a c0 eb 82 0f 0b f4 01 80 7c 2a c0 e9 6eIf more more details are needed, I'm happy to supply.
Cheers,
Jurgen
Quoted 10 lines · Jurgen Kramer
Hi,
It seems that longhaul support in 2.6.0-test7 is still not working properly...:-(.
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported.
longhaul: Bogus values Min:0.000 Max:0.000. Voltage scaling disabled.
longhaul: MinMult=5.0x MaxMult=6.0x
longhaul: FSB: 0MHz Lowestspeed=0MHz Highestspeed=0MHz
Puzzling, its as if all your MSRs are returning zero.
What does x86info -a think ?
(http://www.codemonkey.org.uk/projects/x86info if you don't have it).
Dave
Signature · 1 line
Dave Jones http://www.codemonkey.org.uk
Quoted 7 lines · Jurgen Kramer
It seems that longhaul support in 2.6.0-test7 is still not working properly...:-(.
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported.
longhaul: Bogus values Min:0.000 Max:0.000. Voltage scaling disabled.
longhaul: MinMult=5.0x MaxMult=6.0x
longhaul: FSB: 0MHz Lowestspeed=0MHz Highestspeed=0MHz
Oh boy, this is a real egg-on-face bug if I'm right.. edit arch/i386/kernel/cpu/cpufreq/longhaul.c and change line 394 to read longhaul_version = 1;
I suspect things will suddenly start making a lot more sense.
Dave
Signature · 1 line
Dave Jones http://www.codemonkey.org.uk
Quoted 10 lines · Dave Jones
Quoted 7 lines · Jurgen Kramer
It seems that longhaul support in 2.6.0-test7 is still not working properly...:-(.
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported.
longhaul: Bogus values Min:0.000 Max:0.000. Voltage scaling disabled.
longhaul: MinMult=5.0x MaxMult=6.0x
longhaul: FSB: 0MHz Lowestspeed=0MHz Highestspeed=0MHz
Quoted 6 lines
Oh boy, this is a real egg-on-face bug if I'm right.. edit
arch/i386/kernel/cpu/cpufreq/longhaul.cand change line 394 to readlonghaul_version= 1;
I suspect things will suddenly start making a lot more sense.Dave
Ok, changing line 394 gives:
<snip>
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v1 supported.
longhaul: MinMult=3.0x MaxMult=6.0x
longhaul: FSB: 133MHz Lowestspeed=399MHz Highestspeed=798MHz <snip>
But should it really be v1? With 2.4.20 I get:
ep 28 21:09:28 paradox kernel: longhaul: VIA CPU detected. Longhaul version 2 supported
Sep 28 21:09:28 paradox kernel: longhaul: CPU currently at 798MHz (133 x 6.0) Sep 28 21:09:28 paradox kernel: longhaul: MinMult(x10)=30 MaxMult(x10)=60 Sep 28 21:09:28 paradox kernel: longhaul: Lowestspeed=399000 Highestspeed=798000 Sep 28 21:09:28 paradox kernel: longhaul: New FSB:133 Mult(x10):60 Sep 28 21:09:28 paradox kernel: longhaul: New FSB:133 Mult(x10):30
x86info -a gives (running 2.6.0test7):
x86info v1.12b. Dave Jones 2001-2003
Feedback to <[email protected]>.
Found 1 CPU
--------------------------------------------------------------------------
eax in: 0x00000000, eax = 00000001 ebx = 746e6543 ecx = 736c7561 edx = 48727561
eax in: 0x00000001, eax = 00000678 ebx = 00000000 ecx = 00000000 edx = 00803135
eax in: 0x80000000, eax = 80000006 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000001, eax = 00000678 ebx = 00000000 ecx = 00000000 edx = 80803135
eax in: 0x80000002, eax = 20414956 ebx = 61727a45 ecx = 00000000 edx = 00000000
eax in: 0x80000003, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000004, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000005, eax = 00000000 ebx = 08800880 ecx = 40040120 edx = 40040120
eax in: 0x80000006, eax = 00000000 ebx = 00000000 ecx = 40040120 edx = 00000000
Family: 6 Model: 7 Stepping: 8
CPU Model : VIA C3 (Samuel 2) [C5B]
Feature flags:
Onboard FPU
Debugging Extensions
Time Stamp Counter
Model-Specific Registers
CMPXCHG8 instruction
Memory Type Range Registers
Page Global Enable
MMX support
Extended feature flags:
3dnow
Instruction TLB: 8-way associative. 128 entries.
Data TLB: 8-way associative. 128 entries.
L1 Data cache:
Size: 64Kb 4-way associative.
lines per tag=1 line size=32 bytes.
L1 Instruction cache:
Size: 64Kb 4-way associative.
lines per tag=1 line size=32 bytes.
L2 cache size errata detected. Using workaround
L2 (on CPU) cache:
Size: 64Kb 4-way associative.
lines per tag=1 line size=32 bytes./dev/cpu/0/msr: No such device
FCR: Couldn't read MSR 0x1107
Power management: Longhaul v2.0
MTRR registers:
MTRRcap (0xfe): MTRRphysBase0 (0x200): MTRRphysMask0 (0x201):
MTRRphysBase1 (0x202): MTRRphysMask1 (0x203): MTRRphysBase2 (0x204):
MTRRphysMask2 (0x205): MTRRphysBase3 (0x206): MTRRphysMask3 (0x207):
MTRRphysBase4 (0x208): MTRRphysMask4 (0x209): MTRRphysBase5 (0x20a):
MTRRphysMask5 (0x20b): MTRRphysBase6 (0x20c): MTRRphysMask6 (0x20d):
MTRRphysBase7 (0x20e): MTRRphysMask7 (0x20f): MTRRfix64K_00000 (0x250):MTRRfix16K_80000 (0x258): MTRRfix16K_A0000 (0x259): MTRRfix4K_C8000 (0x269): MTRRfix4K_D0000 0x26a: MTRRfix4K_D8000 0x26b: MTRRfix4K_E0000 0x26c: MTRRfix4K_E8000 0x26d: MTRRfix4K_F0000 0x26e: MTRRfix4K_F8000 0x26f: MTRRdefType (0x2ff):
800MHz processor (estimate).
Greetings,
Jurgen
Quoted 11 lines · Jurgen Kramer
Ok, changing line 394 gives:
<snip>
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v1 supported.
longhaul: MinMult=3.0x MaxMult=6.0x
longhaul: FSB: 133MHz Lowestspeed=399MHz Highestspeed=798MHz <snip>But should it really be v1? With 2.4.20 I get:
ep 28 21:09:28 paradox kernel: longhaul: VIA CPU detected. Longhaul version 2 supported
Quoted 8 lines
Sep 28 21:09:28 paradox kernel: longhaul: CPU currently at 798MHz (133 x 6.0) Sep 28 21:09:28 paradox kernel: longhaul: MinMult(x10)=30 MaxMult(x10)=60 Sep 28 21:09:28 paradox kernel: longhaul: Lowestspeed=399000 Highestspeed=798000 Sep 28 21:09:28 paradox kernel: longhaul: New FSB:133 Mult(x10):60 Sep 28 21:09:28 paradox kernel: longhaul: New FSB:133 Mult(x10):30
Note that the various speeds etc now match.
Why we got away with this in 2.4 I'm not sure, depends which patch you used.
Quoted 1 line
x86info -a gives (running 2.6.0test7):
...
Quoted 1 line
/dev/cpu/0/msr: No such device
Heh. this was the important bit.. Doesn't matter now anyway.
Dave
Signature · 1 line
Dave Jones http://www.codemonkey.org.uk
Some more details. Although this is an 800MHz CPU/sys/devices/system/cpu/cpu0/cpufreq gives:
[root@paradox cpufreq]# more *
::::::::::::::cpuinfo_max_freq
::::::::::::::
995
::::::::::::::cpuinfo_min_freq
::::::::::::::
399
::::::::::::::scaling_available_governors
::::::::::::::
userspace
::::::::::::::scaling_driver
::::::::::::::
longhaul
::::::::::::::scaling_governor
::::::::::::::
userspace
::::::::::::::scaling_max_freq
::::::::::::::
995
::::::::::::::scaling_min_freq
::::::::::::::
399
::::::::::::::scaling_setspeed
::::::::::::::
798
I can overclock my machine to 995MHz..;-) Setting scaling_setspeed doesn't seem to do anything.
Cheers,
Jurgen
Quoted 16 lines · Dave Jones
Quoted 7 lines · Jurgen Kramer
It seems that longhaul support in 2.6.0-test7 is still not working properly...:-(.
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported.
longhaul: Bogus values Min:0.000 Max:0.000. Voltage scaling disabled.
longhaul: MinMult=5.0x MaxMult=6.0x
longhaul: FSB: 0MHz Lowestspeed=0MHz Highestspeed=0MHzOh boy, this is a real egg-on-face bug if I'm right.. edit
arch/i386/kernel/cpu/cpufreq/longhaul.cand change line 394 to readlonghaul_version= 1;
I suspect things will suddenly start making a lot more sense.Dave
Quoted 8 lines · Jurgen Kramer
Some more details. Although this is an 800MHz CPU
/sys/devices/system/cpu/cpu0/cpufreqgives:[root@paradox cpufreq]# more *
::::::::::::::cpuinfo_max_freq
::::::::::::::
995
wtf, it still displays "Highestspeed=798MHz" on startup though right ?
Dave
Signature · 1 line
Dave Jones http://www.codemonkey.org.uk
Quoted 10 lines · Dave Jones
Quoted 8 lines · Jurgen Kramer
Some more details. Although this is an 800MHz CPU
/sys/devices/system/cpu/cpu0/cpufreqgives:[root@paradox cpufreq]# more *
::::::::::::::cpuinfo_max_freq
::::::::::::::
995
Quoted 3 lines
wtf, it still displays "Highestspeed=798MHz" on startup though right ?
Dave
Yep,
longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v1 supported.
longhaul: MinMult=3.0x MaxMult=6.0x
longhaul: FSB: 133MHz Lowestspeed=399MHz Highestspeed=798MHz
With 2.4 I could choose 3 different speeds once (around Sept 2002)...currently only two speeds are available, 400 and 800.
Jurgen
Quoted 3 lines · Jurgen Kramer
Quoted 2 lines
Quoted 1 line
995
wtf, it still displays "Highestspeed=798MHz" on startup though right ?
Yep,
another stupid bug.calc_speed should look like this..
static unsigned int calc_speed (int mult, int fsb)
{
int mhz;
mhz = (mult/10)*fsb;
if (mult%10)
mhz += fsb/2;
return mhz;
}Signature · 1 line
Dave Jones http://www.codemonkey.org.uk
Quoted 8 lines · Dave Jones
Quoted 3 lines · Jurgen Kramer
Quoted 2 lines
Quoted 1 line
995
wtf, it still displays "Highestspeed=798MHz" on startup though right ?
Yep,
another stupid bug.
calc_speedshould look like this..
Quoted 9 lines
static unsigned int
calc_speed(int mult, int fsb){ int mhz; mhz = (mult/10)*fsb; if (mult%10) mhz += fsb/2; return mhz; }
Fixed that one:
[root@paradox cpufreq]# more *
::::::::::::::cpuinfo_max_freq
::::::::::::::
798
::::::::::::::cpuinfo_min_freq
::::::::::::::
399
::::::::::::::scaling_available_governors
::::::::::::::
userspace
::::::::::::::scaling_driver
::::::::::::::
longhaul
::::::::::::::scaling_governor
::::::::::::::
userspace
::::::::::::::scaling_max_freq
::::::::::::::
798
::::::::::::::scaling_min_freq
::::::::::::::
399
::::::::::::::scaling_setspeed
::::::::::::::
798