File tree Expand file tree Collapse file tree 2 files changed +45
-51
lines changed Expand file tree Collapse file tree 2 files changed +45
-51
lines changed Original file line number Diff line number Diff line change 22#ifndef _ASM_POWERPC_VDSO_GETTIMEOFDAY_H
33#define _ASM_POWERPC_VDSO_GETTIMEOFDAY_H
44
5- #include <asm/page.h>
6-
7- #ifdef __ASSEMBLY__
8-
9- #include <asm/ppc_asm.h>
10-
11- /*
12- * The macro sets two stack frames, one for the caller and one for the callee
13- * because there are no requirement for the caller to set a stack frame when
14- * calling VDSO so it may have omitted to set one, especially on PPC64
15- */
16-
17- .macro cvdso_call funct call_time = 0
18- .cfi_startproc
19- PPC_STLU r1 , - PPC_MIN_STKFRM (r1 )
20- mflr r0
21- .cfi_register lr , r0
22- PPC_STLU r1 , - PPC_MIN_STKFRM (r1 )
23- PPC_STL r0 , PPC_MIN_STKFRM + PPC_LR_STKOFF (r1 )
24- #ifdef __powerpc64__
25- PPC_STL r2 , PPC_MIN_STKFRM + STK_GOT (r1 )
26- #endif
27- get_datapage r5
28- .ifeq \call_time
29- addi r5 , r5 , VDSO_DATA_OFFSET
30- .else
31- addi r4 , r5 , VDSO_DATA_OFFSET
32- .endif
33- bl DOTSYM (\funct )
34- PPC_LL r0 , PPC_MIN_STKFRM + PPC_LR_STKOFF (r1 )
35- #ifdef __powerpc64__
36- PPC_LL r2 , PPC_MIN_STKFRM + STK_GOT (r1 )
37- #endif
38- .ifeq \call_time
39- cmpwi r3 , 0
40- .endif
41- mtlr r0
42- .cfi_restore lr
43- addi r1 , r1 , 2 * PPC_MIN_STKFRM
44- crclr so
45- .ifeq \call_time
46- beqlr +
47- crset so
48- neg r3 , r3
49- .endif
50- blr
51- .cfi_endproc
52- .endm
53-
54- #else
5+ #ifndef __ASSEMBLY__
556
7+ #include <asm/page.h>
568#include <asm/vdso/timebase.h>
579#include <asm/barrier.h>
5810#include <asm/unistd.h>
Original file line number Diff line number Diff line change 1212#include <asm/vdso_datapage.h>
1313#include <asm/asm-offsets.h>
1414#include <asm/unistd.h>
15- #include <asm/vdso/gettimeofday.h>
15+
16+ /*
17+ * The macro sets two stack frames, one for the caller and one for the callee
18+ * because there are no requirement for the caller to set a stack frame when
19+ * calling VDSO so it may have omitted to set one, especially on PPC64
20+ */
21+
22+ .macro cvdso_call funct call_time =0
23+ .cfi_startproc
24+ PPC_STLU r1, -PPC_MIN_STKFRM(r1)
25+ mflr r0
26+ .cfi_register lr, r0
27+ PPC_STLU r1, -PPC_MIN_STKFRM(r1)
28+ PPC_STL r0, PPC_MIN_STKFRM + PPC_LR_STKOFF(r1)
29+ #ifdef __powerpc64__
30+ PPC_STL r2, PPC_MIN_STKFRM + STK_GOT(r1)
31+ #endif
32+ get_datapage r5
33+ .ifeq \call_time
34+ addi r5, r5, VDSO_DATA_OFFSET
35+ .else
36+ addi r4, r5, VDSO_DATA_OFFSET
37+ .endif
38+ bl DOTSYM(\funct)
39+ PPC_LL r0, PPC_MIN_STKFRM + PPC_LR_STKOFF(r1)
40+ #ifdef __powerpc64__
41+ PPC_LL r2, PPC_MIN_STKFRM + STK_GOT(r1)
42+ #endif
43+ .ifeq \call_time
44+ cmpwi r3, 0
45+ .endif
46+ mtlr r0
47+ .cfi_restore lr
48+ addi r1, r1, 2 * PPC_MIN_STKFRM
49+ crclr so
50+ .ifeq \call_time
51+ beqlr+
52+ crset so
53+ neg r3, r3
54+ .endif
55+ blr
56+ .cfi_endproc
57+ .endm
1658
1759 .text
1860/*
You can’t perform that action at this time.
0 commit comments