aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-08-02 07:54:01 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-20 13:26:47 +1100
commit51eeef9e135ac00cf706fad1a3bde775ca578462 (patch)
tree0beb2fa5d5334ab07df4be8de230469d346d54a7 /arch/powerpc/kernel
parentpowerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 (diff)
downloadlinux-dev-51eeef9e135ac00cf706fad1a3bde775ca578462.tar.xz
linux-dev-51eeef9e135ac00cf706fad1a3bde775ca578462.zip
powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected
If CONFIG_PPC_SPLPAR is not selected, steal_time will always be NUL, so accounting it is pointless Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9289fac75af7..3646affae963 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -413,8 +413,10 @@ void vtime_flush(struct task_struct *tsk)
if (acct->gtime)
account_guest_time(tsk, cputime_to_nsecs(acct->gtime));
- if (acct->steal_time)
+ if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) {
account_steal_time(cputime_to_nsecs(acct->steal_time));
+ acct->steal_time = 0;
+ }
if (acct->idle_time)
account_idle_time(cputime_to_nsecs(acct->idle_time));
@@ -434,7 +436,6 @@ void vtime_flush(struct task_struct *tsk)
acct->utime = 0;
acct->gtime = 0;
- acct->steal_time = 0;
acct->idle_time = 0;
acct->stime = 0;
acct->hardirq_time = 0;