2.6.27.7 built for Geode: Clock drift
Hi folks,
If I build a kernel for AMD Geode, then I see a clock drift of appr. 30 min. to 1 hour per day. If I build the same kernel for i486, then the clock drift is gone. Running ntp makes no difference.
Hardware is a Linutop PC. /proc/cpuinfo says
processor : 0vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 0.000
cache size : 128 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow
bogomips : 429.05
clflush size : 32
power management:
BTW, the CPU is running with 500 MHz (AFAIK). 0.000 MHz is surely not correct. /proc/cpuinfo reports the same for both kernels.
Attached is the diff of the config files. Please mail if you are interested in the complete config files, or if I can help to track this down.
Regards
Harri
config-2.6.27.7-geode renamed from config-2.6.27.7-486 +10 -7
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.27.7 -# Mon Dec 1 22:42:26 2008 +# Sun Nov 23 05:01:04 2008 # # CONFIG_64BIT is not set CONFIG_X86_32=y
@@ -56,7 +56,7 @@ CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_LOCALVERSION="-486" +CONFIG_LOCALVERSION="-geode" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y
@@ -197,7 +197,7 @@ # CONFIG_PARAVIRT_DEBUG is not set # CONFIG_MEMTEST is not set # CONFIG_M386 is not set -CONFIG_M486=y +# CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set
@@ -215,7 +215,7 @@ # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set +CONFIG_MGEODE_LX=y # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set
@@ -227,15 +227,16 @@ CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_X86_XADD=y -# CONFIG_X86_PPRO_FENCE is not set -CONFIG_X86_F00F_BUG=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y -CONFIG_X86_ALIGNMENT_16=y CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_USE_3DNOW=y +CONFIG_X86_TSC=y CONFIG_X86_MINIMUM_CPU_FAMILY=4 +CONFIG_X86_DEBUGCTLMSR=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y
@@ -423,6 +424,7 @@ # CONFIG_MCA_PROC_FS is not set CONFIG_SCx200=m CONFIG_SCx200HR_TIMER=m +CONFIG_GEODE_MFGPT_TIMER=y # CONFIG_OLPC is not set CONFIG_K8_NB=y # CONFIG_PCCARD is not set
@@ -1919,6 +1921,7 @@ CONFIG_ADVANTECH_WDT=m CONFIG_ALIM1535_WDT=m CONFIG_ALIM7101_WDT=m +CONFIG_GEODE_WDT=m CONFIG_SC520_WDT=m CONFIG_EUROTECH_WDT=m CONFIG_IB700_WDT=m
Quoted 29 lines · Harald Dunkel
Hi folks,
If I build a kernel for AMD Geode, then I see a clock drift of appr. 30 min. to 1 hour per day. If I build the same kernel for i486, then the clock drift is gone. Running ntp makes no difference.
Hardware is a Linutop PC.
/proc/cpuinfosaysprocessor : 0
vendor_id: AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 0.000
cache size : 128 KBfdiv_bug: nohlt_bug: nof00f_bug: nocoma_bug: no
fpu : yesfpu_exception: yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow
bogomips : 429.05
clflush size : 32
power management:
Quoted 2 lines
BTW, the CPU is running with 500 MHz (AFAIK). 0.000 MHz is surely not correct.
/proc/cpuinforeports the same for both kernels.
Hmm - we've heard reports of this before, but nothing came of it. I would be interested in a chance to debug it this time.
Please try turning off CONFIG_GEODE_MFGPT_TIMER=y and try again. Also, try something in the 2.6.28 family to rule out fixes in the timer subsystem.
Thanks,
Jordan
Hi Jordan,
Quoted 13 lines · Jordan Crouse
Hmm - we've heard reports of this before, but nothing came of it. I would be interested in a chance to debug it this time.
Please try turning off
CONFIG_GEODE_MFGPT_TIMER=yand try again. Also, try something in the 2.6.28 family to rule out fixes in the timer subsystem.Thanks,
JordanSignature · 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Signature · 4 lines
Dipl.-Ing. Harald Dunkel | "They that can give up liberty to obtain Muehlenbachstr. 3 | a little temporary safety deserve neither 52134 Herzogenrath, Germany | liberty nor safety." +49 2407 565 105 | Benjamin Franklin, 1706 - 1790
Hi Jordan,
Sorry for the empty reply. I clicked on [Send] by accident.
Quoted 4 lines · Jordan Crouse
Hmm - we've heard reports of this before, but nothing came of it. I would be interested in a chance to debug it this time.
Please try turning off
CONFIG_GEODE_MFGPT_TIMER=yand try again.
AFAICS this was already set.
Quoted 2 lines
Also, try something in the 2.6.28 family to rule out fixes in the timer subsystem.
The build is running, but it is a slow machine.
Regards
Harri
Quoted 11 lines · Harald Dunkel
Hi Jordan,
Sorry for the empty reply. I clicked on [Send] by accident.
Quoted 4 lines · Jordan Crouse
Hmm - we've heard reports of this before, but nothing came of it. I would be interested in a chance to debug it this time.
Please try turning off
CONFIG_GEODE_MFGPT_TIMER=yand try again.AFAICS this was already set.
You mean set prior to 2.6.27? I know, but if there is a regression, that would help narrow it down.
Jordan
Quoted 2 lines · Jordan Crouse
Also, try something in the 2.6.28 family to rule out fixes in the timer subsystem.
Using 2.6.28-rc7 the problem seems to be gone. There was no complain about TSC in dmesg, and clock speed is OK. (ntp is off.)
Many thanx
Harri
Quoted 5 lines · Harald Dunkel
Hi folks,
If I build a kernel for AMD Geode, then I see a clock drift of appr. 30 min. to 1 hour per day. If I build the same kernel for i486, then the clock drift is gone. Running ntp makes no difference.
For both configs, can you run:
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
and:
cat /sys/devices/system/clocksource/clocksource0/current_clocksource
Then send back the output?
thanks
-john
Quoted 8 lines · john stultz
For both configs, can you run:
cat/sys/devices/system/clocksource/clocksource0/available_clocksource
and:
cat/sys/devices/system/clocksource/clocksource0/current_clocksourceThen send back the output?
Sure. For 486:
% cat /sys/devices/system/clocksource/clocksource0/available_clocksource pit jiffies
% cat /sys/devices/system/clocksource/clocksource0/current_clocksource pit
For Geode (clock is running too fast):
% cat /sys/devices/system/clocksource/clocksource0/available_clocksource jiffies
% cat /sys/devices/system/clocksource/clocksource0/current_clocksource jiffies
dmesg says for Geode:
:
TSC: Unable to calibrate against PIT
TSC: No reference (HPET/PMTIMER) available Marking TSC unstable due to could not calculate TSC khz :
Regards
Harri
Quoted 25 lines · Harald Dunkel
Quoted 8 lines · john stultz
For both configs, can you run:
cat/sys/devices/system/clocksource/clocksource0/available_clocksource
and:
cat/sys/devices/system/clocksource/clocksource0/current_clocksourceThen send back the output?
Sure. For 486:
% cat
/sys/devices/system/clocksource/clocksource0/available_clocksourcepit jiffies
% cat/sys/devices/system/clocksource/clocksource0/current_clocksourcepitFor Geode (clock is running too fast):
% cat/sys/devices/system/clocksource/clocksource0/available_clocksourcejiffies
% cat/sys/devices/system/clocksource/clocksource0/current_clocksourcejiffies
Quoted 6 lines
dmesg says for Geode:
:
TSC: Unable to calibrate against PIT
TSC: No reference (HPET/PMTIMER) available Marking TSC unstable due to could not calculate TSC khz
Could you send your .config?
It seems the PIT (which is used in 486 build) is being disabled in the Geode config. However, I thought the Geode's had their own clocksources, either the SCx200 or the GEODE_MFGPT_TIMER. Maybe one of those needs to be enabled?
thanks
-john
Quoted 31 lines · john stultz
Quoted 23 lines · Harald Dunkel
Quoted 7 lines · john stultz
For both configs, can you run:
cat/sys/devices/system/clocksource/clocksource0/available_clocksource
and:
cat/sys/devices/system/clocksource/clocksource0/current_clocksourceThen send back the output?
Sure. For 486:
% cat
/sys/devices/system/clocksource/clocksource0/available_clocksourcepit jiffies
% cat/sys/devices/system/clocksource/clocksource0/current_clocksourcepitFor Geode (clock is running too fast):
% cat/sys/devices/system/clocksource/clocksource0/available_clocksourcejiffies
% cat/sys/devices/system/clocksource/clocksource0/current_clocksourcejiffiesQuoted 6 lines
dmesg says for Geode:
:
TSC: Unable to calibrate against PIT
TSC: No reference (HPET/PMTIMER) available Marking TSC unstable due to could not calculate TSC khz
Quoted 6 lines
Could you send your .config?
It seems the PIT (which is used in 486 build) is being disabled in the Geode config. However, I thought the Geode's had their own clocksources, either the SCx200 or the
GEODE_MFGPT_TIMER. Maybe one of those needs to be enabled?
He sent his original config in his first email - GEODE_MFGPT_TIMER was enabled. Its not always certain that there are MFGPT timers available (prior to about the middle of this year, most Geode BIOSes took all the timers for themselves). But in any case the system should fall back to PIT automatically, so regardless of more advanced timers. the absence of a PIT is troubling.
Jordan