* untangle the <asm/siginfo.h> mess
@ 2017-06-03 19:00 Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
` (6 more replies)
0 siblings, 7 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* untangle the <asm/siginfo.h> mess
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
@ 2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:00 ` [PATCH 1/5] sparc: simplify <asm/siginfo.h> Christoph Hellwig
` (5 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/5] sparc: simplify <asm/siginfo.h>
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
@ 2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 21:10 ` David Miller
2017-06-03 19:00 ` [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO Christoph Hellwig
` (4 subsequent siblings)
6 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/sparc/include/asm/siginfo.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h
index 48c34c19f810..dd2f2fce976b 100644
--- a/arch/sparc/include/asm/siginfo.h
+++ b/arch/sparc/include/asm/siginfo.h
@@ -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) */
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 1/5] sparc: simplify <asm/siginfo.h>
2017-06-03 19:00 ` [PATCH 1/5] sparc: simplify <asm/siginfo.h> Christoph Hellwig
@ 2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 21:10 ` David Miller
1 sibling, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/sparc/include/asm/siginfo.h | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h
index 48c34c19f810..dd2f2fce976b 100644
--- a/arch/sparc/include/asm/siginfo.h
+++ b/arch/sparc/include/asm/siginfo.h
@@ -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) */
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:00 ` [PATCH 1/5] sparc: simplify <asm/siginfo.h> Christoph Hellwig
@ 2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:01 ` [PATCH 3/5] posix-timers: move the do_schedule_next_timer declaration Christoph Hellwig
` (3 subsequent siblings)
6 siblings, 1 reply; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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(-)
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
index 6f2e2dd0f28f..dd2f2fce976b 100644
--- a/arch/ia64/include/asm/siginfo.h
+++ b/arch/ia64/include/asm/siginfo.h
@@ -1,23 +1 @@
-/*
- * Based on <asm-i386/siginfo.h>.
- *
- * Modified 1998-2002
- * David Mosberger-Tang <davidm@hpl.hp.com>, 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 */
diff --git a/arch/ia64/include/uapi/asm/siginfo.h b/arch/ia64/include/uapi/asm/siginfo.h
index f72bf0172bb2..4694c64252d6 100644
--- a/arch/ia64/include/uapi/asm/siginfo.h
+++ b/arch/ia64/include/uapi/asm/siginfo.h
@@ -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>
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1f5a16620693..80c7418be359 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -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.
*/
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO
2017-06-03 19:00 ` [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO Christoph Hellwig
@ 2017-06-03 19:00 ` Christoph Hellwig
0 siblings, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:00 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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(-)
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
index 6f2e2dd0f28f..dd2f2fce976b 100644
--- a/arch/ia64/include/asm/siginfo.h
+++ b/arch/ia64/include/asm/siginfo.h
@@ -1,23 +1 @@
-/*
- * Based on <asm-i386/siginfo.h>.
- *
- * Modified 1998-2002
- * David Mosberger-Tang <davidm@hpl.hp.com>, 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 */
diff --git a/arch/ia64/include/uapi/asm/siginfo.h b/arch/ia64/include/uapi/asm/siginfo.h
index f72bf0172bb2..4694c64252d6 100644
--- a/arch/ia64/include/uapi/asm/siginfo.h
+++ b/arch/ia64/include/uapi/asm/siginfo.h
@@ -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>
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1f5a16620693..80c7418be359 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -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.
*/
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/5] posix-timers: move the do_schedule_next_timer declaration
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
` (2 preceding siblings ...)
2017-06-03 19:00 ` [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO Christoph Hellwig
@ 2017-06-03 19:01 ` Christoph Hellwig
2017-06-03 19:01 ` [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h> Christoph Hellwig
` (2 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:01 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/asm-generic/siginfo.h | 1 -
include/linux/posix-timers.h | 3 +++
kernel/signal.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index a2508a8f9a9c..5a9394763a66 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -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);
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 8c1e43ab14a9..fa25c23192a4 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -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
diff --git a/kernel/signal.c b/kernel/signal.c
index ca92bcfeb322..1f85c843be8e 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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>
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h>
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
` (3 preceding siblings ...)
2017-06-03 19:01 ` [PATCH 3/5] posix-timers: move the do_schedule_next_timer declaration Christoph Hellwig
@ 2017-06-03 19:01 ` Christoph Hellwig
2017-06-03 19:01 ` Christoph Hellwig
2017-06-03 19:01 ` [PATCH 5/5] remove non-uapi <asm/siginfo.h> Christoph Hellwig
2017-06-06 10:57 ` untangle the <asm/siginfo.h> mess Arnd Bergmann
6 siblings, 1 reply; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:01 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/asm-generic/siginfo.h | 4 ----
include/linux/signal.h | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 5a9394763a66..31268a5bf63e 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -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
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 80c7418be359..a39feddd71ba 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -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.
*/
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h>
2017-06-03 19:01 ` [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h> Christoph Hellwig
@ 2017-06-03 19:01 ` Christoph Hellwig
0 siblings, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:01 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/asm-generic/siginfo.h | 4 ----
include/linux/signal.h | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 5a9394763a66..31268a5bf63e 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -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
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 80c7418be359..a39feddd71ba 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -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.
*/
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
` (4 preceding siblings ...)
2017-06-03 19:01 ` [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h> Christoph Hellwig
@ 2017-06-03 19:01 ` Christoph Hellwig
2017-06-03 19:01 ` Christoph Hellwig
2017-06-04 13:13 ` Thomas Gleixner
2017-06-06 10:57 ` untangle the <asm/siginfo.h> mess Arnd Bergmann
6 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:01 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild
index 7bee4e4799fd..3e74ca5e6402 100644
--- a/arch/arc/include/asm/Kbuild
+++ b/arch/arc/include/asm/Kbuild
@@ -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
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 3a36d99ff836..d8360501c082 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -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
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index 607f702c2d62..e9b098d6b766 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -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
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild
index f0eaf0475e7e..a3c8d05c4cc7 100644
--- a/arch/c6x/include/asm/Kbuild
+++ b/arch/c6x/include/asm/Kbuild
@@ -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
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index 13a97aa2285f..1c44d3b3eba0 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -2,3 +2,4 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h
+generic-y += siginfo.h
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild
index 2890099992a9..acc5781100c2 100644
--- a/arch/cris/include/asm/Kbuild
+++ b/arch/cris/include/asm/Kbuild
@@ -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
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild
index 757cdeb24e6e..99c824608a31 100644
--- a/arch/h8300/include/asm/Kbuild
+++ b/arch/h8300/include/asm/Kbuild
@@ -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
diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/h8300/include/uapi/asm/Kbuild
+++ b/arch/h8300/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
index 6b45ef79eb8f..0fc9cb04e6ad 100644
--- a/arch/hexagon/include/asm/Kbuild
+++ b/arch/hexagon/include/asm/Kbuild
@@ -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
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
deleted file mode 100644
index dd2f2fce976b..000000000000
--- a/arch/ia64/include/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index 82005d2ff717..5ecf4e47b2e2 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -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
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
index 64368077235a..68b45cc87e2c 100644
--- a/arch/m68k/include/uapi/asm/Kbuild
+++ b/arch/m68k/include/uapi/asm/Kbuild
@@ -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
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild
index 727dbb333f60..e1a843def56f 100644
--- a/arch/nios2/include/asm/Kbuild
+++ b/arch/nios2/include/asm/Kbuild
@@ -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
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index 374bd123329f..51eff5bc2eb4 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -2,4 +2,5 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += setup.h
+generic-y += siginfo.h
generic-y += ucontext.h
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index fdbcf0bf44a4..091585addb91 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -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
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/openrisc/include/uapi/asm/Kbuild
+++ b/arch/openrisc/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index cf2a75063b53..590c91ae7541 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -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
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index b15bf6bc0e94..4cb0d2f8868c 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,2 +1,3 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h
deleted file mode 100644
index dd2f2fce976b..000000000000
--- a/arch/sparc/include/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild
index e9ad511c1043..7a53a55341de 100644
--- a/arch/unicore32/include/asm/Kbuild
+++ b/arch/unicore32/include/asm/Kbuild
@@ -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
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index cc23e9ecc6bb..30f6290109d4 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -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
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index b15bf6bc0e94..4cb0d2f8868c 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -1,2 +1,3 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
deleted file mode 100644
index 31268a5bf63e..000000000000
--- a/include/asm-generic/siginfo.h
+++ /dev/null
@@ -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
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
index 1abaf62c86fc..9c4eca6b374a 100644
--- a/include/uapi/asm-generic/siginfo.h
+++ b/include/uapi/asm-generic/siginfo.h
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-03 19:01 ` [PATCH 5/5] remove non-uapi <asm/siginfo.h> Christoph Hellwig
@ 2017-06-03 19:01 ` Christoph Hellwig
2017-06-04 13:13 ` Thomas Gleixner
1 sibling, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-03 19:01 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner, David S. Miller, Tony Luck,
Fenghua Yu
Cc: linux-arch, sparclinux, linux-ia64, linux-kernel
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
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
diff --git a/arch/arc/include/asm/Kbuild b/arch/arc/include/asm/Kbuild
index 7bee4e4799fd..3e74ca5e6402 100644
--- a/arch/arc/include/asm/Kbuild
+++ b/arch/arc/include/asm/Kbuild
@@ -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
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 3a36d99ff836..d8360501c082 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -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
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild
index 607f702c2d62..e9b098d6b766 100644
--- a/arch/arm/include/uapi/asm/Kbuild
+++ b/arch/arm/include/uapi/asm/Kbuild
@@ -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
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild
index f0eaf0475e7e..a3c8d05c4cc7 100644
--- a/arch/c6x/include/asm/Kbuild
+++ b/arch/c6x/include/asm/Kbuild
@@ -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
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild
index 13a97aa2285f..1c44d3b3eba0 100644
--- a/arch/c6x/include/uapi/asm/Kbuild
+++ b/arch/c6x/include/uapi/asm/Kbuild
@@ -2,3 +2,4 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h
+generic-y += siginfo.h
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild
index 2890099992a9..acc5781100c2 100644
--- a/arch/cris/include/asm/Kbuild
+++ b/arch/cris/include/asm/Kbuild
@@ -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
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild
index 757cdeb24e6e..99c824608a31 100644
--- a/arch/h8300/include/asm/Kbuild
+++ b/arch/h8300/include/asm/Kbuild
@@ -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
diff --git a/arch/h8300/include/uapi/asm/Kbuild b/arch/h8300/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/h8300/include/uapi/asm/Kbuild
+++ b/arch/h8300/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild
index 6b45ef79eb8f..0fc9cb04e6ad 100644
--- a/arch/hexagon/include/asm/Kbuild
+++ b/arch/hexagon/include/asm/Kbuild
@@ -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
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h
deleted file mode 100644
index dd2f2fce976b..000000000000
--- a/arch/ia64/include/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index 82005d2ff717..5ecf4e47b2e2 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -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
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
index 64368077235a..68b45cc87e2c 100644
--- a/arch/m68k/include/uapi/asm/Kbuild
+++ b/arch/m68k/include/uapi/asm/Kbuild
@@ -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
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild
index 727dbb333f60..e1a843def56f 100644
--- a/arch/nios2/include/asm/Kbuild
+++ b/arch/nios2/include/asm/Kbuild
@@ -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
diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index 374bd123329f..51eff5bc2eb4 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -2,4 +2,5 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += setup.h
+generic-y += siginfo.h
generic-y += ucontext.h
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild
index fdbcf0bf44a4..091585addb91 100644
--- a/arch/openrisc/include/asm/Kbuild
+++ b/arch/openrisc/include/asm/Kbuild
@@ -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
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild
index b15bf6bc0e94..b55fc2ae1e8c 100644
--- a/arch/openrisc/include/uapi/asm/Kbuild
+++ b/arch/openrisc/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild
index cf2a75063b53..590c91ae7541 100644
--- a/arch/sh/include/asm/Kbuild
+++ b/arch/sh/include/asm/Kbuild
@@ -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
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild
index b15bf6bc0e94..4cb0d2f8868c 100644
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,2 +1,3 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h
deleted file mode 100644
index dd2f2fce976b..000000000000
--- a/arch/sparc/include/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <uapi/asm/siginfo.h>
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild
index e9ad511c1043..7a53a55341de 100644
--- a/arch/unicore32/include/asm/Kbuild
+++ b/arch/unicore32/include/asm/Kbuild
@@ -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
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index cc23e9ecc6bb..30f6290109d4 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -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
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index b15bf6bc0e94..4cb0d2f8868c 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -1,2 +1,3 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+generic-y += siginfo.h
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
deleted file mode 100644
index 31268a5bf63e..000000000000
--- a/include/asm-generic/siginfo.h
+++ /dev/null
@@ -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
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
index 1abaf62c86fc..9c4eca6b374a 100644
--- a/include/uapi/asm-generic/siginfo.h
+++ b/include/uapi/asm-generic/siginfo.h
@@ -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
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] sparc: simplify <asm/siginfo.h>
2017-06-03 19:00 ` [PATCH 1/5] sparc: simplify <asm/siginfo.h> Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
@ 2017-06-03 21:10 ` David Miller
2017-06-03 21:10 ` David Miller
1 sibling, 1 reply; 20+ messages in thread
From: David Miller @ 2017-06-03 21:10 UTC (permalink / raw)
To: hch
Cc: arnd, tglx, tony.luck, fenghua.yu, linux-arch, sparclinux,
linux-ia64, linux-kernel
From: Christoph Hellwig <hch@lst.de>
Date: Sat, 3 Jun 2017 21:00:58 +0200
> 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.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/5] sparc: simplify <asm/siginfo.h>
2017-06-03 21:10 ` David Miller
@ 2017-06-03 21:10 ` David Miller
0 siblings, 0 replies; 20+ messages in thread
From: David Miller @ 2017-06-03 21:10 UTC (permalink / raw)
To: hch
Cc: arnd, tglx, tony.luck, fenghua.yu, linux-arch, sparclinux,
linux-ia64, linux-kernel
From: Christoph Hellwig <hch@lst.de>
Date: Sat, 3 Jun 2017 21:00:58 +0200
> 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.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-03 19:01 ` [PATCH 5/5] remove non-uapi <asm/siginfo.h> Christoph Hellwig
2017-06-03 19:01 ` Christoph Hellwig
@ 2017-06-04 13:13 ` Thomas Gleixner
2017-06-05 7:18 ` Christoph Hellwig
1 sibling, 1 reply; 20+ messages in thread
From: Thomas Gleixner @ 2017-06-04 13:13 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Arnd Bergmann, David S. Miller, Tony Luck, Fenghua Yu, linux-arch,
sparclinux, linux-ia64, linux-kernel
On Sat, 3 Jun 2017, Christoph Hellwig wrote:
> 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<--------------------
--- a/arch/sh/include/uapi/asm/Kbuild
+++ b/arch/sh/include/uapi/asm/Kbuild
@@ -1,3 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
generic-y += siginfo.h
--- a/arch/arc/include/uapi/asm/Kbuild
+++ b/arch/arc/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
--- a/arch/hexagon/include/uapi/asm/Kbuild
+++ b/arch/hexagon/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
--- a/arch/m32r/include/uapi/asm/Kbuild
+++ b/arch/m32r/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
--- a/arch/m32r/include/uapi/asm/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _M32R_SIGINFO_H
-#define _M32R_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _M32R_SIGINFO_H */
--- a/arch/microblaze/include/uapi/asm/Kbuild
+++ b/arch/microblaze/include/uapi/asm/Kbuild
@@ -2,3 +2,4 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += types.h
+generic-y += siginfo.h
--- a/arch/microblaze/include/uapi/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
--- a/arch/mn10300/include/uapi/asm/Kbuild
+++ b/arch/mn10300/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
--- a/arch/mn10300/include/uapi/asm/siginfo.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/siginfo.h>
--- a/arch/score/include/uapi/asm/Kbuild
+++ b/arch/score/include/uapi/asm/Kbuild
@@ -1,2 +1,4 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm
+
+generic-y += siginfo.h
--- a/arch/score/include/uapi/asm/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_SCORE_SIGINFO_H
-#define _ASM_SCORE_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif /* _ASM_SCORE_SIGINFO_H */
--- a/arch/unicore32/include/uapi/asm/Kbuild
+++ b/arch/unicore32/include/uapi/asm/Kbuild
@@ -2,3 +2,4 @@
include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h
+generic-y += siginfo.h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-04 13:13 ` Thomas Gleixner
@ 2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 8:00 ` Thomas Gleixner
0 siblings, 2 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-05 7:18 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Christoph Hellwig, Arnd Bergmann, David S. Miller, Tony Luck,
Fenghua Yu, linux-arch, sparclinux, linux-ia64, linux-kernel
On Sun, Jun 04, 2017 at 03:13:11PM +0200, Thomas Gleixner wrote:
> On Sat, 3 Jun 2017, Christoph Hellwig wrote:
>
> > 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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-05 7:18 ` Christoph Hellwig
@ 2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 8:00 ` Thomas Gleixner
1 sibling, 0 replies; 20+ messages in thread
From: Christoph Hellwig @ 2017-06-05 7:18 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Christoph Hellwig, Arnd Bergmann, David S. Miller, Tony Luck,
Fenghua Yu, linux-arch, sparclinux, linux-ia64, linux-kernel
On Sun, Jun 04, 2017 at 03:13:11PM +0200, Thomas Gleixner wrote:
> On Sat, 3 Jun 2017, Christoph Hellwig wrote:
>
> > 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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 7:18 ` Christoph Hellwig
@ 2017-06-05 8:00 ` Thomas Gleixner
2017-06-05 8:00 ` Thomas Gleixner
1 sibling, 1 reply; 20+ messages in thread
From: Thomas Gleixner @ 2017-06-05 8:00 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Arnd Bergmann, David S. Miller, Tony Luck, Fenghua Yu, linux-arch,
sparclinux, linux-ia64, linux-kernel
On Mon, 5 Jun 2017, Christoph Hellwig wrote:
> On Sun, Jun 04, 2017 at 03:13:11PM +0200, Thomas Gleixner wrote:
> > On Sat, 3 Jun 2017, Christoph Hellwig wrote:
> >
> > > 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.
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
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/5] remove non-uapi <asm/siginfo.h>
2017-06-05 8:00 ` Thomas Gleixner
@ 2017-06-05 8:00 ` Thomas Gleixner
0 siblings, 0 replies; 20+ messages in thread
From: Thomas Gleixner @ 2017-06-05 8:00 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Arnd Bergmann, David S. Miller, Tony Luck, Fenghua Yu, linux-arch,
sparclinux, linux-ia64, linux-kernel
On Mon, 5 Jun 2017, Christoph Hellwig wrote:
> On Sun, Jun 04, 2017 at 03:13:11PM +0200, Thomas Gleixner wrote:
> > On Sat, 3 Jun 2017, Christoph Hellwig wrote:
> >
> > > 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.
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
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: untangle the <asm/siginfo.h> mess
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
` (5 preceding siblings ...)
2017-06-03 19:01 ` [PATCH 5/5] remove non-uapi <asm/siginfo.h> Christoph Hellwig
@ 2017-06-06 10:57 ` Arnd Bergmann
2017-06-06 10:57 ` Arnd Bergmann
6 siblings, 1 reply; 20+ messages in thread
From: Arnd Bergmann @ 2017-06-06 10:57 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Thomas Gleixner, David S. Miller, Tony Luck, Fenghua Yu,
linux-arch, sparclinux, linux-ia64, Linux Kernel Mailing List
On Sat, Jun 3, 2017 at 9:00 PM, Christoph Hellwig <hch@lst.de> wrote:
> 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.
Yes, makes sense. For asm-generic:
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: untangle the <asm/siginfo.h> mess
2017-06-06 10:57 ` untangle the <asm/siginfo.h> mess Arnd Bergmann
@ 2017-06-06 10:57 ` Arnd Bergmann
0 siblings, 0 replies; 20+ messages in thread
From: Arnd Bergmann @ 2017-06-06 10:57 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Thomas Gleixner, David S. Miller, Tony Luck, Fenghua Yu,
linux-arch, sparclinux, linux-ia64, Linux Kernel Mailing List
On Sat, Jun 3, 2017 at 9:00 PM, Christoph Hellwig <hch@lst.de> wrote:
> 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.
Yes, makes sense. For asm-generic:
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2017-06-06 10:57 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-03 19:00 untangle the <asm/siginfo.h> mess Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:00 ` [PATCH 1/5] sparc: simplify <asm/siginfo.h> Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 21:10 ` David Miller
2017-06-03 21:10 ` David Miller
2017-06-03 19:00 ` [PATCH 2/5] ia64: remove HAVE_ARCH_COPY_SIGINFO Christoph Hellwig
2017-06-03 19:00 ` Christoph Hellwig
2017-06-03 19:01 ` [PATCH 3/5] posix-timers: move the do_schedule_next_timer declaration Christoph Hellwig
2017-06-03 19:01 ` [PATCH 4/5] signal: move copy_siginfo_to_user to <linux/signal.h> Christoph Hellwig
2017-06-03 19:01 ` Christoph Hellwig
2017-06-03 19:01 ` [PATCH 5/5] remove non-uapi <asm/siginfo.h> Christoph Hellwig
2017-06-03 19:01 ` Christoph Hellwig
2017-06-04 13:13 ` Thomas Gleixner
2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 7:18 ` Christoph Hellwig
2017-06-05 8:00 ` Thomas Gleixner
2017-06-05 8:00 ` Thomas Gleixner
2017-06-06 10:57 ` untangle the <asm/siginfo.h> mess Arnd Bergmann
2017-06-06 10:57 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox