]> git.baikalelectronics.ru Git - kernel.git/commit
x86/tsc: Validate TSC_ADJUST after resume
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Dec 2016 13:14:17 +0000 (13:14 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 Dec 2016 10:44:29 +0000 (11:44 +0100)
commit351ab103ca7d5398fa0c456806b45325f8a3712c
treeeaaebee6ac4102b724483d19a1c6f920c5406b67
parent2da2360656a4ad96c8b81586d83334fea3fce098
x86/tsc: Validate TSC_ADJUST after resume

Some 'feature' BIOSes fiddle with the TSC_ADJUST register during
suspend/resume which renders the TSC unusable.

Add sanity checks into the resume path and restore the
original value if it was adjusted.

Reported-and-tested-by: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bruce Schlobohm <bruce.schlobohm@intel.com>
Cc: Kevin Stanton <kevin.b.stanton@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Allen Hung <allen_hung@dell.com>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/20161213131211.317654500@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/tsc.h
arch/x86/kernel/process.c
arch/x86/kernel/tsc.c
arch/x86/kernel/tsc_sync.c
arch/x86/power/cpu.c