aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/hpet.c
diff options
context:
space:
mode:
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 c23738899ae..65a0edd71a1 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)
return (cycle_t)readl(hpet_ptr);
}
+static cycle_t __vsyscall_fn vread_hpet(void)
+{
+ return readl((void __iomem *)fix_to_virt(VSYSCALL_HPET) + 0xf0);
+}
+
struct clocksource clocksource_hpet = {
.name = "hpet",
.rating = 250,
@@ -466,6 +471,7 @@ struct clocksource clocksource_hpet = {
.mult = 0, /* set below */
.shift = HPET_SHIFT,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
+ .vread = vread_hpet,
};
static int __init init_hpet_clocksource(void)