Root/
1 | /* |
2 | * Userland implementation of clock_getres() for 64 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 | cghi %r2,__CLOCK_REALTIME |
23 | je 0f |
24 | cghi %r2,__CLOCK_MONOTONIC |
25 | je 0f |
26 | cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ |
27 | jne 2f |
28 | larl %r5,_vdso_data |
29 | icm %r0,15,__LC_ECTG_OK(%r5) |
30 | jz 2f |
31 | 0: ltgr %r3,%r3 |
32 | jz 1f /* res == NULL */ |
33 | larl %r1,3f |
34 | lg %r0,0(%r1) |
35 | xc 0(8,%r3),0(%r3) /* set tp->tv_sec to zero */ |
36 | stg %r0,8(%r3) /* store tp->tv_usec */ |
37 | 1: lghi %r2,0 |
38 | br %r14 |
39 | 2: lghi %r1,__NR_clock_getres /* fallback to svc */ |
40 | svc 0 |
41 | br %r14 |
42 | 3: .quad __CLOCK_REALTIME_RES |
43 | .cfi_endproc |
44 | .size __kernel_clock_getres,.-__kernel_clock_getres |
45 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9