summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/time.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-10-01 15:42:41 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-10-08 13:17:15 +0300
commit942e89115b588b4b5df86930b5302a5c07b820ba (patch)
tree38985f10bbf1965edbb56f838efce713997f770e /arch/powerpc/include/asm/time.h
parentff125fbcd45d1706861579dbe66e31f5b3f1e779 (diff)
downloadlinux-942e89115b588b4b5df86930b5302a5c07b820ba.tar.xz
powerpc/time: Avoid using get_tbl() and get_tbu() internally
get_tbl() is confusing as it returns the content of TBL register on PPC32 but the concatenation of TBL and TBU on PPC64. Use mftb() instead. Do the same with get_tbu() for consistency allthough it's name is less confusing. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/41573406a4eab98838decaa91649086fef1e6119.1601556145.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/time.h')
-rw-r--r--arch/powerpc/include/asm/time.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
index 6e681160981b..c83116ec79c3 100644
--- a/arch/powerpc/include/asm/time.h
+++ b/arch/powerpc/include/asm/time.h
@@ -76,9 +76,9 @@ static inline u64 get_tb(void)
unsigned int tbhi, tblo, tbhi2;
do {
- tbhi = get_tbu();
- tblo = get_tbl();
- tbhi2 = get_tbu();
+ tbhi = mftbu();
+ tblo = mftb();
+ tbhi2 = mftbu();
} while (tbhi != tbhi2);
return ((u64)tbhi << 32) | tblo;
@@ -123,7 +123,7 @@ static inline void set_dec(u64 val)
static inline unsigned long tb_ticks_since(unsigned long tstamp)
{
- return get_tbl() - tstamp;
+ return mftb() - tstamp;
}
#define mulhwu(x,y) \