time_interpolator: Use readq_relaxed() instead of readq().

From: Christoph Lameter
Date: Thu Feb 23 2006 - 17:09:37 EST


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.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

Index: linux-2.6.16-rc4/kernel/timer.c
===================================================================
--- linux-2.6.16-rc4.orig/kernel/timer.c 2006-02-17 14:23:45.000000000 -0800
+++ linux-2.6.16-rc4/kernel/timer.c 2006-02-23 14:03:02.000000000 -0800
@@ -1351,10 +1351,10 @@ static inline u64 time_interpolator_get_
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();
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/