aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-08-02 03:54:01 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-19 22:26:47 -0400
commit51eeef9e135ac00cf706fad1a3bde775ca578462 (patch)
tree0beb2fa5d5334ab07df4be8de230469d346d54a7
parentabcff86df2d2ec0a0ca9470fa5d2a184af18928a (diff)
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>
-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)
413 if (acct->gtime) 413 if (acct->gtime)
414 account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); 414 account_guest_time(tsk, cputime_to_nsecs(acct->gtime));
415 415
416 if (acct->steal_time) 416 if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) {
417 account_steal_time(cputime_to_nsecs(acct->steal_time)); 417 account_steal_time(cputime_to_nsecs(acct->steal_time));
418 acct->steal_time = 0;
419 }
418 420
419 if (acct->idle_time) 421 if (acct->idle_time)
420 account_idle_time(cputime_to_nsecs(acct->idle_time)); 422 account_idle_time(cputime_to_nsecs(acct->idle_time));
@@ -434,7 +436,6 @@ void vtime_flush(struct task_struct *tsk)
434 436
435 acct->utime = 0; 437 acct->utime = 0;
436 acct->gtime = 0; 438 acct->gtime = 0;
437 acct->steal_time = 0;
438 acct->idle_time = 0; 439 acct->idle_time = 0;
439 acct->stime = 0; 440 acct->stime = 0;
440 acct->hardirq_time = 0; 441 acct->hardirq_time = 0;