mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 01:13:11 +00:00
powerpc: Add cputime_to_nsecs()
Generic code has a wrapper to implement cputime_to_nsecs() on top of cputime_to_usecs() but we can easily return the full nanosecond resolution directly. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
committed by
Michael Ellerman
parent
e4208f1399
commit
ade7667a98
@@ -36,6 +36,8 @@ static inline unsigned long cputime_to_usecs(const cputime_t ct)
|
||||
return mulhdu((__force u64) ct, __cputime_usec_factor);
|
||||
}
|
||||
|
||||
#define cputime_to_nsecs(cputime) tb_to_ns((__force u64)cputime)
|
||||
|
||||
/*
|
||||
* PPC64 uses PACA which is task independent for storing accounting data while
|
||||
* PPC32 uses struct thread_info, therefore at task switch the accounting data
|
||||
|
||||
Reference in New Issue
Block a user