Commit 0723c8a6 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

compel/uapi: remove compat_sigset_t type

Remove compatible sigset structure: as it has the same size for both
32-bit and 64-bit, I didn't use it across the code, only for a size check.
The check is removed as we use now only k_rtsigset_t.
Wordsize for sigset is changed to 64-bit - as it's written in comment
for possible 32-bit native building.

If we ever going to support compat mode for other archs, we will
need to re-introduce compat_sigset_t type if it has for those archs
different sizes for compat/native builds.
But for a while, let's simplify this.

travis-ci: success for Compel/compat cleanups
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f09ec0c2
...@@ -11,17 +11,17 @@ typedef rt_restorefn_t *rt_sigrestore_t; ...@@ -11,17 +11,17 @@ typedef rt_restorefn_t *rt_sigrestore_t;
#define SA_RESTORER 0x04000000 #define SA_RESTORER 0x04000000
#define _KNSIG 64 #define _KNSIG 64
#ifndef CONFIG_COMPAT
#define _NSIG_BPW 64 #define _NSIG_BPW 64
#else
#define _NSIG_BPW 32
#endif
#define _KNSIG_WORDS (_KNSIG / _NSIG_BPW) #define _KNSIG_WORDS (_KNSIG / _NSIG_BPW)
/*
* Note: as k_rtsigset_t is the same size for 32-bit and 64-bit,
* sig defined as uint64_t rather than (unsigned long) - for the
* purpose if we ever going to support native 32-bit compilation.
*/
typedef struct { typedef struct {
unsigned long sig[_KNSIG_WORDS]; uint64_t sig[_KNSIG_WORDS];
} k_rtsigset_t; } k_rtsigset_t;
typedef struct { typedef struct {
......
...@@ -73,17 +73,8 @@ struct rt_sigcontext_32 { ...@@ -73,17 +73,8 @@ struct rt_sigcontext_32 {
* when (if) other architectures will support compatible C/R * when (if) other architectures will support compatible C/R
*/ */
typedef u32 compat_uptr_t; typedef uint32_t compat_uptr_t;
typedef u32 compat_size_t; typedef uint32_t compat_size_t;
typedef u32 compat_sigset_word;
#define _COMPAT_NSIG 64
#define _COMPAT_NSIG_BPW 32
#define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
typedef struct {
compat_sigset_word sig[_COMPAT_NSIG_WORDS];
} compat_sigset_t;
typedef struct compat_siginfo { typedef struct compat_siginfo {
int si_signo; int si_signo;
...@@ -92,11 +83,6 @@ typedef struct compat_siginfo { ...@@ -92,11 +83,6 @@ typedef struct compat_siginfo {
int _pad[128/sizeof(int) - 3]; int _pad[128/sizeof(int) - 3];
} compat_siginfo_t; } compat_siginfo_t;
static inline void __always_unused __check_compat_sigset_t(void)
{
BUILD_BUG_ON(sizeof(compat_sigset_t) != sizeof(k_rtsigset_t));
}
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
#define rt_sigframe_ia32 rt_sigframe #define rt_sigframe_ia32 rt_sigframe
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment