All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@mvista.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.18-rt7 1/1] ARM: add latency timing support
Date: Tue, 07 Nov 2006 08:43:38 -0800	[thread overview]
Message-ID: <4550B7BA.7080906@mvista.com> (raw)
In-Reply-To: <20061107002140.662370000@mvista.com>

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Kevin Hilman wrote:
> Add latency-timing support for IXP4xx.

On second thought, here's a better patch that will cover all ARM
subarches.  Each sub-arch only has to implement mach_get_cycles()

Signed-off-by: Kevin Hilman <khilman@mvista.com>


[-- Attachment #2: arm_latency_timing.patch --]
[-- Type: text/x-patch, Size: 1616 bytes --]

Index: linux-2.6.18/include/asm-arm/arch-ixp4xx/timex.h
===================================================================
--- linux-2.6.18.orig/include/asm-arm/arch-ixp4xx/timex.h
+++ linux-2.6.18/include/asm-arm/arch-ixp4xx/timex.h
@@ -13,3 +13,5 @@
 #define FREQ 66666666
 #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
 
+extern u64 ixp4xx_get_cycles(void);
+#define mach_read_cycles() ixp4xx_get_cycles()
Index: linux-2.6.18/include/asm-arm/timex.h
===================================================================
--- linux-2.6.18.orig/include/asm-arm/timex.h
+++ linux-2.6.18/include/asm-arm/timex.h
@@ -18,10 +18,13 @@ typedef unsigned long cycles_t;
 
 #ifndef mach_read_cycles
  #define mach_read_cycles() (0)
-#ifdef CONFIG_LATENCY_TIMING
- #define mach_cycles_to_usecs(d) (d)
- #define mach_usecs_to_cycles(d) (d)
 #endif
+
+#ifdef CONFIG_LATENCY_TIMING
+ #define mach_cycles_to_usecs(d) \
+   (((d) * ((1000000LL << 32) / CLOCK_TICK_RATE)) >> 32)
+ #define mach_usecs_to_cycles(d) \
+   (((d) * (((long long)CLOCK_TICK_RATE << 32) / 1000000)) >> 32)
 #endif
 
 static inline cycles_t get_cycles (void)
Index: linux-2.6.18/include/asm-arm/arch-pxa/timex.h
===================================================================
--- linux-2.6.18.orig/include/asm-arm/arch-pxa/timex.h
+++ linux-2.6.18/include/asm-arm/arch-pxa/timex.h
@@ -26,5 +26,3 @@
 #endif
 
 #define mach_read_cycles() OSCR
-#define mach_cycles_to_usecs(d) (((d) * ((1000000LL << 32) / CLOCK_TICK_RATE)) >> 32)
-#define mach_usecs_to_cycles(d) (((d) * (((long long)CLOCK_TICK_RATE << 32) / 1000000)) >> 32)

      reply	other threads:[~2006-11-07 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07  0:21 [PATCH 2.6.18-rt7 1/1] ARM: add latency timing support Kevin Hilman
2006-11-07 16:43 ` Kevin Hilman [this message]

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=4550B7BA.7080906@mvista.com \
    --to=khilman@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.