Skip to content

Commit 4a2bfe7

Browse files
committed
powerpc/vdso: Remove cvdso_call_time macro
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Christophe Leroy <[email protected]> commit 9b97bea cvdso_call_time macro is very similar to cvdso_call macro. Add a call_time argument to cvdso_call which is 0 by default and set to 1 when using cvdso_call to call __c_kernel_time(). Return returned value as is with CR[SO] cleared when it is used for time(). Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/837a260ad86fc1ce297a562c2117fd69be5f7b5c.1642782130.git.christophe.leroy@csgroup.eu (cherry picked from commit 9b97bea) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 4b433e3 commit 4a2bfe7

File tree

2 files changed

+11
-28
lines changed

2 files changed

+11
-28
lines changed

arch/powerpc/include/asm/vdso/gettimeofday.h

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#include <asm/ppc_asm.h>
1010

1111
/*
12-
* The macros sets two stack frames, one for the caller and one for the callee
12+
* The macro sets two stack frames, one for the caller and one for the callee
1313
* because there are no requirement for the caller to set a stack frame when
1414
* calling VDSO so it may have omitted to set one, especially on PPC64
1515
*/
1616

17-
.macro cvdso_call funct
17+
.macro cvdso_call funct call_time=0
1818
.cfi_startproc
1919
PPC_STLU r1, -PPC_MIN_STKFRM(r1)
2020
mflr r0
@@ -25,45 +25,28 @@
2525
PPC_STL r2, PPC_MIN_STKFRM + STK_GOT(r1)
2626
#endif
2727
get_datapage r5
28+
.ifeq \call_time
2829
addi r5, r5, VDSO_DATA_OFFSET
30+
.else
31+
addi r4, r5, VDSO_DATA_OFFSET
32+
.endif
2933
bl DOTSYM(\funct)
3034
PPC_LL r0, PPC_MIN_STKFRM + PPC_LR_STKOFF(r1)
3135
#ifdef __powerpc64__
3236
PPC_LL r2, PPC_MIN_STKFRM + STK_GOT(r1)
3337
#endif
38+
.ifeq \call_time
3439
cmpwi r3, 0
40+
.endif
3541
mtlr r0
3642
.cfi_restore lr
3743
addi r1, r1, 2 * PPC_MIN_STKFRM
3844
crclr so
45+
.ifeq \call_time
3946
beqlr+
4047
crset so
4148
neg r3, r3
42-
blr
43-
.cfi_endproc
44-
.endm
45-
46-
.macro cvdso_call_time funct
47-
.cfi_startproc
48-
PPC_STLU r1, -PPC_MIN_STKFRM(r1)
49-
mflr r0
50-
.cfi_register lr, r0
51-
PPC_STLU r1, -PPC_MIN_STKFRM(r1)
52-
PPC_STL r0, PPC_MIN_STKFRM + PPC_LR_STKOFF(r1)
53-
#ifdef __powerpc64__
54-
PPC_STL r2, PPC_MIN_STKFRM + STK_GOT(r1)
55-
#endif
56-
get_datapage r4
57-
addi r4, r4, VDSO_DATA_OFFSET
58-
bl DOTSYM(\funct)
59-
PPC_LL r0, PPC_MIN_STKFRM + PPC_LR_STKOFF(r1)
60-
#ifdef __powerpc64__
61-
PPC_LL r2, PPC_MIN_STKFRM + STK_GOT(r1)
62-
#endif
63-
crclr so
64-
mtlr r0
65-
.cfi_restore lr
66-
addi r1, r1, 2 * PPC_MIN_STKFRM
49+
.endif
6750
blr
6851
.cfi_endproc
6952
.endm

arch/powerpc/kernel/vdso32/gettimeofday.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ V_FUNCTION_END(__kernel_clock_getres)
6565
*
6666
*/
6767
V_FUNCTION_BEGIN(__kernel_time)
68-
cvdso_call_time __c_kernel_time
68+
cvdso_call __c_kernel_time call_time=1
6969
V_FUNCTION_END(__kernel_time)
7070

7171
/* Routines for restoring integer registers, called by the compiler. */

0 commit comments

Comments
 (0)