linux-user/syscall_defs.h: Sync the latest si_code from Linux kernel
PATCH 1/1 linux-user/syscall_defs.h: Sync the latest si_code from Linux kernel
From: Chen Gang <[email protected]>
They content several new macro members, also contents TARGET_N*.
--- linux-user/syscall_defs.h | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-)
linux-user/syscall_defs.h +30 -14
@@ -736,14 +736,21 @@ typedef struct target_siginfo {/* * SIGILL si_codes */ -#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ -#define TARGET_ILL_ILLOPN (2)/* illegal operand */ -#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ -#define TARGET_ILL_ILLTRP (4)/* illegal trap */ -#define TARGET_ILL_PRVOPC (5)/* privileged opcode */ -#define TARGET_ILL_PRVREG (6)/* privileged register */ -#define TARGET_ILL_COPROC (7)/* coprocessor error */ -#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ +#define TARGET_ILL_ILLOPN (2)/* illegal operand */ +#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ +#define TARGET_ILL_ILLTRP (4)/* illegal trap */ +#define TARGET_ILL_PRVOPC (5)/* privileged opcode */ +#define TARGET_ILL_PRVREG (6)/* privileged register */ +#define TARGET_ILL_COPROC (7)/* coprocessor error */ +#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#ifdef TARGET_TILEGX +#define TARGET_ILL_DBLFLT (9)/* double fault */ +#define TARGET_ILL_HARDWALL (10)/* user networks hardwall violation */ +#define TARGET_NSIGILL 10 +#else +#define TARGET_NSIGILL 8 +#endif /* * SIGFPE si_codes
@@ -763,19 +770,28 @@ typedef struct target_siginfo {*/ #define TARGET_SEGV_MAPERR (1)/* address not mapped to object */ #define TARGET_SEGV_ACCERR (2)/* invalid permissions for mapped object */ +#define TARGET_SEGV_BNDERR (3)/* failed address bound checks */ +#define TARGET_NSIGSEGV 3/* * SIGBUS si_codes */ -#define TARGET_BUS_ADRALN (1)/* invalid address alignment */ -#define TARGET_BUS_ADRERR (2)/* non-existent physical address */ -#define TARGET_BUS_OBJERR (3)/* object specific hardware error */ - +#define TARGET_BUS_ADRALN (1)/* invalid address alignment */ +#define TARGET_BUS_ADRERR (2)/* non-existent physical address */ +#define TARGET_BUS_OBJERR (3)/* object specific hardware error */ +/* hardware memory error consumed on a machine check: action required */ +#define TARGET_BUS_MCEERR_AR (4) +/* hardware memory error detected in process but not consumed: action optional*/ +#define TARGET_BUS_MCEERR_AO (5) +#define TARGET_NSIGBUS 5/* * SIGTRAP si_codes */ -#define TARGET_TRAP_BRKPT (1)/* process breakpoint */ -#define TARGET_TRAP_TRACE (2)/* process trace trap */ +#define TARGET_TRAP_BRKPT (1)/* process breakpoint */ +#define TARGET_TRAP_TRACE (2)/* process trace trap */ +#define TARGET_TRAP_BRANCH (3)/* process taken branch trap */ +#define TARGET_TRAP_HWBKPT (4)/* hardware breakpoint/watchpoint */ +#define TARGET_NSIGTRAP 4#endif /* defined(TARGET_I386) || defined(TARGET_ARM) */
Signature · 1 line
1.9.3
Quoted 30 lines · On 25 September 2015 at 21:10, <[email protected]> wrote:
From: Chen Gang <[email protected]>
They content several new macro members, also contents TARGET_N*.
Signed-off-by Chen Gang <[email protected]>--- linux-user/syscall_defs.h | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-)linux-user/syscall_defs.h +5
-8@@ -736,14 +736,21 @@ typedef struct target_siginfo {/* * SIGILL si_codes */ -#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ -#define TARGET_ILL_ILLOPN (2)/* illegal operand */ -#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ -#define TARGET_ILL_ILLTRP (4)/* illegal trap */ -#define TARGET_ILL_PRVOPC (5)/* privileged opcode */ -#define TARGET_ILL_PRVREG (6)/* privileged register */ -#define TARGET_ILL_COPROC (7)/* coprocessor error */ -#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ +#define TARGET_ILL_ILLOPN (2)/* illegal operand */ +#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ +#define TARGET_ILL_ILLTRP (4)/* illegal trap */ +#define TARGET_ILL_PRVOPC (5)/* privileged opcode */
linux-user/syscall_defs.h typedef struct target_siginfo { · line 753
Quoted 10 lines
linux-user/syscall_defs.h +10
-0+#define TARGET_ILL_PRVREG (6)/* privileged register */ +#define TARGET_ILL_COPROC (7)/* coprocessor error */ +#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#ifdef TARGET_TILEGX +#define TARGET_ILL_DBLFLT (9)/* double fault */ +#define TARGET_ILL_HARDWALL (10)/* user networks hardwall violation */ +#define TARGET_NSIGILL 10 +#else +#define TARGET_NSIGILL 8 +#endif
Please don't change lines which haven't actually changed; it makes it hard to see what has been added.
thanks
-- PMM
Quoted 36 lines · Peter Maydell
Quoted 35 lines · On 25 September 2015 at 21:10, <[email protected]> wrote:
From: Chen Gang <[email protected]>
They content several new macro members, also contents TARGET_N*.
Signed-off-by Chen Gang <[email protected]>--- linux-user/syscall_defs.h | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-)linux-user/syscall_defs.h +10
-8@@ -736,14 +736,21 @@ typedef struct target_siginfo {/* * SIGILL si_codes */ -#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ -#define TARGET_ILL_ILLOPN (2)/* illegal operand */ -#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ -#define TARGET_ILL_ILLTRP (4)/* illegal trap */ -#define TARGET_ILL_PRVOPC (5)/* privileged opcode */ -#define TARGET_ILL_PRVREG (6)/* privileged register */ -#define TARGET_ILL_COPROC (7)/* coprocessor error */ -#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#define TARGET_ILL_ILLOPC (1)/* illegal opcode */ +#define TARGET_ILL_ILLOPN (2)/* illegal operand */ +#define TARGET_ILL_ILLADR (3)/* illegal addressing mode */ +#define TARGET_ILL_ILLTRP (4)/* illegal trap */ +#define TARGET_ILL_PRVOPC (5)/* privileged opcode */ +#define TARGET_ILL_PRVREG (6)/* privileged register */ +#define TARGET_ILL_COPROC (7)/* coprocessor error */ +#define TARGET_ILL_BADSTK (8)/* internal stack error */ +#ifdef TARGET_TILEGX +#define TARGET_ILL_DBLFLT (9)/* double fault */
Quoted 9 lines
linux-user/syscall_defs.h typedef struct target_siginfo { · line 753
Quoted 5 lines
linux-user/syscall_defs.h +5
-0+#define TARGET_ILL_HARDWALL (10)/* user networks hardwall violation */ +#define TARGET_NSIGILL 10 +#else +#define TARGET_NSIGILL 8 +#endif Please don't change lines which haven't actually changed; it makes it hard to see what has been added.
"scripts/checkpatch.pl" will check '\t', so when we add new lines, we have to consider about it. And all related lines (at least in a "group") have to changed, too.
I guess, I need mention about it in comments (but I did not originally).
So for me, please add related comments for it when you apply the patch (if it passes review). If it is necessary to send patch v2, please let me know.
Thanks
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water, and life which God blessed