s390/vdso: remove NULL pointer check from clock_gettime
The explicit NULL pointer check on the timespec argument is only required for clock_getres but not for clock_gettime. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Родитель
6992860167
Коммит
5da76157a4
|
@ -22,13 +22,11 @@ __kernel_clock_gettime:
|
|||
basr %r5,0
|
||||
0: al %r5,21f-0b(%r5) /* get &_vdso_data */
|
||||
chi %r2,__CLOCK_REALTIME
|
||||
je 10f
|
||||
je 11f
|
||||
chi %r2,__CLOCK_MONOTONIC
|
||||
jne 19f
|
||||
|
||||
/* CLOCK_MONOTONIC */
|
||||
ltr %r3,%r3
|
||||
jz 9f /* tp == NULL */
|
||||
1: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */
|
||||
tml %r4,0x0001 /* pending update ? loop */
|
||||
jnz 1b
|
||||
|
@ -67,12 +65,10 @@ __kernel_clock_gettime:
|
|||
j 6b
|
||||
8: st %r2,0(%r3) /* store tp->tv_sec */
|
||||
st %r1,4(%r3) /* store tp->tv_nsec */
|
||||
9: lhi %r2,0
|
||||
lhi %r2,0
|
||||
br %r14
|
||||
|
||||
/* CLOCK_REALTIME */
|
||||
10: ltr %r3,%r3 /* tp == NULL */
|
||||
jz 18f
|
||||
11: l %r4,__VDSO_UPD_COUNT+4(%r5) /* load update counter */
|
||||
tml %r4,0x0001 /* pending update ? loop */
|
||||
jnz 11b
|
||||
|
@ -111,7 +107,7 @@ __kernel_clock_gettime:
|
|||
j 15b
|
||||
17: st %r2,0(%r3) /* store tp->tv_sec */
|
||||
st %r1,4(%r3) /* store tp->tv_nsec */
|
||||
18: lhi %r2,0
|
||||
lhi %r2,0
|
||||
br %r14
|
||||
|
||||
/* Fallback to system call */
|
||||
|
|
|
@ -21,7 +21,7 @@ __kernel_clock_gettime:
|
|||
.cfi_startproc
|
||||
larl %r5,_vdso_data
|
||||
cghi %r2,__CLOCK_REALTIME
|
||||
je 4f
|
||||
je 5f
|
||||
cghi %r2,__CLOCK_THREAD_CPUTIME_ID
|
||||
je 9f
|
||||
cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
|
||||
|
@ -30,8 +30,6 @@ __kernel_clock_gettime:
|
|||
jne 12f
|
||||
|
||||
/* CLOCK_MONOTONIC */
|
||||
ltgr %r3,%r3
|
||||
jz 3f /* tp == NULL */
|
||||
0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */
|
||||
tmll %r4,0x0001 /* pending update ? loop */
|
||||
jnz 0b
|
||||
|
@ -53,12 +51,10 @@ __kernel_clock_gettime:
|
|||
j 1b
|
||||
2: stg %r0,0(%r3) /* store tp->tv_sec */
|
||||
stg %r1,8(%r3) /* store tp->tv_nsec */
|
||||
3: lghi %r2,0
|
||||
lghi %r2,0
|
||||
br %r14
|
||||
|
||||
/* CLOCK_REALTIME */
|
||||
4: ltr %r3,%r3 /* tp == NULL */
|
||||
jz 8f
|
||||
5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */
|
||||
tmll %r4,0x0001 /* pending update ? loop */
|
||||
jnz 5b
|
||||
|
@ -80,7 +76,7 @@ __kernel_clock_gettime:
|
|||
j 6b
|
||||
7: stg %r0,0(%r3) /* store tp->tv_sec */
|
||||
stg %r1,8(%r3) /* store tp->tv_nsec */
|
||||
8: lghi %r2,0
|
||||
lghi %r2,0
|
||||
br %r14
|
||||
|
||||
/* CLOCK_THREAD_CPUTIME_ID for this thread */
|
||||
|
|
Загрузка…
Ссылка в новой задаче