This macro reads atomically the 64-bit TSC register. Reading the 64-bit register using two 32-bit instructions sometimes causes wrapping when a clock update appears in between. A single 64-bit read fixes this. Signed-off-by: Gilles Carry <gilles.carry@bull.net>. Cc: Tim Chavez <tinytim@us.ibm.com>.
I suppose the right thing to do in the long run would be to rename this function to something more generic: read_hw_clock() or something like that.  But I think this patch performs the first step in getting it working on ppc64. Acked-by: Darren Hart <dvhltc@us.ibm.com>.
1 file changed