Skip to content
Commit 65c07e91 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik
Browse files

s390/current: Implement current with inline assembly



Implement current with an inline assembly, which makes use of the
ALTERNATIVE macro, to read current from lowcore. Provide an alternative
instruction with a different offset in case lowcore is relocated.

This replaces sequences of two instructions with one instruction.

Before:
 100076:       a5 1e 00 00             llilh   %r1,0
 10007a:       e3 40 13 40 00 04       lg      %r4,832(%r1)

After:
 100076:       e3 10 03 40 00 04       lg      %r1,832

Kernel image size change:
add/remove: 3/17 grow/shrink: 166/2204 up/down: 7122/-24594 (-17472)

Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 430693c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment