From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752450AbbGENG4 (ORCPT ); Sun, 5 Jul 2015 09:06:56 -0400 Received: from www.linutronix.de ([62.245.132.108]:51835 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbbGENGb (ORCPT ); Sun, 5 Jul 2015 09:06:31 -0400 Date: Sat, 4 Jul 2015 10:10:32 +0200 (CEST) From: Thomas Gleixner To: "K. Y. Srinivasan" cc: x86@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, Vivek yadav Subject: Re: [PATCH 1/1] x86: Hyper-V: Mark the Hyper-V clocksource as being high resolution In-Reply-To: <1435966643-3476-1-git-send-email-kys@microsoft.com> Message-ID: References: <1435966643-3476-1-git-send-email-kys@microsoft.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Jul 2015, K. Y. Srinivasan wrote: > From: Vivek yadav > > By design, alternative clock sources listed are based on the resolution of > current clock source. Once you set a high resolution clock, > only high resolution sources are returned. > Mark Hyper-V clock source as a high resolution clock source. > > Signed-off-by: Vivek yadav > Signed-off-by: K. Y. Srinivasan > --- > arch/x86/kernel/cpu/mshyperv.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > index 9b5d7b5..0e507a0 100644 > --- a/arch/x86/kernel/cpu/mshyperv.c > +++ b/arch/x86/kernel/cpu/mshyperv.c > @@ -151,7 +151,8 @@ static struct clocksource hyperv_cs = { > .rating = 400, /* use this when running on Hyperv*/ > .read = read_hv_clock, > .mask = CLOCKSOURCE_MASK(64), > - .flags = CLOCK_SOURCE_IS_CONTINUOUS, > + .flags = CLOCK_SOURCE_IS_CONTINUOUS | > + CLOCK_SOURCE_VALID_FOR_HRES, No, this is wrong. The CLOCK_SOURCE_VALID_FOR_HRES flag is managed by the core code and set when a clocksource fulfils the criteria. The changelog above is not explaining what problem you are trying to solve. Thanks, tglx