]> Git Repo - linux.git/blob - arch/s390/kernel/vdso64/getcpu.S
enetc: Migrate to PHYLINK and PCS_LYNX
[linux.git] / arch / s390 / kernel / vdso64 / getcpu.S
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Userland implementation of getcpu() for 64 bits processes in a
4  * s390 kernel for use in the vDSO
5  *
6  *  Copyright IBM Corp. 2016
7  *  Author(s): Martin Schwidefsky <[email protected]>
8  */
9 #include <asm/vdso.h>
10 #include <asm/asm-offsets.h>
11 #include <asm/dwarf.h>
12
13         .text
14         .align 4
15         .globl __kernel_getcpu
16         .type  __kernel_getcpu,@function
17 __kernel_getcpu:
18         CFI_STARTPROC
19         sacf    256
20         lm      %r4,%r5,__VDSO_GETCPU_VAL(%r0)
21         sacf    0
22         ltgr    %r2,%r2
23         jz      2f
24         st      %r5,0(%r2)
25 2:      ltgr    %r3,%r3
26         jz      3f
27         st      %r4,0(%r3)
28 3:      lghi    %r2,0
29         br      %r14
30         CFI_ENDPROC
31         .size   __kernel_getcpu,.-__kernel_getcpu
This page took 0.035318 seconds and 4 git commands to generate.