android_kernel_xiaomi_sm7250/arch/x86_64/kernel
Andi Kleen dda50e716d [PATCH] x86_64: Update TSC sync algorithm
The new TSC sync algorithm recently submitted did not work too well.

The result was that some MP machines where the TSC came up of the BIOS very
unsynchronized and that did not have HPET support were nearly unusable because
the time would jump forwards and backwards between CPUs.

After a lot of research ;-) and some more prototypes I ended up with just
using the one from IA64 which looks best.  It has some internal self tuning
that should adapt to changing interconnect latencies.  It holds up in my tests
so far.

I believe it was originally written by David Mosberger, I just ported it over
to x86-64.  See the inline comment for a description.

This cleans up the code because it uses smp_call_function for syncing instead
of having custom hooks in SMP bootup.

Please note that the cycle numbers it outputs are too optimistic because they
do not take into account the latency of WRMSR and RDTSC, which can be hundreds
of cycles.  It seems to be able to sync a dual Opteron to 200-300 cycles,
which is probably good enough.

There is a timing window during AP bootup where interrupts can see
inconsistent time before the TSC is synced.  It is hard to avoid unfortunately
because we can only do the TSC sync after some setup, and we need to enable
interrupts before that.  I just ignored it for now.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
..
acpi Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpufreq Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
aperture.c [PATCH] x86_64: Use the e820 hole to map the IOMMU/AGP aperture 2005-04-16 15:25:13 -07:00
apic.c [PATCH] Fix u32 vs. pm_message_t in x86-64 2005-04-16 15:25:31 -07:00
asm-offsets.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
e820.c [PATCH] x86-64: Handle empty E820 regions correctly 2005-05-01 08:58:52 -07:00
early_printk.c [PATCH] make lots of things static 2005-05-01 08:59:29 -07:00
entry.S [PATCH] x86_64: Readd missing tests in entry.S 2005-05-17 07:59:13 -07:00
genapic_cluster.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
genapic_flat.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
genapic.c [PATCH] x86_64 genapic update 2005-04-16 15:24:53 -07:00
head64.c [PATCH] x86_64: saved_command_line overflow fix 2005-05-01 08:58:52 -07:00
head.S [PATCH] x86_64: Dump stack and prevent recursion on early fault 2005-04-16 15:25:00 -07:00
i387.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i8259.c [PATCH] Fix u32 vs. pm_message_t in x86-64 2005-04-16 15:25:31 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_apic.c [PATCH] check nmi watchdog is broken 2005-05-01 08:58:48 -07:00
ioport.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kprobes.c [PATCH] Kprobes: Incorrect handling of probes on ret/lret instruction 2005-05-05 16:36:39 -07:00
ldt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mce_intel.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mce.c [PATCH] x86_64: Remove excessive stack allocation in MCE code with large NR_CPUS 2005-04-16 15:25:10 -07:00
module.c [PATCH] uml: kludgy compilation fixes for x86-64 subarch modules support 2005-05-05 16:36:33 -07:00
mpparse.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
msr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nmi.c [PATCH] x86_64: Reduce NMI watchdog stack usage 2005-05-17 07:59:12 -07:00
pci-dma.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-gart.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-nommu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
process.c [PATCH] i386/x86_64 segment register access update 2005-05-01 08:58:48 -07:00
ptrace.c [AUDIT] Log correct syscall args for i386 processes on x86_64 2005-05-03 14:11:02 +01:00
reboot.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup64.c [PATCH] Increase number of e820 entries hard limit from 32 to 128 2005-05-01 08:58:51 -07:00
setup.c [PATCH] x86_64/i386: fix defaults for physical/core id in /proc/cpuinfo 2005-05-17 07:59:13 -07:00
signal.c [PATCH] amd64 rt_sigframe user annotation 2005-04-26 07:43:42 -07:00
smp.c [PATCH] x86_64: Switch SMP bootup over to new CPU hotplug state machine 2005-04-16 15:25:19 -07:00
smpboot.c [PATCH] x86_64: Update TSC sync algorithm 2005-05-17 07:59:14 -07:00
suspend_asm.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
suspend.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_x86_64.c [PATCH] consolidate sys_shmat 2005-05-01 08:59:12 -07:00
syscall.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
time.c [PATCH] Fix u32 vs. pm_message_t in x86-64 2005-04-16 15:25:31 -07:00
trampoline.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PATCH] x86_64: Rewrite exception stack backtracing 2005-04-16 15:25:17 -07:00
vmlinux.lds.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
x8664_ksyms.c [PATCH] x86_64: make string func definition work as intended 2005-05-05 16:36:33 -07:00