Re: [PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-21 Thread Thomas Gleixner
On Fri, 21 Oct 2016, Peter Zijlstra wrote: > On Thu, Oct 20, 2016 at 09:37:50PM +0200, Thomas Gleixner wrote: > > > Well, we have the same issue on other platforms/models which set the > > reliable flag. > > I was not aware we had other platforms doing this, git grep tells me > intel-mid does thi

Re: [PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-20 Thread Peter Zijlstra
On Thu, Oct 20, 2016 at 09:37:50PM +0200, Thomas Gleixner wrote: > Well, we have the same issue on other platforms/models which set the > reliable flag. I was not aware we had other platforms doing this, git grep tells me intel-mid does this as well.. > So one sanity check we can do is to read t

Re: [PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-20 Thread Thomas Gleixner
On Thu, 20 Oct 2016, Peter Zijlstra wrote: > On Thu, Oct 20, 2016 at 11:57:03AM +0200, Thomas Gleixner wrote: > > On Thu, 13 Oct 2016, Bin Gao wrote: > > > @@ -702,6 +702,15 @@ unsigned long native_calibrate_tsc(void) > > > } > > > } > > > > > > + setup_force_cpu_cap(X86_FEATURE_TSC_K

Re: [PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-20 Thread Peter Zijlstra
On Thu, Oct 20, 2016 at 11:57:03AM +0200, Thomas Gleixner wrote: > On Thu, 13 Oct 2016, Bin Gao wrote: > > @@ -702,6 +702,15 @@ unsigned long native_calibrate_tsc(void) > > } > > } > > > > + setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ); > > + > > + /* > > +* For Atom So

Re: [PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-20 Thread Thomas Gleixner
On Thu, 13 Oct 2016, Bin Gao wrote: > @@ -702,6 +702,15 @@ unsigned long native_calibrate_tsc(void) > } > } > > + setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ); > + > + /* > + * For Atom SoCs TSC is the only reliable clocksource. > + * Mark TSC reliable so

[PATCH v3] x86/tsc: add X86_FEATURE_TSC_KNOWN_FREQ flag

2016-10-13 Thread Bin Gao
The X86_FEATURE_TSC_RELIABLE flag in Linux kernel implies both reliable (at runtime) and trustable (at calibration). But reliable running and trustable calibration are logically irrelevant. Per Thomas Gleixner's suggestion we would like to split this flag into two separate flags: X86_FEATURE_TSC_RE