diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-08 11:20:04 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-29 10:11:39 +0300 |
commit | 22362a0e23182d230527a5add690b4027860d7d3 (patch) | |
tree | fbdd8176032b6351e78d0a02525459a9e9ec4f34 /arch/s390/include/asm/processor.h | |
parent | 1d2334cb7da37e4b0005ca1d194d4e10ca7119f4 (diff) | |
download | linux-22362a0e23182d230527a5add690b4027860d7d3.tar.xz |
s390/sclp: convert early sclp console code to C
The 31-bit assembler code for the early sclp console is error
prone as git commit fde24b54d976cc123506695c17db01438a11b673
"s390/sclp: clear upper register halves in _sclp_print_early"
has shown.
Convert the assembler code to C.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r-- | arch/s390/include/asm/processor.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index c417015c5304..085fb0d3c54e 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -233,6 +233,17 @@ static inline void __load_psw_mask (unsigned long mask) } /* + * Extract current PSW mask + */ +static inline unsigned long __extract_psw(void) +{ + unsigned int reg1, reg2; + + asm volatile("epsw %0,%1" : "=d" (reg1), "=a" (reg2)); + return (((unsigned long) reg1) << 32) | ((unsigned long) reg2); +} + +/* * Rewind PSW instruction address by specified number of bytes. */ static inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc) |