Messages in this thread Patch in this message | | | Date | Wed, 15 Nov 2017 19:15:33 +0100 | From | Thomas Gleixner <> | Subject | [RFC patch 2/7] x86/tsc: Set clocksource CLOCK_SOURCE_SUSPEND_ACCESS_OK |
| |
When TSC is non stop accross suspend then it can be accessed after timekeeping_suspend(). Set the proper flag to indicate that.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/kernel/tsc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Index: b/arch/x86/kernel/tsc.c =================================================================== --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -1240,8 +1240,10 @@ static int __init init_tsc_clocksource(v clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; } - if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC_S3)) - clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP; + if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC_S3)) { + clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP | + CLOCK_SOURCE_SUSPEND_ACCESS_OK; + } /* * When TSC frequency is known (retrieved via MSR or CPUID), we skip
| |