Thread (12 messages) flat view 12 messages, 7 authors, 2018-03-12

Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h

From: Christian Borntraeger <hidden>
Date: 2018-03-05 09:30:26
Also in: linux-mips, linux-s390, lkml, sparclinux

On 01/16/2018 03:18 AM, Deepa Dinamani wrote:
All the current architecture specific defines for these
are the same. Refactor these common defines to a common
header file.

The new common linux/compat_time.h is also useful as it
will eventually be used to hold all the defines that
are needed for compat time types that support non y2038
safe types. New architectures need not have to define these
new types as they will only use new y2038 safe syscalls.
This file can be deleted after y2038 when we stop supporting
non y2038 safe syscalls.
You are now include a <linux/*.h> from several asm files
(
 arch/arm64/include/asm/stat.h   
 arch/s390/include/asm/elf.h     
 arch/x86/include/asm/ftrace.h   
 arch/x86/include/asm/sys_ia32.h 
)
It works, and it is done in many places, but it looks somewhat weird.
Would it make sense to have an asm-generic/compate-time.h instead? Asking for
opinions here.
The patch also requires an operation similar to:

git grep "asm/compat\.h" | cut -d ":" -f 1 |  xargs -n 1 sed -i -e "s%asm/compat.h%linux/compat.h%g"
some comments from the s390 perspective:
quoted hunk ↗ jump to hunk
--- a/arch/s390/hypfs/hypfs_sprp.c
+++ b/arch/s390/hypfs/hypfs_sprp.c
ok.
[...]
quoted hunk ↗ jump to hunk
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -126,7 +126,7 @@
  */

 #include <asm/ptrace.h>
-#include <asm/compat.h>
+#include <linux/compat.h>
 #include <asm/syscall.h>
 #include <asm/user.h>
see above.
[...]
quoted hunk ↗ jump to hunk
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
ok
quoted hunk ↗ jump to hunk
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
ok
quoted hunk ↗ jump to hunk
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
ok 
quoted hunk ↗ jump to hunk
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
ok
quoted hunk ↗ jump to hunk
--- a/drivers/s390/char/sclp_ctl.c
+++ b/drivers/s390/char/sclp_ctl.c
ok
quoted hunk ↗ jump to hunk
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
ok
quoted hunk ↗ jump to hunk
--- a/drivers/s390/cio/chsc_sch.c
+++ b/drivers/s390/cio/chsc_sch.c
ok
quoted hunk ↗ jump to hunk
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -32,7 +32,7 @@
 #include <asm/chpid.h>
 #include <asm/io.h>
 #include <asm/sysinfo.h>
-#include <asm/compat.h>
+#include <linux/compat.h>
 #include <asm/diag.h>
 #include <asm/cio.h>
 #include <asm/ccwdev.h>
Can you move that into the other includes (where all the other <linux/*> includes are.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help