Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Userland implementation of clock_getres() for 32 bits processes in a
 4 * s390 kernel for use in the vDSO
 5 *
 6 *  Copyright IBM Corp. 2008
 7 *  Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
 
 
 
 
 8 */
 9#include <asm/vdso.h>
10#include <asm/asm-offsets.h>
11#include <asm/unistd.h>
12#include <asm/dwarf.h>
13
14	.text
15	.align 4
16	.globl __kernel_clock_getres
17	.type  __kernel_clock_getres,@function
18__kernel_clock_getres:
19	CFI_STARTPROC
20	basr	%r1,0
21	la	%r1,4f-.(%r1)
22	chi	%r2,__CLOCK_REALTIME
23	je	0f
24	chi	%r2,__CLOCK_MONOTONIC
25	je	0f
26	la	%r1,5f-4f(%r1)
27	chi	%r2,__CLOCK_REALTIME_COARSE
28	je	0f
29	chi	%r2,__CLOCK_MONOTONIC_COARSE
30	jne	3f
310:	ltr	%r3,%r3
32	jz	2f				/* res == NULL */
331:	l	%r0,0(%r1)
 
34	xc	0(4,%r3),0(%r3)			/* set tp->tv_sec to zero */
35	st	%r0,4(%r3)			/* store tp->tv_usec */
362:	lhi	%r2,0
37	br	%r14
383:	lhi	%r1,__NR_clock_getres		/* fallback to svc */
39	svc	0
40	br	%r14
41	CFI_ENDPROC
424:	.long	__CLOCK_REALTIME_RES
435:	.long	__CLOCK_COARSE_RES
44	.size	__kernel_clock_getres,.-__kernel_clock_getres
v3.1
 
 1/*
 2 * Userland implementation of clock_getres() for 32 bits processes in a
 3 * s390 kernel for use in the vDSO
 4 *
 5 *  Copyright IBM Corp. 2008
 6 *  Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
 7 *
 8 * This program is free software; you can redistribute it and/or modify
 9 * it under the terms of the GNU General Public License (version 2 only)
10 * as published by the Free Software Foundation.
11 */
12#include <asm/vdso.h>
13#include <asm/asm-offsets.h>
14#include <asm/unistd.h>
 
15
16	.text
17	.align 4
18	.globl __kernel_clock_getres
19	.type  __kernel_clock_getres,@function
20__kernel_clock_getres:
21	.cfi_startproc
 
 
22	chi	%r2,__CLOCK_REALTIME
23	je	0f
24	chi	%r2,__CLOCK_MONOTONIC
 
 
 
 
 
25	jne	3f
260:	ltr	%r3,%r3
27	jz	2f				/* res == NULL */
28	basr	%r1,0
291:	l	%r0,4f-1b(%r1)
30	xc	0(4,%r3),0(%r3)			/* set tp->tv_sec to zero */
31	st	%r0,4(%r3)			/* store tp->tv_usec */
322:	lhi	%r2,0
33	br	%r14
343:	lhi	%r1,__NR_clock_getres		/* fallback to svc */
35	svc	0
36	br	%r14
 
374:	.long	__CLOCK_REALTIME_RES
38	.cfi_endproc
39	.size	__kernel_clock_getres,.-__kernel_clock_getres