Skip to content

Commit

Permalink
powerpc/time: Force inlining of get_tb()
Browse files Browse the repository at this point in the history
Force inlining of get_tb() in order to avoid getting
following function in vdso32, leading to suboptimal
performance in clock_gettime()

00000688 <.get_tb>:
 688:	7c 6d 42 a6 	mftbu   r3
 68c:	7c 8c 42 a6 	mftb    r4
 690:	7d 2d 42 a6 	mftbu   r9
 694:	7c 03 48 40 	cmplw   r3,r9
 698:	40 e2 ff f0 	bne+    688 <.get_tb>
 69c:	4e 80 00 20 	blr

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/df05d53eed1210cf1aa76d1fb44aa0fab29c018e.1608488286.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Dec 21, 2020
1 parent b36f835 commit 0faa22f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/vdso/timebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static inline unsigned long get_tbl(void)
return mftb();
}

static inline u64 get_tb(void)
static __always_inline u64 get_tb(void)
{
unsigned int tbhi, tblo, tbhi2;

Expand Down

0 comments on commit 0faa22f

Please sign in to comment.