kernel-ark/arch/x86
Andreas Herrmann 9566e91d49 x86: fix detection of CONSTANT_TSC bit for AMD CPUs
Commits
 - c52f61fcbdb2aa84f0e4d831ef07f375e6b99b2c
  (x86: allow TSC clock source on AMD Fam10h and some cleanup)
 - e30436f05d456efaff77611e4494f607b14c2782
  (x86: move X86_FEATURE_CONSTANT_TSC into early cpu feature detection)

are supposed to fix the detection of contant TSC for AMD CPUs.
Unfortunately on x86_64 it does still not work with current x86/mm.
For a Phenom I still get:

  ...
  TSC calibrated against PM_TIMER
  Marking TSC unstable due to TSCs unsynchronized
  time.c: Detected 2288.366 MHz processor.
  ...

We have to set c->x86_power in early_identify_cpu to properly detect
the CONSTANT_TSC bit in early_init_amd.

Attached patch fixes this issue. Following the relevant boot
messages when the fix is used:

  ...
  TSC calibrated against PM_TIMER
  time.c: Detected 2288.279 MHz processor.
  ...
  Initializing CPU#1
  ...
  checking TSC synchronization [CPU#0 -> CPU#1]: passed.
  ...
  Initializing CPU#2
  ...
  checking TSC synchronization [CPU#0 -> CPU#2]: passed.
  ...
  Booting processor 3/4 APIC 0x3
  ...
  checking TSC synchronization [CPU#0 -> CPU#3]: passed.
  Brought up 4 CPUs
  ...

Patch is against x86/mm (v2.6.24-rc8-672-ga9f7faa).
Please apply.

Set c->x86_power in early_identify_cpu. This ensures that
X86_FEATURE_CONSTANT_TSC can properly be set in early_init_amd.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:32:41 +01:00
..
boot x86: hlt on early crash 2008-01-30 13:32:31 +01:00
configs x86: 64-bit, make sparsemem vmemmap the only memory model 2008-01-30 13:30:47 +01:00
crypto [CRYPTO] twofish: Merge common glue code 2008-01-14 17:07:57 +11:00
ia32 arch/x86/ia32: use time_before, time_before_eq, etc. 2008-01-30 13:32:17 +01:00
kernel x86: fix detection of CONSTANT_TSC bit for AMD CPUs 2008-01-30 13:32:41 +01:00
lguest x86: change write_gdt_entry signature. 2008-01-30 13:31:13 +01:00
lib x86: unify arch/x86/lib/Makefile(s) 2008-01-30 13:32:31 +01:00
mach-default spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-es7000 i386: es7000 minor cleanups 2007-10-17 20:16:15 +02:00
mach-generic spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
mach-visws x86: cleanup mpspec variants 2008-01-30 13:30:35 +01:00
mach-voyager x86: remove all definitions with fastcall 2008-01-30 13:31:17 +01:00
math-emu x86: arch/x86/math-emu/errors.c: fix printk warnings 2008-01-30 13:32:13 +01:00
mm x86: clean up k8topology.c 2008-01-30 13:32:36 +01:00
oprofile x86: fix style errors in nmi_int.c 2008-01-30 13:32:33 +01:00
pci x86: add some pirq debugging 2008-01-30 13:32:00 +01:00
power x86: make __{save,restore}_processor_state static 2008-01-30 13:31:23 +01:00
vdso x86: gitignore arch/x86/vdso files 2008-01-30 13:32:32 +01:00
video
xen x86: remove all definitions with fastcall 2008-01-30 13:31:17 +01:00
Kconfig x86: default to PCI=y 2008-01-30 13:32:32 +01:00
Kconfig.cpu x86: reduce CONFIG_X86_PPRO_FENCE bloat 2008-01-30 13:32:31 +01:00
Kconfig.debug x86: unify arch/x86/kernel/Makefile(s) 2008-01-30 13:32:27 +01:00
Makefile x86: biarch support for 32 bit builds beautified 2008-01-30 13:32:23 +01:00
Makefile_32.cpu x86: move i386 and x86_64 Makefiles to arch/x86 2007-10-25 22:27:34 +02:00