From 4c89eb874420a94680d1b842bb9c3785997713a4 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 24 Jul 2023 17:20:30 +0200 Subject: 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 Signed-off-by: Heiko Carstens --- arch/s390/include/asm/pfault.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/s390/include') 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 + 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) -- cgit v1.2.3