lkml.org 
[lkml]   [2010]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] Add nsecs_to_cputime64 interface for asm-generic -v2
On Tue, 21 Dec 2010 17:09:01 -0800
Venkatesh Pallipadi <venki@google.com> wrote:

> Add nsecs_to_cputime64 interface. This is used in following patches that
> updates cpu irq stat based on ns granularity info in IRQ_TIME_ACCOUNTING.
>
> Tested-by: Shaun Ruffell <sruffell@digium.com>
> Signed-off-by: Venkatesh Pallipadi <venki@google.com>
> ---
> include/asm-generic/cputime.h | 3 +++
> include/linux/jiffies.h | 1 +
> kernel/time.c | 23 +++++++++++++++++++++--
> 3 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
> index 2bcc5c7..61e03dd 100644
> --- a/include/asm-generic/cputime.h
> +++ b/include/asm-generic/cputime.h
> @@ -30,6 +30,9 @@ typedef u64 cputime64_t;
> #define cputime64_to_jiffies64(__ct) (__ct)
> #define jiffies64_to_cputime64(__jif) (__jif)
> #define cputime_to_cputime64(__ct) ((u64) __ct)
> +#define cputime64_gt(__a, __b) ((__a) > (__b))
> +
> +#define nsecs_to_cputime64(__ct) nsecs_to_jiffies64(__ct)
>
>
> /*

If you define a new cputime primitive it is not enough to add it to the
generic cputime header. You have to add it to the arch-specific cputime
header for ia64, powerpc and s390 as well. Otherwise the build will
break with CONFIG_VIRT_CPU_ACCOUNTING=y on these architectures once the
new primitive is used.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.



\
 
 \ /
  Last update: 2010-12-22 09:33    [W:0.793 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site