aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/hpet.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2007-02-16 04:28:21 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:14:00 -0500
commit7460ed2844ffad7141e30271c0c3da8336e66014 (patch)
tree4ae7f2ebf09b59f214d243d0f886fb2c4e7915e8 /arch/x86_64/kernel/hpet.c
parent1489939f0ab64b96998e04068c516c39afe29654 (diff)
[PATCH] time: x86_64: re-enable vsyscall support for x86_64
Cleanup and re-enable vsyscall gettimeofday using the generic clocksource infrastructure. [akpm@osdl.org: cleanup] Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@muc.de> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/hpet.c')
-rw-r--r--arch/x86_64/kernel/hpet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/hpet.c b/arch/x86_64/kernel/hpet.c
index c23738899ae9..65a0edd71a17 100644
--- a/arch/x86_64/kernel/hpet.c
+++ b/arch/x86_64/kernel/hpet.c
@@ -458,6 +458,11 @@ static cycle_t read_hpet(void)
458 return (cycle_t)readl(hpet_ptr); 458 return (cycle_t)readl(hpet_ptr);
459} 459}
460 460
461static cycle_t __vsyscall_fn vread_hpet(void)
462{
463 return readl((void __iomem *)fix_to_virt(VSYSCALL_HPET) + 0xf0);
464}
465
461struct clocksource clocksource_hpet = { 466struct clocksource clocksource_hpet = {
462 .name = "hpet", 467 .name = "hpet",
463 .rating = 250, 468 .rating = 250,
@@ -466,6 +471,7 @@ struct clocksource clocksource_hpet = {
466 .mult = 0, /* set below */ 471 .mult = 0, /* set below */
467 .shift = HPET_SHIFT, 472 .shift = HPET_SHIFT,
468 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 473 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
474 .vread = vread_hpet,
469}; 475};
470 476
471static int __init init_hpet_clocksource(void) 477static int __init init_hpet_clocksource(void)