aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-05-17 00:53:28 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:15 -0400
commit312df5f1a1da780e084b328bcabb02a6dcd044c3 (patch)
tree04f0a70177979e4b8924015448a72644f1ce1c79 /include/asm-x86_64
parent0af2be0b721997512191e981a051fcb070b87260 (diff)
[PATCH] x86_64: Add pmtimer support
There are unfortunately more and more multi processor Opteron systems which don't have HPET timer support in the southbridge. This covers in particular Nvidia and VIA chipsets. They also don't guarantee that the TSCs are synchronized between CPUs; and especially with MP powernow the systems are nearly unusable because the time gets very inconsistent between CPUs. The timer code for x86-64 was originally written under the assumption that we could fall back to the HPET timer on such systems. But this doesn't work there. Another alternative is to use the ACPI PM timer as primary time source. This patch does that. The kernel only uses PM timer when there is no other choice because it has some disadvantages. Ported over from i386. It should be faster than the i386 version because I dropped the "read three times" workaround, but is still considerable slower than HPET and also does not work together with vsyscalls which have to be disabled. Cc: <mark.langsdorf@amd.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/proto.h5
-rw-r--r--include/asm-x86_64/vsyscall.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
index d0f8f8b4c394..f2f073642d62 100644
--- a/include/asm-x86_64/proto.h
+++ b/include/asm-x86_64/proto.h
@@ -30,6 +30,11 @@ extern void ia32_syscall(void);
30extern void iommu_hole_init(void); 30extern void iommu_hole_init(void);
31 31
32extern void time_init_gtod(void); 32extern void time_init_gtod(void);
33extern int pmtimer_mark_offset(void);
34extern unsigned int do_gettimeoffset_pm(void);
35extern u32 pmtmr_ioport;
36extern unsigned long long monotonic_base;
37extern int sysctl_vsyscall;
33 38
34extern void do_softirq_thunk(void); 39extern void do_softirq_thunk(void);
35 40
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h
index b0c8d4339906..2872da23fc7e 100644
--- a/include/asm-x86_64/vsyscall.h
+++ b/include/asm-x86_64/vsyscall.h
@@ -25,6 +25,7 @@ enum vsyscall_num {
25 25
26#define VXTIME_TSC 1 26#define VXTIME_TSC 1
27#define VXTIME_HPET 2 27#define VXTIME_HPET 2
28#define VXTIME_PMTMR 3
28 29
29struct vxtime_data { 30struct vxtime_data {
30 long hpet_address; /* HPET base address */ 31 long hpet_address; /* HPET base address */
@@ -54,6 +55,8 @@ extern struct timezone sys_tz;
54extern int sysctl_vsyscall; 55extern int sysctl_vsyscall;
55extern seqlock_t xtime_lock; 56extern seqlock_t xtime_lock;
56 57
58extern int sysctl_vsyscall;
59
57#define ARCH_HAVE_XTIME_LOCK 1 60#define ARCH_HAVE_XTIME_LOCK 1
58 61
59#endif /* __KERNEL__ */ 62#endif /* __KERNEL__ */