Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=95b08679963c78ce0d675224a6efdb5169f2bf75 Commit: 95b08679963c78ce0d675224a6efdb5169f2bf75 Parent: 99364df764bbef327be2f8b8ffcfbb41a4a1af4d Author: Andi Kleen <[EMAIL PROTECTED]> AuthorDate: Tue Sep 11 14:02:09 2007 +0200 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Sep 12 09:28:06 2007 -0700
x86_64: Add missing mask operation to vdso vdso vgetns() didn't mask the time source offset calculation, which could lead to time problems with 32bit HPET. Add the masking. Thanks to Chuck Ebbert for tracking this down. Signed-off-by: Andi Kleen <[EMAIL PROTECTED]> Cc: Chuck Ebbert <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/x86_64/vdso/vclock_gettime.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/vdso/vclock_gettime.c b/arch/x86_64/vdso/vclock_gettime.c index 17f6a00..5b54cdf 100644 --- a/arch/x86_64/vdso/vclock_gettime.c +++ b/arch/x86_64/vdso/vclock_gettime.c @@ -34,10 +34,11 @@ static long vdso_fallback_gettime(long clock, struct timespec *ts) static inline long vgetns(void) { + long v; cycles_t (*vread)(void); vread = gtod->clock.vread; - return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >> - gtod->clock.shift; + v = (vread() - gtod->clock.cycle_last) & gtod->clock.mask; + return (v * gtod->clock.mult) >> gtod->clock.shift; } static noinline int do_realtime(struct timespec *ts) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html