mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
A single fix for the Hyper-V clocksource driver to make sched clock
actually return nanoseconds and not the virtual clock value which increments at 10e7 HZ (100ns). -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl6AxjkTHHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYoX7ED/9o8WQx1wmZ9B70FZYWkCBim4YX1GzW IBNy5dNJKnfDyHQ7kUip5sr2V9RtTU1vTjfEF/dw4NlgFEbk8Z2K4KvraET0DX5v UISL64TIl2lNhM0ey7WNX9XRxN2CG1FveAwRqKiTDQP9lla/DN7q7LyOGn8iBamB ulCYY6Kp2uppA47XbbwITy3mDbKEGma8nAUNsF0sUcHxDq2BUUBwDdbgWuc6i7b3 nQa4eqvo2ZHQSkCze5/KAsz0MeBTULOzhtrrZ8SE8lEGyz0KLdymi8hneg0zXexP yTJ/IKaP8kfL+yjcJJGBGvZsEbKdUurIMDBUl82955MUSBV0XbYUliiUVNk28n7k 7UsJPua69erHqWFKa4ucqGzURkUhHmpvNcRiOnZNMGuXKuV2t+CEfU1PLu/nVKos MbRw9tSNJ4LDt9wmuJiV3o+xBEXW2QuIgWg1aSdvxdOfRrP4f8zkeojezMO0YO9O plMKIlNoH2Xf0sfmMWGze2l/cqpqLgXPzF+e62+M9/wdJDBTLgTdUpFQq3qu46Lc vWTTgmNIWO2UDTDKukCTITk/kI0AYtayAnNmcjvviGOO8ge2vlUaOxd6nEiF4y46 U7X9VffZODopxvjmKX/8tS9sB3cPb/vWqFND0jY4SZzx0SXQFRgPNXsARA+q/Fan AqNrpL4auLlTlw== =qZa/ -----END PGP SIGNATURE----- Merge tag 'timers-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix for the Hyper-V clocksource driver to make sched clock actually return nanoseconds and not the virtual clock value which increments at 10e7 HZ (100ns)" * tag 'timers-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/hyper-v: Make sched clock return nanoseconds correctly
This commit is contained in:
commit
ab93e984db
@ -343,7 +343,8 @@ static u64 notrace read_hv_clock_tsc_cs(struct clocksource *arg)
|
||||
|
||||
static u64 read_hv_sched_clock_tsc(void)
|
||||
{
|
||||
return read_hv_clock_tsc() - hv_sched_clock_offset;
|
||||
return (read_hv_clock_tsc() - hv_sched_clock_offset) *
|
||||
(NSEC_PER_SEC / HV_CLOCK_HZ);
|
||||
}
|
||||
|
||||
static void suspend_hv_clock_tsc(struct clocksource *arg)
|
||||
@ -398,7 +399,8 @@ static u64 notrace read_hv_clock_msr_cs(struct clocksource *arg)
|
||||
|
||||
static u64 read_hv_sched_clock_msr(void)
|
||||
{
|
||||
return read_hv_clock_msr() - hv_sched_clock_offset;
|
||||
return (read_hv_clock_msr() - hv_sched_clock_offset) *
|
||||
(NSEC_PER_SEC / HV_CLOCK_HZ);
|
||||
}
|
||||
|
||||
static struct clocksource hyperv_cs_msr = {
|
||||
|
Loading…
Reference in New Issue
Block a user