powerpc: add running_clock for powerpc to prevent spurious softlockup warnings
powerpc: add running_clock for powerpc to prevent spurious softlockup warnings

On POWER8 virtualised kernels the VTB register can be read to have a view
of time that only increases while the guest is running.  This will prevent
guests from seeing time jump if a guest is paused for significant amounts
of time.

On POWER7 and below virtualised kernels stolen time is subtracted from
local_clock as a best effort approximation.  This will not eliminate
spurious warnings in the case of a suspended guest but may reduce the
occurance in the case of softlockups due to host over commit.

Bare metal kernels should avoid reading the VTB as KVM does not restore
sane values when not executing, the approxmation is fine as host kernels
won't observe any stolen time.

[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: coding-style fixes]
Signed-off-by: Cyril Bur <99dea9acac81454e66986aa60f5d078ee8370e4c@gmail.com>
Cc: Michael Ellerman <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>
Cc: Andrew Jones <20ca6a98b2289e315ee985b8cb9cb36522e95d55@redhat.com>
Acked-by: Don Zickus <3c9a8cec2f33672bf03519b05ce2324e6cf5717a@redhat.com>
Cc: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>
Cc: Ulrich Obergfell <2f076acc3232878642c0aa405d54beec6cc1a760@redhat.com>
Cc: chai wen <051c5997308e82a9ff3256774a0e384348950abb@cn.fujitsu.com>
Cc: Fabian Frederick <3efd2a027b14fd890cd23a9ef6d1134b4e5ad850@skynet.be>
Cc: Aaron Tomlin <4ed61b0b61ab8b39dcdee4eca4730f0b305b3047@redhat.com>
Cc: Ben Zhang <db8778e62b312ccbd77ecba18560f4a84e4e16cf@chromium.org>
Cc: Martin Schwidefsky <52616596d8f5df0d597e85ab515377f92f939c68@de.ibm.com>
Cc: John Stultz <33837adfb53316eae44aad04041e1240088d76fd@linaro.org>
Cc: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs