Skip to contentSkip to conversation

PATCH powerpc Merge asm-ppc*/seccomp.h

PATCH Jon Loeliger 2 participants 5 messages Sep 22, 2005 – Sep 23, 2005

lore
Share & tools
lore
#0 lore raw

Merge asm-ppc*/seccomp.h.

---

 include/asm-powerpc/seccomp.h |   21 +++++++++++++++++++++
 include/asm-ppc/seccomp.h     |   10 ----------
 include/asm-ppc64/seccomp.h   |   21 ---------------------
 3 files changed, 21 insertions(+), 31 deletions(-)
include/asm-powerpc/seccomp.h new file +21 -0
new file mode 100644
@@ -0,0 +1,21 @@
+#ifndef _ASM_POWERPC_SECCOMP_H
+
+#include <linux/thread_info.h>
+
+#if defined(__powerpc64__) && !defined(TIF_32BIT)
+#error "unexpected TIF_32BIT on ppc64"
+#endif
+
+#include <linux/unistd.h>
+
+#define __NR_seccomp_read __NR_read
+#define __NR_seccomp_write __NR_write
+#define __NR_seccomp_exit __NR_exit
+#define __NR_seccomp_sigreturn __NR_rt_sigreturn
+
+#define __NR_seccomp_read_32 __NR_read
+#define __NR_seccomp_write_32 __NR_write
+#define __NR_seccomp_exit_32 __NR_exit
+#define __NR_seccomp_sigreturn_32 __NR_sigreturn
+
+#endif	/* _ASM_POWERPC_SECCOMP_H */
include/asm-ppc/seccomp.h deleted +0 -10
deleted file mode 100644
@@ -1,10 +0,0 @@
-#ifndef _ASM_SECCOMP_H
-
-#include <linux/unistd.h>
-
-#define __NR_seccomp_read __NR_read
-#define __NR_seccomp_write __NR_write
-#define __NR_seccomp_exit __NR_exit
-#define __NR_seccomp_sigreturn __NR_rt_sigreturn
-
-#endif /* _ASM_SECCOMP_H */
include/asm-ppc64/seccomp.h deleted +0 -21
deleted file mode 100644
@@ -1,21 +0,0 @@
-#ifndef _ASM_SECCOMP_H
-
-#include <linux/thread_info.h> /* already defines TIF_32BIT */
-
-#ifndef TIF_32BIT
-#error "unexpected TIF_32BIT on ppc64"
-#endif
-
-#include <linux/unistd.h>
-
-#define __NR_seccomp_read __NR_read
-#define __NR_seccomp_write __NR_write
-#define __NR_seccomp_exit __NR_exit
-#define __NR_seccomp_sigreturn __NR_rt_sigreturn
-
-#define __NR_seccomp_read_32 __NR_read
-#define __NR_seccomp_write_32 __NR_write
-#define __NR_seccomp_exit_32 __NR_exit
-#define __NR_seccomp_sigreturn_32 __NR_sigreturn
-
-#endif /* _ASM_SECCOMP_H */
#1 lore raw

include/asm-powerpc/seccomp.h line 7

Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5 -0
+#include <linux/thread_info.h>
+
+#if defined(__powerpc64__) && !defined(TIF_32BIT)
+#error "unexpected TIF_32BIT on ppc64"
+#endif

just kill this check, it's rather pointless

#2 lore raw

So, like, the other day Christoph Hellwig mumbled:

Quoted 7 lines

include/asm-powerpc/seccomp.h line 7

Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5 -0
+#include <linux/thread_info.h>
+
+#if defined(__powerpc64__) && !defined(TIF_32BIT)
+#error "unexpected TIF_32BIT on ppc64"
+#endif

just kill this check, it's rather pointless

OK.

But keep the #include? It's actually the part that is defining TIF_32BIT for ppc64 (indirectly through linux/thread_info.h and asm/thread_info.h). Won't those bits be needed still?

jdl

#3 lore raw
Quoted 9 lines · Jon Loeliger

So, like, the other day Christoph Hellwig mumbled:

Quoted 7 lines

include/asm-powerpc/seccomp.h line 7

Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5 -0
+#include <linux/thread_info.h>
+
+#if defined(__powerpc64__) && !defined(TIF_32BIT)
+#error "unexpected TIF_32BIT on ppc64"
+#endif

just kill this check, it's rather pointless

Quoted 6 lines

OK.

But keep the #include? It's actually the part that is defining TIF_32BIT for ppc64 (indirectly through linux/thread_info.h and asm/thread_info.h). Won't those bits be needed still?

I'm not sure. This header definitly doesn't need it, but I suspect seccompt.c expects to get it via this header.

#4 lore raw

So, like, the other day Christoph Hellwig mumbled:

Quoted 8 lines
Quoted 5 lines

But keep the #include? It's actually the part that is defining TIF_32BIT for ppc64 (indirectly through linux/thread_info.h and asm/thread_info.h). Won't those bits be needed still?

I'm not sure. This header definitly doesn't need it, but I suspect seccompt.c expects to get it via this header.

I dug around in this a bit. The nested includes here yield a fairly wide distribution of availability of TIF_32BIT. I'm hesitant to remove it in this "merge" patch, so I will leave its removal to a follow on patch/effort.

New patch with #if test removed coming up.

jdl