Skip to contentSkip to conversation

untangle the <asm/siginfo.h> mess

PATCH In review Christoph Hellwig 5 participants 16 messages Jun 3, 2017 – Jun 6, 2017

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

We currently have uapi versions of <asm/siginfo.h> which at least on a few architectures define bits of the userspace ABI before including an uapi asm-generic version, and also non-uapi versions which do almost nothing except for making sure other headers include the right uapi one before including an asm-generic that defined two prototypes and a few defines that aren't architecture specific in any.

This series completely gets rid of the non-uapi versions and cleans up various small bits on the way.

Note that Thomas has some posix-timers work overlapping with this, so it might make sense to take these through the tip tree.

#1 lore raw

PATCH 1/5 sparc: simplify <asm/siginfo.h>

There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.

---
 arch/sparc/include/asm/siginfo.h | 12 ------------
 1 file changed, 12 deletions(-)
arch/sparc/include/asm/siginfo.h +0 -12
index 48c34c19f810..dd2f2fce976b 100644
@@ -1,13 +1 @@
-#ifndef __SPARC_SIGINFO_H
-#define __SPARC_SIGINFO_H
-
 #include <uapi/asm/siginfo.h>
-
-
-#ifdef CONFIG_COMPAT
-
-struct compat_siginfo;
-
-#endif /* CONFIG_COMPAT */
-
-#endif /* !(__SPARC_SIGINFO_H) */
Signature · 1 line
2.11.0
maintainer Acked-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] sparc: simplify <asm/siginfo.h>

From: Christoph Hellwig <[email protected]>
Date: Sat, 3 Jun 2017 21:00:58 +0200

Quoted 6 lines

There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.

#3 lore raw

[tip:timers/core] sparc: Simplify <asm/siginfo.h>

In reply to Christoph Hellwig
sparc: Simplify <asm/siginfo.h>
Commit-ID:  f70c80068f073ace4b9071803d2e2691fe0c3d05
Gitweb:     http://git.kernel.org/tip/f70c80068f073ace4b9071803d2e2691fe0c3d05
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Sat, 3 Jun 2017 21:00:58 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 4 Jun 2017 15:11:45 +0200

sparc: Simplify <asm/siginfo.h>

There is no need for the forward declaration of compat_siginfo provided here. We can't yet use the generic header as we need to pull in the sparc-specific version of the uapi <asm/siginfo.h>, but this prepares for removing the non-uapi <asm/siginfo.h> entirely.

---
 arch/sparc/include/asm/siginfo.h | 12 ------------
 1 file changed, 12 deletions(-)
arch/sparc/include/asm/siginfo.h +0 -12
index 48c34c1..dd2f2fc 100644
@@ -1,13 +1 @@
-#ifndef __SPARC_SIGINFO_H
-#define __SPARC_SIGINFO_H
-
 #include <uapi/asm/siginfo.h>
-
-
-#ifdef CONFIG_COMPAT
-
-struct compat_siginfo;
-
-#endif /* CONFIG_COMPAT */
-
-#endif /* !(__SPARC_SIGINFO_H) */
#4 lore raw

PATCH 2/5 ia64: remove HAVE_ARCH_COPY_SIGINFO

In reply to Christoph Hellwig

Since ia64 defines __ARCH_SI_PREAMBLE_SIZE it can just use the generic copy_siginfo implementation, which is identical to the architecture specific one.

With that support for HAVE_ARCH_COPY_SIGINFO can go away entirely.

---
 arch/ia64/include/asm/siginfo.h      | 22 ----------------------
 arch/ia64/include/uapi/asm/siginfo.h |  1 -
 include/linux/signal.h               |  7 +------
 3 files changed, 1 insertion(+), 29 deletions(-)
arch/ia64/include/asm/siginfo.h +0 -22
index 6f2e2dd0f28f..dd2f2fce976b 100644
@@ -1,23 +1 @@
-/*
- * Based on <asm-i386/siginfo.h>.
- *
- * Modified 1998-2002
- *	David Mosberger-Tang <[email protected]>, Hewlett-Packard Co
- */
-#ifndef _ASM_IA64_SIGINFO_H
-#define _ASM_IA64_SIGINFO_H
-
-#include <linux/string.h>
 #include <uapi/asm/siginfo.h>
-
-static inline void
-copy_siginfo (siginfo_t *to, siginfo_t *from)
-{
-	if (from->si_code < 0)
-		memcpy(to, from, sizeof(siginfo_t));
-	else
-		/* _sigchld is currently the largest know union member */
-		memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld));
-}
-
-#endif /* _ASM_IA64_SIGINFO_H */
arch/ia64/include/uapi/asm/siginfo.h +0 -1
index f72bf0172bb2..4694c64252d6 100644
@@ -11,7 +11,6 @@
 #define __ARCH_SI_PREAMBLE_SIZE	(4 * sizeof(int))
 
 #define HAVE_ARCH_SIGINFO_T
-#define HAVE_ARCH_COPY_SIGINFO
 #define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
include/linux/signal.h +1 -6
index 1f5a16620693..80c7418be359 100644
@@ -3,16 +3,13 @@
 
 #include <linux/bug.h>
 #include <linux/signal_types.h>
+#include <linux/string.h>
 
 struct task_struct;
 
 /* for sysctl */
 extern int print_fatal_signals;
 
-#ifndef HAVE_ARCH_COPY_SIGINFO
-
-#include <linux/string.h>
-
 static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 {
 	if (from->si_code < 0)
@@ -22,8 +19,6 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 		memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
 }
 
-#endif
-
 /*
  * Define some primitives to manipulate sigset_t.
  */
Signature · 1 line
2.11.0
#5 lore raw

[tip:timers/core] ia64: Remove HAVE_ARCH_COPY_SIGINFO

ia64: Remove HAVE_ARCH_COPY_SIGINFO
Commit-ID:  7994200ce69a3873dfa2641254a13bb0a40056f3
Gitweb:     http://git.kernel.org/tip/7994200ce69a3873dfa2641254a13bb0a40056f3
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Sat, 3 Jun 2017 21:00:59 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 4 Jun 2017 15:11:46 +0200

ia64: Remove HAVE_ARCH_COPY_SIGINFO

Since ia64 defines __ARCH_SI_PREAMBLE_SIZE it can just use the generic copy_siginfo implementation, which is identical to the architecture specific one.

With that support for HAVE_ARCH_COPY_SIGINFO can go away entirely.

---
 arch/ia64/include/asm/siginfo.h      | 22 ----------------------
 arch/ia64/include/uapi/asm/siginfo.h |  1 -
 include/linux/signal.h               |  7 +------
 3 files changed, 1 insertion(+), 29 deletions(-)
arch/ia64/include/asm/siginfo.h +0 -22
index 6f2e2dd..dd2f2fc 100644
@@ -1,23 +1 @@
-/*
- * Based on <asm-i386/siginfo.h>.
- *
- * Modified 1998-2002
- *	David Mosberger-Tang <[email protected]>, Hewlett-Packard Co
- */
-#ifndef _ASM_IA64_SIGINFO_H
-#define _ASM_IA64_SIGINFO_H
-
-#include <linux/string.h>
 #include <uapi/asm/siginfo.h>
-
-static inline void
-copy_siginfo (siginfo_t *to, siginfo_t *from)
-{
-	if (from->si_code < 0)
-		memcpy(to, from, sizeof(siginfo_t));
-	else
-		/* _sigchld is currently the largest know union member */
-		memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld));
-}
-
-#endif /* _ASM_IA64_SIGINFO_H */
arch/ia64/include/uapi/asm/siginfo.h +0 -1
index f72bf01..4694c64 100644
@@ -11,7 +11,6 @@
 #define __ARCH_SI_PREAMBLE_SIZE	(4 * sizeof(int))
 
 #define HAVE_ARCH_SIGINFO_T
-#define HAVE_ARCH_COPY_SIGINFO
 #define HAVE_ARCH_COPY_SIGINFO_TO_USER
 
 #include <asm-generic/siginfo.h>
include/linux/signal.h +1 -6
index 1f5a166..80c7418 100644
@@ -3,16 +3,13 @@
 
 #include <linux/bug.h>
 #include <linux/signal_types.h>
+#include <linux/string.h>
 
 struct task_struct;
 
 /* for sysctl */
 extern int print_fatal_signals;
 
-#ifndef HAVE_ARCH_COPY_SIGINFO
-
-#include <linux/string.h>
-
 static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 {
 	if (from->si_code < 0)
@@ -22,8 +19,6 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 		memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
 }
 
-#endif
-
 /*
  * Define some primitives to manipulate sigset_t.
  */
#6 lore raw

PATCH 3/5 posix-timers: move the do_schedule_next_timer declaration

In reply to Christoph Hellwig

Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to posix-timers.h instead.

---
 include/asm-generic/siginfo.h | 1 -
 include/linux/posix-timers.h  | 3 +++
 kernel/signal.c               | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
include/asm-generic/siginfo.h +0 -1
index a2508a8f9a9c..5a9394763a66 100644
@@ -15,7 +15,6 @@
 #define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
 
 struct siginfo;
-void do_schedule_next_timer(struct siginfo *info);
 
 extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
 
include/linux/posix-timers.h +3 -0
index 8c1e43ab14a9..fa25c23192a4 100644
@@ -7,6 +7,7 @@
 #include <linux/timex.h>
 #include <linux/alarmtimer.h>
 
+struct siginfo;
 
 struct cpu_timer_list {
 	struct list_head entry;
@@ -125,4 +126,6 @@ long clock_nanosleep_restart(struct restart_block *restart_block);
 
 void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new);
 
+void do_schedule_next_timer(struct siginfo *info);
+
 #endif
kernel/signal.c +1 -0
index ca92bcfeb322..1f85c843be8e 100644
@@ -39,6 +39,7 @@
 #include <linux/compat.h>
 #include <linux/cn_proc.h>
 #include <linux/compiler.h>
+#include <linux/posix-timers.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/signal.h>
Signature · 1 line
2.11.0
#7 lore raw

[tip:timers/core] posix-timers: Move the do_schedule_next_timer declaration

posix-timers: Move the do_schedule_next_timer declaration
Commit-ID:  31ea70e0308b73a1b862bd17c06efc3cbcfd2016
Gitweb:     http://git.kernel.org/tip/31ea70e0308b73a1b862bd17c06efc3cbcfd2016
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Sat, 3 Jun 2017 21:01:00 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 4 Jun 2017 15:11:46 +0200

posix-timers: Move the do_schedule_next_timer declaration

Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to posix-timers.h instead.

---
 include/asm-generic/siginfo.h | 1 -
 include/linux/posix-timers.h  | 3 +++
 kernel/signal.c               | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
include/asm-generic/siginfo.h +0 -1
index a2508a8..5a93947 100644
@@ -15,7 +15,6 @@
 #define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
 
 struct siginfo;
-void do_schedule_next_timer(struct siginfo *info);
 
 extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
 
include/linux/posix-timers.h +3 -0
index 34e893a..8929f7e 100644
@@ -7,6 +7,7 @@
 #include <linux/timex.h>
 #include <linux/alarmtimer.h>
 
+struct siginfo;
 
 struct cpu_timer_list {
 	struct list_head entry;
@@ -120,4 +121,6 @@ long clock_nanosleep_restart(struct restart_block *restart_block);
 
 void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new);
 
+void do_schedule_next_timer(struct siginfo *info);
+
 #endif
kernel/signal.c +1 -0
index ca92bcf..1f85c84 100644
@@ -39,6 +39,7 @@
 #include <linux/compat.h>
 #include <linux/cn_proc.h>
 #include <linux/compiler.h>
+#include <linux/posix-timers.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/signal.h>
#8 lore raw

PATCH 4/5 signal: move copy_siginfo_to_user to <linux/signal.h>

In reply to Christoph Hellwig

Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to signal.h instead where several related functions already reside.

---
 include/asm-generic/siginfo.h | 4 ----
 include/linux/signal.h        | 2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)
include/asm-generic/siginfo.h +0 -4
index 5a9394763a66..31268a5bf63e 100644
@@ -14,8 +14,4 @@
 #define __SI_SYS	(7 << 16)
 #define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
 
-struct siginfo;
-
-extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
-
 #endif
include/linux/signal.h +2 -0
index 80c7418be359..a39feddd71ba 100644
@@ -19,6 +19,8 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 		memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
 }
 
+int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
+
 /*
  * Define some primitives to manipulate sigset_t.
  */
Signature · 1 line
2.11.0
#9 lore raw

[tip:timers/core] signal: Move copy_siginfo_to_user to <linux/signal.h>

signal: Move copy_siginfo_to_user to <linux/signal.h>
Commit-ID:  b9253a43370e8f3c46c0ee24b04fa2ffec37b7c0
Gitweb:     http://git.kernel.org/tip/b9253a43370e8f3c46c0ee24b04fa2ffec37b7c0
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Sat, 3 Jun 2017 21:01:01 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 4 Jun 2017 15:11:46 +0200

signal: Move copy_siginfo_to_user to <linux/signal.h>

Having it in asm-generic/siginfo.h doesn't make any sense as it is in no way architecture specific. Move it to signal.h instead where several related functions already reside.

---
 include/asm-generic/siginfo.h | 4 ----
 include/linux/signal.h        | 2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)
include/asm-generic/siginfo.h +0 -4
index 5a93947..31268a5 100644
@@ -14,8 +14,4 @@
 #define __SI_SYS	(7 << 16)
 #define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
 
-struct siginfo;
-
-extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
-
 #endif
include/linux/signal.h +2 -0
index 80c7418..a39fedd 100644
@@ -19,6 +19,8 @@ static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
 		memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
 }
 
+int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
+
 /*
  * Define some primitives to manipulate sigset_t.
  */
#10 lore raw

PATCH 5/5 remove non-uapi <asm/siginfo.h>

In reply to Christoph Hellwig

By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.

---
 arch/arc/include/asm/Kbuild           |  1 -
 arch/arm/include/asm/Kbuild           |  1 -
 arch/arm/include/uapi/asm/Kbuild      |  2 ++
 arch/c6x/include/asm/Kbuild           |  1 -
 arch/c6x/include/uapi/asm/Kbuild      |  1 +
 arch/cris/include/asm/Kbuild          |  1 -
 arch/cris/include/uapi/asm/Kbuild     |  2 ++
 arch/h8300/include/asm/Kbuild         |  1 -
 arch/h8300/include/uapi/asm/Kbuild    |  2 ++
 arch/hexagon/include/asm/Kbuild       |  1 -
 arch/ia64/include/asm/siginfo.h       |  1 -
 arch/m68k/include/asm/Kbuild          |  1 -
 arch/m68k/include/uapi/asm/Kbuild     |  1 +
 arch/nios2/include/asm/Kbuild         |  1 -
 arch/nios2/include/uapi/asm/Kbuild    |  1 +
 arch/openrisc/include/asm/Kbuild      |  1 -
 arch/openrisc/include/uapi/asm/Kbuild |  2 ++
 arch/sh/include/asm/Kbuild            |  1 -
 arch/sh/include/uapi/asm/Kbuild       |  1 +
 arch/sparc/include/asm/siginfo.h      |  1 -
 arch/unicore32/include/asm/Kbuild     |  1 -
 arch/xtensa/include/asm/Kbuild        |  1 -
 arch/xtensa/include/uapi/asm/Kbuild   |  1 +
 include/asm-generic/siginfo.h         | 17 -----------------
 include/uapi/asm-generic/siginfo.h    | 15 +++++++++++++--
 25 files changed, 26 insertions(+), 33 deletions(-)
 delete mode 100644 arch/ia64/include/asm/siginfo.h
 delete mode 100644 arch/sparc/include/asm/siginfo.h
 delete mode 100644 include/asm-generic/siginfo.h
arch/arc/include/asm/Kbuild +0 -1
index 7bee4e4799fd..3e74ca5e6402 100644
@@ -36,7 +36,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += stat.h
arch/arm/include/asm/Kbuild +0 -1
index 3a36d99ff836..d8360501c082 100644
@@ -28,7 +28,6 @@ generic-y += segment.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += simd.h
 generic-y += sizes.h
 generic-y += socket.h
arch/arm/include/uapi/asm/Kbuild +2 -0
index 607f702c2d62..e9b098d6b766 100644
@@ -4,3 +4,5 @@ include include/uapi/asm-generic/Kbuild.asm
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
+
+generic-y += siginfo.h
arch/c6x/include/asm/Kbuild +0 -1
index f0eaf0475e7e..a3c8d05c4cc7 100644
@@ -45,7 +45,6 @@ generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/c6x/include/uapi/asm/Kbuild +1 -0
index 13a97aa2285f..1c44d3b3eba0 100644
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
+generic-y += siginfo.h
arch/cris/include/asm/Kbuild +0 -1
index 2890099992a9..acc5781100c2 100644
@@ -36,7 +36,6 @@ generic-y += resource.h
 generic-y += sections.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += statfs.h
arch/cris/include/uapi/asm/Kbuild +2 -0
index b15bf6bc0e94..b55fc2ae1e8c 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/h8300/include/asm/Kbuild +0 -1
index 757cdeb24e6e..99c824608a31 100644
@@ -54,7 +54,6 @@ generic-y += serial.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += sockios.h
arch/h8300/include/uapi/asm/Kbuild +2 -0
index b15bf6bc0e94..b55fc2ae1e8c 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/hexagon/include/asm/Kbuild +0 -1
index 6b45ef79eb8f..0fc9cb04e6ad 100644
@@ -41,7 +41,6 @@ generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += sockios.h
arch/ia64/include/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index dd2f2fce976b..000000000000
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
arch/m68k/include/asm/Kbuild +0 -1
index 82005d2ff717..5ecf4e47b2e2 100644
@@ -25,7 +25,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += sections.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += spinlock.h
 generic-y += statfs.h
 generic-y += termios.h
arch/m68k/include/uapi/asm/Kbuild +1 -0
index 64368077235a..68b45cc87e2c 100644
@@ -5,6 +5,7 @@ generic-y += auxvec.h
 generic-y += msgbuf.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
+generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
arch/nios2/include/asm/Kbuild +0 -1
index 727dbb333f60..e1a843def56f 100644
@@ -47,7 +47,6 @@ generic-y += segment.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/nios2/include/uapi/asm/Kbuild +1 -0
index 374bd123329f..51eff5bc2eb4 100644
@@ -2,4 +2,5 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += setup.h
+generic-y += siginfo.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -1
index fdbcf0bf44a4..091585addb91 100644
@@ -46,7 +46,6 @@ generic-y += sembuf.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/openrisc/include/uapi/asm/Kbuild +2 -0
index b15bf6bc0e94..b55fc2ae1e8c 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/sh/include/asm/Kbuild +0 -1
index cf2a75063b53..590c91ae7541 100644
@@ -29,7 +29,6 @@ generic-y += rwsem.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += statfs.h
arch/sh/include/uapi/asm/Kbuild +1 -0
index b15bf6bc0e94..4cb0d2f8868c 100644
@@ -1,2 +1,3 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
arch/sparc/include/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index dd2f2fce976b..000000000000
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
arch/unicore32/include/asm/Kbuild +0 -1
index e9ad511c1043..7a53a55341de 100644
@@ -44,7 +44,6 @@ generic-y += serial.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += sizes.h
 generic-y += socket.h
arch/xtensa/include/asm/Kbuild +0 -1
index cc23e9ecc6bb..30f6290109d4 100644
@@ -25,7 +25,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += rwsem.h
 generic-y += sections.h
-generic-y += siginfo.h
 generic-y += statfs.h
 generic-y += termios.h
 generic-y += topology.h
arch/xtensa/include/uapi/asm/Kbuild +1 -0
index b15bf6bc0e94..4cb0d2f8868c 100644
@@ -1,2 +1,3 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
include/asm-generic/siginfo.h deleted +0 -17
deleted file mode 100644
index 31268a5bf63e..000000000000
@@ -1,17 +0,0 @@
-#ifndef _ASM_GENERIC_SIGINFO_H
-#define _ASM_GENERIC_SIGINFO_H
-
-#include <uapi/asm-generic/siginfo.h>
-
-#define __SI_MASK	0xffff0000u
-#define __SI_KILL	(0 << 16)
-#define __SI_TIMER	(1 << 16)
-#define __SI_POLL	(2 << 16)
-#define __SI_FAULT	(3 << 16)
-#define __SI_CHLD	(4 << 16)
-#define __SI_RT		(5 << 16)
-#define __SI_MESGQ	(6 << 16)
-#define __SI_SYS	(7 << 16)
-#define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
-
-#endif
include/uapi/asm-generic/siginfo.h +13 -2
index 1abaf62c86fc..9c4eca6b374a 100644
@@ -151,7 +151,18 @@ typedef struct siginfo {
 #define si_arch		_sifields._sigsys._arch
 #endif
 
-#ifndef __KERNEL__
+#ifdef __KERNEL__
+#define __SI_MASK	0xffff0000u
+#define __SI_KILL	(0 << 16)
+#define __SI_TIMER	(1 << 16)
+#define __SI_POLL	(2 << 16)
+#define __SI_FAULT	(3 << 16)
+#define __SI_CHLD	(4 << 16)
+#define __SI_RT		(5 << 16)
+#define __SI_MESGQ	(6 << 16)
+#define __SI_SYS	(7 << 16)
+#define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
+#else /* __KERNEL__ */
 #define __SI_KILL	0
 #define __SI_TIMER	0
 #define __SI_POLL	0
@@ -161,7 +172,7 @@ typedef struct siginfo {
 #define __SI_MESGQ	0
 #define __SI_SYS	0
 #define __SI_CODE(T,N)	(N)
-#endif
+#endif /* __KERNEL__ */
 
 /*
  * si_code values
Signature · 1 line
2.11.0
#11 lore raw

Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>

Quoted 3 lines · Christoph Hellwig

By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.

That needs a couple of fixups and we can remove

arch/X/include/uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score.

Delta patch below.

Thanks,

tglx

8<--------------------

arch/sh/include/uapi/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
 generic-y += siginfo.h
arch/arc/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/hexagon/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/m32r/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/m32r/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@
-#ifndef _M32R_SIGINFO_H
-#define _M32R_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _M32R_SIGINFO_H */
arch/microblaze/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
+generic-y += siginfo.h
arch/microblaze/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
arch/mn10300/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/mn10300/include/uapi/asm/siginfo.h deleted +0 -1
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
arch/score/include/uapi/asm/Kbuild +2 -0
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/score/include/uapi/asm/siginfo.h deleted +0 -6
@@ -1,6 +0,0 @@
-#ifndef _ASM_SCORE_SIGINFO_H
-#define _ASM_SCORE_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _ASM_SCORE_SIGINFO_H */
arch/unicore32/include/uapi/asm/Kbuild +1 -0
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
+generic-y += siginfo.h
#12 lore raw

Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>

Quoted 11 lines · Thomas Gleixner
Quoted 3 lines · Christoph Hellwig

By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.

That needs a couple of fixups and we can remove

arch/X/include/uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score.

Delta patch below.

Thanks. I'm going to include this if I have to resend for some reason.

#13 lore raw

Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>

Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Christoph Hellwig

By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.

Quoted 7 lines
Quoted 5 lines

That needs a couple of fixups and we can remove

arch/X/include/uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score.

Delta patch below.

Thanks. I'm going to include this if I have to resend for some reason.

No need. I already folded it in and it survived the built bot testing w/o complaints. About to push it out into tip timers/core as I have the posix timer stuff pending on top of it.

Thanks,

tglx

#14 lore raw

[tip:timers/core] signal: Remove non-uapi <asm/siginfo.h>

In reply to Christoph Hellwig
signal: Remove non-uapi <asm/siginfo.h>
Commit-ID:  6bc51cbaa9d75c7c240282da5ff270815caccac0
Gitweb:     http://git.kernel.org/tip/6bc51cbaa9d75c7c240282da5ff270815caccac0
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Sat, 3 Jun 2017 21:01:02 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 4 Jun 2017 15:11:47 +0200

signal: Remove non-uapi <asm/siginfo.h>

By moving the kernel side __SI_* defintions right next to the userspace ones we can kill the non-uapi versions of <asm/siginfo.h> include include/asm-generic/siginfo.h and untangle the unholy mess of includes.

[ tglx: Removed uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score ]

---
 arch/arc/include/asm/Kbuild                |  1 -
 arch/arc/include/uapi/asm/Kbuild           |  2 ++
 arch/arm/include/asm/Kbuild                |  1 -
 arch/arm/include/uapi/asm/Kbuild           |  2 ++
 arch/c6x/include/asm/Kbuild                |  1 -
 arch/c6x/include/uapi/asm/Kbuild           |  1 +
 arch/cris/include/asm/Kbuild               |  1 -
 arch/cris/include/uapi/asm/Kbuild          |  2 ++
 arch/h8300/include/asm/Kbuild              |  1 -
 arch/h8300/include/uapi/asm/Kbuild         |  2 ++
 arch/hexagon/include/asm/Kbuild            |  1 -
 arch/hexagon/include/uapi/asm/Kbuild       |  2 ++
 arch/ia64/include/asm/siginfo.h            |  1 -
 arch/m32r/include/uapi/asm/Kbuild          |  2 ++
 arch/m32r/include/uapi/asm/siginfo.h       |  6 ------
 arch/m68k/include/asm/Kbuild               |  1 -
 arch/m68k/include/uapi/asm/Kbuild          |  1 +
 arch/microblaze/include/uapi/asm/Kbuild    |  1 +
 arch/microblaze/include/uapi/asm/siginfo.h |  1 -
 arch/mn10300/include/uapi/asm/Kbuild       |  2 ++
 arch/mn10300/include/uapi/asm/siginfo.h    |  1 -
 arch/nios2/include/asm/Kbuild              |  1 -
 arch/nios2/include/uapi/asm/Kbuild         |  1 +
 arch/openrisc/include/asm/Kbuild           |  1 -
 arch/openrisc/include/uapi/asm/Kbuild      |  2 ++
 arch/score/include/uapi/asm/Kbuild         |  2 ++
 arch/score/include/uapi/asm/siginfo.h      |  6 ------
 arch/sh/include/asm/Kbuild                 |  1 -
 arch/sh/include/uapi/asm/Kbuild            |  2 ++
 arch/sparc/include/asm/siginfo.h           |  1 -
 arch/unicore32/include/asm/Kbuild          |  1 -
 arch/unicore32/include/uapi/asm/Kbuild     |  1 +
 arch/xtensa/include/asm/Kbuild             |  1 -
 arch/xtensa/include/uapi/asm/Kbuild        |  1 +
 include/asm-generic/siginfo.h              | 17 -----------------
 include/uapi/asm-generic/siginfo.h         | 15 +++++++++++++--
 36 files changed, 39 insertions(+), 47 deletions(-)
arch/arc/include/asm/Kbuild +0 -1
index 7bee4e4..3e74ca5 100644
@@ -36,7 +36,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += stat.h
arch/arc/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/arm/include/asm/Kbuild +0 -1
index 3a36d99..d836050 100644
@@ -28,7 +28,6 @@ generic-y += segment.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += simd.h
 generic-y += sizes.h
 generic-y += socket.h
arch/arm/include/uapi/asm/Kbuild +2 -0
index 607f702..e9b098d 100644
@@ -4,3 +4,5 @@ include include/uapi/asm-generic/Kbuild.asm
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
+
+generic-y += siginfo.h
arch/c6x/include/asm/Kbuild +0 -1
index f0eaf047..a3c8d05 100644
@@ -45,7 +45,6 @@ generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/c6x/include/uapi/asm/Kbuild +1 -0
index 13a97aa..1c44d3b 100644
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
+generic-y += siginfo.h
arch/cris/include/asm/Kbuild +0 -1
index 2890099..acc5781 100644
@@ -36,7 +36,6 @@ generic-y += resource.h
 generic-y += sections.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += statfs.h
arch/cris/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/h8300/include/asm/Kbuild +0 -1
index 757cdeb..99c8246 100644
@@ -54,7 +54,6 @@ generic-y += serial.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += sockios.h
arch/h8300/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/hexagon/include/asm/Kbuild +0 -1
index 6b45ef7..0fc9cb0 100644
@@ -41,7 +41,6 @@ generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += sockios.h
arch/hexagon/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/ia64/include/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index dd2f2fc..0000000
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
arch/m32r/include/uapi/asm/Kbuild +2 -0
index b15bf6b..c94ee54 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/m32r/include/uapi/asm/siginfo.h deleted +0 -6
deleted file mode 100644
index 7d9cd9e..0000000
@@ -1,6 +0,0 @@
-#ifndef _M32R_SIGINFO_H
-#define _M32R_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _M32R_SIGINFO_H */
arch/m68k/include/asm/Kbuild +0 -1
index 82005d2..5ecf4e4 100644
@@ -25,7 +25,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += sections.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += spinlock.h
 generic-y += statfs.h
 generic-y += termios.h
arch/m68k/include/uapi/asm/Kbuild +1 -0
index 6436807..68b45cc 100644
@@ -5,6 +5,7 @@ generic-y += auxvec.h
 generic-y += msgbuf.h
 generic-y += sembuf.h
 generic-y += shmbuf.h
+generic-y += siginfo.h
 generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
arch/microblaze/include/uapi/asm/Kbuild +1 -0
index 2178c78..cb6784f 100644
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
+generic-y += siginfo.h
arch/microblaze/include/uapi/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index 0815d29..0000000
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
arch/mn10300/include/uapi/asm/Kbuild +2 -0
index b15bf6b..c94ee54 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/mn10300/include/uapi/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index 0815d29..0000000
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
arch/nios2/include/asm/Kbuild +0 -1
index 727dbb3..e1a843d 100644
@@ -47,7 +47,6 @@ generic-y += segment.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/nios2/include/uapi/asm/Kbuild +1 -0
index 374bd12..51eff5b 100644
@@ -2,4 +2,5 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += setup.h
+generic-y += siginfo.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -1
index fdbcf0b..091585a 100644
@@ -46,7 +46,6 @@ generic-y += sembuf.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += socket.h
 generic-y += sockios.h
arch/openrisc/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/score/include/uapi/asm/Kbuild +2 -0
index b15bf6b..c94ee54 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y	+= siginfo.h
arch/score/include/uapi/asm/siginfo.h deleted +0 -6
deleted file mode 100644
index 87ca356..0000000
@@ -1,6 +0,0 @@
-#ifndef _ASM_SCORE_SIGINFO_H
-#define _ASM_SCORE_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _ASM_SCORE_SIGINFO_H */
arch/sh/include/asm/Kbuild +0 -1
index cf2a750..590c91a 100644
@@ -29,7 +29,6 @@ generic-y += rwsem.h
 generic-y += sembuf.h
 generic-y += serial.h
 generic-y += shmbuf.h
-generic-y += siginfo.h
 generic-y += sizes.h
 generic-y += socket.h
 generic-y += statfs.h
arch/sh/include/uapi/asm/Kbuild +2 -0
index b15bf6b..b55fc2a 100644
@@ -1,2 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
arch/sparc/include/asm/siginfo.h deleted +0 -1
deleted file mode 100644
index dd2f2fc..0000000
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
arch/unicore32/include/asm/Kbuild +0 -1
index e9ad511..7a53a55 100644
@@ -44,7 +44,6 @@ generic-y += serial.h
 generic-y += setup.h
 generic-y += shmbuf.h
 generic-y += shmparam.h
-generic-y += siginfo.h
 generic-y += signal.h
 generic-y += sizes.h
 generic-y += socket.h
arch/unicore32/include/uapi/asm/Kbuild +1 -0
index 13a97aa..1c44d3b 100644
@@ -2,3 +2,4 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
+generic-y += siginfo.h
arch/xtensa/include/asm/Kbuild +0 -1
index cc23e9e..30f62901 100644
@@ -25,7 +25,6 @@ generic-y += preempt.h
 generic-y += resource.h
 generic-y += rwsem.h
 generic-y += sections.h
-generic-y += siginfo.h
 generic-y += statfs.h
 generic-y += termios.h
 generic-y += topology.h
arch/xtensa/include/uapi/asm/Kbuild +1 -0
index b15bf6b..4cb0d2f 100644
@@ -1,2 +1,3 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
include/asm-generic/siginfo.h deleted +0 -17
deleted file mode 100644
index 31268a5..0000000
@@ -1,17 +0,0 @@
-#ifndef _ASM_GENERIC_SIGINFO_H
-#define _ASM_GENERIC_SIGINFO_H
-
-#include <uapi/asm-generic/siginfo.h>
-
-#define __SI_MASK	0xffff0000u
-#define __SI_KILL	(0 << 16)
-#define __SI_TIMER	(1 << 16)
-#define __SI_POLL	(2 << 16)
-#define __SI_FAULT	(3 << 16)
-#define __SI_CHLD	(4 << 16)
-#define __SI_RT		(5 << 16)
-#define __SI_MESGQ	(6 << 16)
-#define __SI_SYS	(7 << 16)
-#define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
-
-#endif
include/uapi/asm-generic/siginfo.h +13 -2
index 1abaf62..9c4eca6 100644
@@ -151,7 +151,18 @@ typedef struct siginfo {
 #define si_arch		_sifields._sigsys._arch
 #endif
 
-#ifndef __KERNEL__
+#ifdef __KERNEL__
+#define __SI_MASK	0xffff0000u
+#define __SI_KILL	(0 << 16)
+#define __SI_TIMER	(1 << 16)
+#define __SI_POLL	(2 << 16)
+#define __SI_FAULT	(3 << 16)
+#define __SI_CHLD	(4 << 16)
+#define __SI_RT		(5 << 16)
+#define __SI_MESGQ	(6 << 16)
+#define __SI_SYS	(7 << 16)
+#define __SI_CODE(T,N)	((T) | ((N) & 0xffff))
+#else /* __KERNEL__ */
 #define __SI_KILL	0
 #define __SI_TIMER	0
 #define __SI_POLL	0
@@ -161,7 +172,7 @@ typedef struct siginfo {
 #define __SI_MESGQ	0
 #define __SI_SYS	0
 #define __SI_CODE(T,N)	(N)
-#endif
+#endif /* __KERNEL__ */
 
 /*
  * si_code values
maintainer Acked-by
#15 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

We currently have uapi versions of <asm/siginfo.h> which at least on a few architectures define bits of the userspace ABI before including an uapi asm-generic version, and also non-uapi versions which do almost nothing except for making sure other headers include the right uapi one before including an asm-generic that defined two prototypes and a few defines that aren't architecture specific in any.

Quoted 5 lines

This series completely gets rid of the non-uapi versions and cleans up various small bits on the way.

Note that Thomas has some posix-timers work overlapping with this, so it might make sense to take these through the tip tree.

Yes, makes sense. For asm-generic: