From a402ab8cc7b0578c445f348c9010e62ab390bee8 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 15 Mar 2018 13:30:51 +0100 Subject: asm-generic: siginfo: define ia64 si_codes unconditionally Unlike system call numbers the assignment of si_codes has never had a reason to be made per architecture. Some architectures have had unique conditions to report and reporting those conditions needed new si_codes. Nothing has ever needed si_codes to have different values on different architectures. The si_code space is vast so even with defining all si_codes on all architectures there is no danger in running out of si_code values. The history of the si_codes BUS_MCEERR_AR, BUS_MCEER_AO, SEGV_BNDERR, and SEGV_PKUERR show that a need of one architecture frequently becomes a need of another architecture which makes sharing si_codes between architectures a positive benefit and something to be encouraged. Where there are no conflicts with the historical ia64 arch specific si_codes and any other si_codes make them generic si_codes. We might need them on another architecture someday. This leaves only the good example of arch generic si_codes in the kernel for future architectures and architecture enhancments to follow. Without bad examples to follow it should be easy to avoid the mistakes of the past. Reported-by: Eric W. Biederman [arnd: took Eric's changelog text] Signed-off-by: Arnd Bergmann --- include/uapi/asm-generic/siginfo.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'include/uapi/asm-generic') diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index b2ebf16c391a..ff13ed50dde8 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -186,11 +186,9 @@ typedef struct siginfo { #define ILL_PRVREG 6 /* privileged register */ #define ILL_COPROC 7 /* coprocessor error */ #define ILL_BADSTK 8 /* internal stack error */ -#ifdef __ia64__ -# define ILL_BADIADDR 9 /* unimplemented instruction address */ -# define __ILL_BREAK 10 /* illegal break */ -# define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ -#endif +#define ILL_BADIADDR 9 /* unimplemented instruction address */ +#define __ILL_BREAK 10 /* illegal break */ +#define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ #define NSIGILL 11 /* @@ -204,13 +202,11 @@ typedef struct siginfo { #define FPE_FLTRES 6 /* floating point inexact result */ #define FPE_FLTINV 7 /* floating point invalid operation */ #define FPE_FLTSUB 8 /* subscript out of range */ -#ifdef __ia64__ -# define __FPE_DECOVF 9 /* decimal overflow */ -# define __FPE_DECDIV 10 /* decimal division by zero */ -# define __FPE_DECERR 11 /* packed decimal error */ -# define __FPE_INVASC 12 /* invalid ASCII digit */ -# define __FPE_INVDEC 13 /* invalid decimal digit */ -#endif +#define __FPE_DECOVF 9 /* decimal overflow */ +#define __FPE_DECDIV 10 /* decimal division by zero */ +#define __FPE_DECERR 11 /* packed decimal error */ +#define __FPE_INVASC 12 /* invalid ASCII digit */ +#define __FPE_INVDEC 13 /* invalid decimal digit */ #define NSIGFPE 13 /* -- cgit v1.2.3-59-g8ed1b