Re: [PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset
On Thu, Nov 08, 2012 at 02:01:46PM -0700, Stephen Warren wrote: > From: Stephen Warren > > Move usec to nsec conversion from arch_gettimeoffset() to > do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset() > will be used directly as the implementation of arch_gettimeoffset(), > so needs to perform all required calculations. > > Cc: Mikael Starvik > Cc: Jesper Nilsson Acked-by: Jesper Nilsson > Cc: linux-cris-ker...@axis.com > Signed-off-by: Stephen Warren > --- > arch/cris/arch-v10/kernel/time.c |4 ++-- > arch/cris/kernel/time.c |2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/cris/arch-v10/kernel/time.c > b/arch/cris/arch-v10/kernel/time.c > index bcffcb6..162892f 100644 > --- a/arch/cris/arch-v10/kernel/time.c > +++ b/arch/cris/arch-v10/kernel/time.c > @@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void) >*/ > count = *R_TIMER0_DATA; > > - /* Convert timer value to usec */ > - return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; > + /* Convert timer value to nsec */ > + return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; > } > > /* Excerpt from the Etrax100 HSDD about the built-in watchdog: > diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c > index 277ffc4..b063c92 100644 > --- a/arch/cris/kernel/time.c > +++ b/arch/cris/kernel/time.c > @@ -46,7 +46,7 @@ static unsigned long (*do_gettimeoffset)(void) = > do_slow_gettimeoffset; > > u32 arch_gettimeoffset(void) > { > - return do_gettimeoffset() * 1000; > + return do_gettimeoffset(); > } > #endif > > -- > 1.7.0.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nils...@axis.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset
On Thu, Nov 08, 2012 at 02:01:46PM -0700, Stephen Warren wrote: From: Stephen Warren swar...@nvidia.com Move usec to nsec conversion from arch_gettimeoffset() to do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset() will be used directly as the implementation of arch_gettimeoffset(), so needs to perform all required calculations. Cc: Mikael Starvik star...@axis.com Cc: Jesper Nilsson jesper.nils...@axis.com Acked-by: Jesper Nilsson jesper.nils...@axis.com Cc: linux-cris-ker...@axis.com Signed-off-by: Stephen Warren swar...@nvidia.com --- arch/cris/arch-v10/kernel/time.c |4 ++-- arch/cris/kernel/time.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index bcffcb6..162892f 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void) */ count = *R_TIMER0_DATA; - /* Convert timer value to usec */ - return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; + /* Convert timer value to nsec */ + return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; } /* Excerpt from the Etrax100 HSDD about the built-in watchdog: diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 277ffc4..b063c92 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c @@ -46,7 +46,7 @@ static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; u32 arch_gettimeoffset(void) { - return do_gettimeoffset() * 1000; + return do_gettimeoffset(); } #endif -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nils...@axis.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset
From: Stephen Warren Move usec to nsec conversion from arch_gettimeoffset() to do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset() will be used directly as the implementation of arch_gettimeoffset(), so needs to perform all required calculations. Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-ker...@axis.com Signed-off-by: Stephen Warren --- arch/cris/arch-v10/kernel/time.c |4 ++-- arch/cris/kernel/time.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index bcffcb6..162892f 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void) */ count = *R_TIMER0_DATA; - /* Convert timer value to usec */ - return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; + /* Convert timer value to nsec */ + return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; } /* Excerpt from the Etrax100 HSDD about the built-in watchdog: diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 277ffc4..b063c92 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c @@ -46,7 +46,7 @@ static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; u32 arch_gettimeoffset(void) { - return do_gettimeoffset() * 1000; + return do_gettimeoffset(); } #endif -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset
From: Stephen Warren swar...@nvidia.com Move usec to nsec conversion from arch_gettimeoffset() to do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset() will be used directly as the implementation of arch_gettimeoffset(), so needs to perform all required calculations. Cc: Mikael Starvik star...@axis.com Cc: Jesper Nilsson jesper.nils...@axis.com Cc: linux-cris-ker...@axis.com Signed-off-by: Stephen Warren swar...@nvidia.com --- arch/cris/arch-v10/kernel/time.c |4 ++-- arch/cris/kernel/time.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index bcffcb6..162892f 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void) */ count = *R_TIMER0_DATA; - /* Convert timer value to usec */ - return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; + /* Convert timer value to nsec */ + return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; } /* Excerpt from the Etrax100 HSDD about the built-in watchdog: diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 277ffc4..b063c92 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c @@ -46,7 +46,7 @@ static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset; u32 arch_gettimeoffset(void) { - return do_gettimeoffset() * 1000; + return do_gettimeoffset(); } #endif -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/