Since __SIGNAL_FRAMESIZE is in private name space, it is better not to
use it directly. This macro has been stable on s390/s390x so it is safe
to use the integer value.
* linux/s390/arch_sigreturn.c [!SIGNAL_FRAMESIZE] (SIGNAL_FRAMESIZE):
Define to 96.
* linux/s390x/arch_sigreturn.c (arch_sigreturn == s390_arch_sigreturn):
Remove S390_SIGNAL_FRAMESIZE and SIGNAL_FRAMESIZE.
(arch_sigreturn == s390x_arch_sigreturn): Define SIGNAL_FRAMESIZE.
* linux/s390/rt_sigframe.h (SIGNAL_FRAMESIZE): Define.
(struct_rt_sigframe): Replace __SIGNAL_FRAMESIZE with SIGNAL_FRAMESIZE.
Signed-off-by: Tuan Hoang <tmhoang@linux.ibm.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
*/
#ifndef SIGNAL_FRAMESIZE
-# define SIGNAL_FRAMESIZE __SIGNAL_FRAMESIZE
+# define SIGNAL_FRAMESIZE 96
#endif
#ifndef PTR_TYPE
# define PTR_TYPE unsigned long
# include <signal.h>
+#ifdef __s390x__
+# define SIGNAL_FRAMESIZE 160
+#else /* __s390__ */
+# define SIGNAL_FRAMESIZE 96
+#endif
+
typedef struct {
- uint8_t callee_used_stack[__SIGNAL_FRAMESIZE];
+ uint8_t callee_used_stack[SIGNAL_FRAMESIZE];
uint16_t svc_insn;
siginfo_t info;
ucontext_t uc;
#include <stdint.h>
-#define S390_SIGNAL_FRAMESIZE 96
-
-#define SIGNAL_FRAMESIZE S390_SIGNAL_FRAMESIZE
#define PTR_TYPE uint32_t
#define arch_sigreturn s390_arch_sigreturn
#include "s390/arch_sigreturn.c"
#undef PTR_TYPE
#undef SIGNAL_FRAMESIZE
+#define SIGNAL_FRAMESIZE 160
#define arch_sigreturn s390x_arch_sigreturn
#include "s390/arch_sigreturn.c"
#undef arch_sigreturn