Commit e546d778 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Drivers: hv: vmbus: Get the current time from the current clocksource

The current code uses the MSR based mechanism to get the current tick.
Use the current clock source as that might be more optimal.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7975bd4c
...@@ -137,7 +137,6 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type) ...@@ -137,7 +137,6 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
} }
} }
#define hv_get_current_tick(tick) rdmsrl(HV_X64_MSR_TIME_REF_COUNT, tick)
#define hv_init_timer(timer, tick) wrmsrl(timer, tick) #define hv_init_timer(timer, tick) wrmsrl(timer, tick)
#define hv_init_timer_config(config, val) wrmsrl(config, val) #define hv_init_timer_config(config, val) wrmsrl(config, val)
......
...@@ -96,7 +96,7 @@ static int hv_ce_set_next_event(unsigned long delta, ...@@ -96,7 +96,7 @@ static int hv_ce_set_next_event(unsigned long delta,
WARN_ON(!clockevent_state_oneshot(evt)); WARN_ON(!clockevent_state_oneshot(evt));
hv_get_current_tick(current_tick); current_tick = hyperv_cs->read(NULL);
current_tick += delta; current_tick += delta;
hv_init_timer(HV_X64_MSR_STIMER0_COUNT, current_tick); hv_init_timer(HV_X64_MSR_STIMER0_COUNT, current_tick);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment