diff mbox

[11/18] x86: vsyscall: pass mode to gettime backend

Message ID 20121024131621.792772220@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti Oct. 24, 2012, 1:13 p.m. UTC
Required by next patch.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Glauber Costa Oct. 29, 2012, 2:47 p.m. UTC | #1
On 10/24/2012 05:13 PM, Marcelo Tosatti wrote:
> Required by next patch.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
I don't see where.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcelo Tosatti Oct. 29, 2012, 6:41 p.m. UTC | #2
On Mon, Oct 29, 2012 at 06:47:57PM +0400, Glauber Costa wrote:
> On 10/24/2012 05:13 PM, Marcelo Tosatti wrote:
> > Required by next patch.
> > 
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> I don't see where.

+       if (unlikely(!(flags & PVCLOCK_TSC_STABLE_BIT)))
+               *mode = VCLOCK_NONE;


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Glauber Costa Oct. 30, 2012, 7:42 a.m. UTC | #3
On 10/29/2012 10:41 PM, Marcelo Tosatti wrote:
> On Mon, Oct 29, 2012 at 06:47:57PM +0400, Glauber Costa wrote:
>> On 10/24/2012 05:13 PM, Marcelo Tosatti wrote:
>>> Required by next patch.
>>>
>>> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>> I don't see where.
> 
> +       if (unlikely(!(flags & PVCLOCK_TSC_STABLE_BIT)))
> +               *mode = VCLOCK_NONE;
> 
> 

I see. But I end up thinking that this is a case of oversimplification
that gets things more complicated =)

If this would be folded in the next patch, this would be obvious.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: vsyscall/arch/x86/vdso/vclock_gettime.c
===================================================================
--- vsyscall.orig/arch/x86/vdso/vclock_gettime.c
+++ vsyscall/arch/x86/vdso/vclock_gettime.c
@@ -80,7 +80,7 @@  notrace static long vdso_fallback_gtod(s
 }
 
 
-notrace static inline u64 vgetsns(void)
+notrace static inline u64 vgetsns(int *mode)
 {
 	long v;
 	cycles_t cycles;
@@ -107,7 +107,7 @@  notrace static int __always_inline do_re
 		mode = gtod->clock.vclock_mode;
 		ts->tv_sec = gtod->wall_time_sec;
 		ns = gtod->wall_time_snsec;
-		ns += vgetsns();
+		ns += vgetsns(&mode);
 		ns >>= gtod->clock.shift;
 	} while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
 
@@ -127,7 +127,7 @@  notrace static int do_monotonic(struct t
 		mode = gtod->clock.vclock_mode;
 		ts->tv_sec = gtod->monotonic_time_sec;
 		ns = gtod->monotonic_time_snsec;
-		ns += vgetsns();
+		ns += vgetsns(&mode);
 		ns >>= gtod->clock.shift;
 	} while (unlikely(read_seqcount_retry(&gtod->seq, seq)));
 	timespec_add_ns(ts, ns);