]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] time_interpolator: Use readq_relaxed() instead of readq().
authorChristoph Lameter <clameter@engr.sgi.com>
Thu, 2 Mar 2006 10:54:35 +0000 (02:54 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Mar 2006 16:33:07 +0000 (08:33 -0800)
On some platforms readq performs additional work to make sure I/O is done
in a coherent way.  This is not needed for time retrieval as done by the
time interpolator.  So we can use readq_relaxed instead which will improve
performance.

It affects sparc64 and ia64 only.  Apparently it makes a significant
difference on ia64.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/timer.c

index fe3a9a9f832849bddbb3bf1be92268af99287aa9..fc6646fd5aabe74e4210f2f4d96e849d8800cc88 100644 (file)
@@ -1351,10 +1351,10 @@ static inline u64 time_interpolator_get_cycles(unsigned int src)
                        return x();
 
                case TIME_SOURCE_MMIO64 :
-                       return readq((void __iomem *) time_interpolator->addr);
+                       return readq_relaxed((void __iomem *)time_interpolator->addr);
 
                case TIME_SOURCE_MMIO32 :
-                       return readl((void __iomem *) time_interpolator->addr);
+                       return readl_relaxed((void __iomem *)time_interpolator->addr);
 
                default: return get_cycles();
        }