mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
4c89eb8744
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>
27 lines
461 B
C
27 lines
461 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright IBM Corp. 1999, 2023
|
|
*/
|
|
#ifndef _ASM_S390_PFAULT_H
|
|
#define _ASM_S390_PFAULT_H
|
|
|
|
#include <linux/errno.h>
|
|
|
|
int __pfault_init(void);
|
|
void __pfault_fini(void);
|
|
|
|
static inline int pfault_init(void)
|
|
{
|
|
if (IS_ENABLED(CONFIG_PFAULT))
|
|
return __pfault_init();
|
|
return -EOPNOTSUPP;
|
|
}
|
|
|
|
static inline void pfault_fini(void)
|
|
{
|
|
if (IS_ENABLED(CONFIG_PFAULT))
|
|
__pfault_fini();
|
|
}
|
|
|
|
#endif /* _ASM_S390_PFAULT_H */
|