Skip to content

Commit c9aaf1b

Browse files
author
Fox Snowpatch
committed
1 parent 5165c17 commit c9aaf1b

File tree

1 file changed

+6
-2
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+6
-2
lines changed

arch/powerpc/platforms/pseries/lpar.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,12 @@ u64 pseries_paravirt_steal_clock(int cpu)
662662
{
663663
struct lppaca *lppaca = &lppaca_of(cpu);
664664

665-
return be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) +
666-
be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb));
665+
/*
666+
* VPA steal time counters are reported at TB frequency. Hence do a
667+
* conversion to ns before returning
668+
*/
669+
return tb_to_ns(be64_to_cpu(READ_ONCE(lppaca->enqueue_dispatch_tb)) +
670+
be64_to_cpu(READ_ONCE(lppaca->ready_enqueue_tb)));
667671
}
668672
#endif
669673

0 commit comments

Comments
 (0)