linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: vipul kumar <vipulk0511@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>,
	Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	Vipul Kumar <vipul_kumar@mentor.com>,
	x86@kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Len Brown <len.brown@intel.com>
Subject: Re: [PATCH] x86/tsc: Unset TSC_KNOWN_FREQ and TSC_RELIABLE flags on Intel Bay Trail SoC
Date: Fri, 17 Jan 2020 10:36:21 +0100	[thread overview]
Message-ID: <871rrye86i.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CADdC98RwESeK_nNXfiF00vdUdQSwN08sM+zt8-se6OdrhA_h2w@mail.gmail.com>

Vipul,

vipul kumar <vipulk0511@gmail.com> writes:
> On Fri, Jan 17, 2020 at 3:34 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>> Vipul Kumar <vipulk0511@gmail.com> writes:
>> Can you please provide detailed data about the problem you are trying to
>> solve? 'time drift' is pretty unspecific.
>
> After running board for some days without rebooting it, time drift is
> observed between system time and RTC time.
>
> SystemTime: 2019-11-08T15:48:46+00:00 RTC Time:   2019-11-08
> 15:44:35.976137+0000 Uptime: up 7 days 5 hours, 33 minutes
>
> This sample shows a difference of 4 minutes after 7 days.

Of course you fail to provide the data for the case where the frequency
is recalibrated, i.e. with your patch applied.

> To fix this drift issue, disable X86_FEATURE_TSC_KNOWN_FREQ flag for Soc's
> having  cpuid_level < 0x15.

Again, I explained you already that this does not work on SoCs which do
not expose HPET or PIT.

And again, it has absolutely nothing to do with the CPUID level because
these chips are not using CPUID to retrieve the frequency
information. They use cpu_khz_from_msr() which only depends on the CPU
model/family.

So if you want to enforce refined calibration on such systems, then you
need to do it in a way which does not break the world.

Thanks,

        tglx



      parent reply	other threads:[~2020-01-17  9:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 15:30 [PATCH] x86/tsc: Unset TSC_KNOWN_FREQ and TSC_RELIABLE flags on Intel Bay Trail SoC Vipul Kumar
2019-12-18 16:26 ` Greg KH
2020-01-16 22:04 ` Thomas Gleixner
     [not found]   ` <CADdC98RwESeK_nNXfiF00vdUdQSwN08sM+zt8-se6OdrhA_h2w@mail.gmail.com>
2020-01-17  9:36     ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rrye86i.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=Cedric_Hombourger@mentor.com \
    --cc=Srikanth_Krishnakar@mentor.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vipul_kumar@mentor.com \
    --cc=vipulk0511@gmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).