summaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-07-24 18:20:30 +0300
committerHeiko Carstens <hca@linux.ibm.com>2023-07-29 15:57:18 +0300
commit4c89eb874420a94680d1b842bb9c3785997713a4 (patch)
tree4c76318156a657af3cb2e8f648e8e22ac96869ec /arch/s390/include
parent28254f36e2944a501e8bf440193e5c4f910cf10d (diff)
downloadlinux-4c89eb874420a94680d1b842bb9c3785997713a4.tar.xz
s390/pfault: cleanup inline assemblies
Cleanup the pfault inline assemblies: - Use symbolic names for operands - Add extra linebreaks, and whitespace to improve readability In addition, change __pfault_init() to return -EOPNOTSUPP in case of an exception, and don't return a made up valid diag 258 return value (aka "8"). This allows to simplify the inline assembly, and makes debugging easier, in case something is broken. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/pfault.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/include/asm/pfault.h b/arch/s390/include/asm/pfault.h
index beabeebf2859..a1bee4a1e470 100644
--- a/arch/s390/include/asm/pfault.h
+++ b/arch/s390/include/asm/pfault.h
@@ -5,6 +5,8 @@
#ifndef _ASM_S390_PFAULT_H
#define _ASM_S390_PFAULT_H
+#include <linux/errno.h>
+
int __pfault_init(void);
void __pfault_fini(void);
@@ -12,7 +14,7 @@ static inline int pfault_init(void)
{
if (IS_ENABLED(CONFIG_PFAULT))
return __pfault_init();
- return -1;
+ return -EOPNOTSUPP;
}
static inline void pfault_fini(void)