summaryrefslogtreecommitdiff
path: root/arch/arm64/include/uapi/asm/siginfo.h
blob: c80c612885ae73370f9d94bf1e31725ce104423b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Copyright (C) 2012 ARM Ltd.
 * Copyright (C) 2014 Cavium Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef __ASM_SIGINFO_H
#define __ASM_SIGINFO_H

#define __ARCH_SI_PREAMBLE_SIZE	(4 * sizeof(int))

#ifdef __ILP32__

/*
 * For ILP32, the siginfo structures should share the same layout and
 * alignement requirements as LP64 ABI.
 * To do this, use an extra pad field and add aligned attribute
 * to the structure.
 */

# ifdef __AARCH64EB__
#  define __SIGINFO_INNER(type, field)		\
		int __pad#field;		\
		type field
# else
#  define __SIGINFO_INNER(type, field)		\
		type field;			\
		int __pad#field
# endif

# undef __SIGINFO_VOIDPTR
# define __SIGINFO_VOIDPTR(field)		\
		__SIGINFO_INNER(void __user*, field)
# undef __SIGINFO_BAND

# define __SIGINFO_BAND(field)			\
	__SIGINFO_INNER(long, field)

/* Make the alignment of siginfo always 8 byte aligned. */
#define __ARCH_SI_ATTRIBUTES __attribute__((aligned(8)))

#endif

#include <asm-generic/siginfo.h>

#endif