linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Nilsson <jesper.nilsson@axis.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
	John Stultz <johnstul@us.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Stephen Warren <swarren@nvidia.com>,
	Mikael Starvik <starvik@axis.com>,
	linux-cris-kernel@axis.com
Subject: Re: [PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset
Date: Mon, 12 Nov 2012 11:44:56 +0100	[thread overview]
Message-ID: <20121112104456.GM2834@axis.com> (raw)
In-Reply-To: <1352408516-21988-3-git-send-email-swarren@wwwdotorg.org>

On Thu, Nov 08, 2012 at 02:01:46PM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@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 <starvik@axis.com>
> Cc: Jesper Nilsson <jesper.nilsson@axis.com>

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>

> Cc: linux-cris-kernel@axis.com
> Signed-off-by: Stephen Warren <swarren@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 majordomo@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.nilsson@axis.com

  parent reply	other threads:[~2012-11-12 10:44 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-08 21:01 [RFC PATCH 00/11] arch_gettimeoffset and ARM timer rework Stephen Warren
2012-11-08 21:01 ` Stephen Warren
2012-11-08 21:01 ` [PATCH] ARM: delete struct sys_timer Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-08 21:04   ` Stephen Warren
2012-11-08 21:04     ` Stephen Warren
2012-11-08 21:01 ` [PATCH 01/11] cris: move usec/nsec conversion to do_slow_gettimeoffset Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-12 10:44   ` Jesper Nilsson [this message]
2012-11-12 10:44     ` Jesper Nilsson
2012-11-08 21:01 ` [PATCH 02/11] time: convert arch_gettimeoffset to a pointer Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-09 23:02   ` John Stultz
2012-11-09 23:02     ` John Stultz
2012-11-11  9:45   ` Geert Uytterhoeven
2012-11-12 10:46   ` Jesper Nilsson
2012-11-12 10:46     ` Jesper Nilsson
2012-11-08 21:01 ` [PATCH 03/11] m68k: set arch_gettimeoffset directly Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-11  9:50   ` Geert Uytterhoeven
2012-11-11  9:50     ` Geert Uytterhoeven
2012-11-11 11:47   ` Phil Blundell
2012-11-11 11:47     ` Phil Blundell
2012-11-08 21:01 ` [PATCH 04/11] ARM: " Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-08 23:06   ` Ryan Mallon
2012-11-09 21:07     ` Stephen Warren
2012-11-10  3:39       ` Ryan Mallon
2012-11-08 21:01 ` [PATCH 05/11] ARM: at91: convert timer suspend/resume to clock_event_device Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-12 14:49   ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-12 14:49     ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-08 21:01 ` [PATCH 06/11] ARM: pxa: " Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-09  2:05   ` Eric Miao
2012-11-08 21:01 ` [PATCH 07/11] ARM: sa1100: " Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-08 21:01 ` [PATCH 08/11] ARM: ux500: " Stephen Warren
2012-11-08 21:01   ` Stephen Warren
2012-11-08 21:01 ` [PATCH 09/11] ARM: samsung: register syscore_ops for timer resume directly Stephen Warren
2012-11-08 21:01 ` [PATCH 10/11] ARM: remove struct sys_timer suspend and resume fields Stephen Warren
2012-11-08 21:01 ` [RFC PATCH 11/11] ARM: delete struct sys_timer Stephen Warren
2012-11-09 20:55 ` [PATCH V2 " Stephen Warren
2012-11-12 14:17 ` [RFC PATCH 00/11] arch_gettimeoffset and ARM timer rework Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121112104456.GM2834@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=arnd@arndb.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=starvik@axis.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).