Skip to content

Commit

Permalink
[PATCH] time_interpolator: Use readq_relaxed() instead of readq().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: john stultz <[email protected]>
Cc: "David S. Miller" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 2, 2006
1 parent 7f99f06 commit 685db65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 685db65

Please sign in to comment.