From: Deepa Dinamani <deepa.kernel@gmail.com>
To: davem@davemloft.net, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org,
sparclinux@vger.kernel.org
Subject: [PATCH v3 3/8] arch: sparc: Override struct __kernel_old_timeval
Date: Tue, 08 Jan 2019 03:26:52 +0000 [thread overview]
Message-ID: <20190108032657.8331-4-deepa.kernel@gmail.com> (raw)
In-Reply-To: <20190108032657.8331-1-deepa.kernel@gmail.com>
struct __kernel_old_timeval is supposed to have the same
layout as struct timeval. But, it was inadvarently missed
that __kernel_suseconds has a different definition for
sparc64.
Provide an asm-specific override that fixes it.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: sparclinux@vger.kernel.org
---
arch/sparc/include/uapi/asm/posix_types.h | 10 ++++++++++
include/uapi/linux/time.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h
index fec499d6efb7..f139e0048628 100644
--- a/arch/sparc/include/uapi/asm/posix_types.h
+++ b/arch/sparc/include/uapi/asm/posix_types.h
@@ -19,6 +19,16 @@ typedef unsigned short __kernel_old_gid_t;
typedef int __kernel_suseconds_t;
#define __kernel_suseconds_t __kernel_suseconds_t
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+#define __kernel_long_t __kernel_long_t
+
+struct __kernel_old_timeval {
+ __kernel_long_t tv_sec;
+ __kernel_suseconds_t tv_usec;
+};
+#define __kernel_old_timeval __kernel_old_timeval
+
#else
/* sparc 32 bit */
diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
index 6b56a2208be7..04d5587f30d3 100644
--- a/include/uapi/linux/time.h
+++ b/include/uapi/linux/time.h
@@ -63,10 +63,12 @@ struct __kernel_itimerspec {
* here, this is probably because it is not y2038 safe and needs to
* be changed to use another interface.
*/
+#ifndef __kernel_old_timeval
struct __kernel_old_timeval {
__kernel_long_t tv_sec;
__kernel_long_t tv_usec;
};
+#endif
/*
* The IDs of the various system clocks (for POSIX.1b interval timers):
--
2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Deepa Dinamani <deepa.kernel@gmail.com>
To: davem@davemloft.net, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org,
sparclinux@vger.kernel.org
Subject: [PATCH v3 3/8] arch: sparc: Override struct __kernel_old_timeval
Date: Mon, 7 Jan 2019 19:26:52 -0800 [thread overview]
Message-ID: <20190108032657.8331-4-deepa.kernel@gmail.com> (raw)
In-Reply-To: <20190108032657.8331-1-deepa.kernel@gmail.com>
struct __kernel_old_timeval is supposed to have the same
layout as struct timeval. But, it was inadvarently missed
that __kernel_suseconds has a different definition for
sparc64.
Provide an asm-specific override that fixes it.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: sparclinux@vger.kernel.org
---
arch/sparc/include/uapi/asm/posix_types.h | 10 ++++++++++
include/uapi/linux/time.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/arch/sparc/include/uapi/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h
index fec499d6efb7..f139e0048628 100644
--- a/arch/sparc/include/uapi/asm/posix_types.h
+++ b/arch/sparc/include/uapi/asm/posix_types.h
@@ -19,6 +19,16 @@ typedef unsigned short __kernel_old_gid_t;
typedef int __kernel_suseconds_t;
#define __kernel_suseconds_t __kernel_suseconds_t
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+#define __kernel_long_t __kernel_long_t
+
+struct __kernel_old_timeval {
+ __kernel_long_t tv_sec;
+ __kernel_suseconds_t tv_usec;
+};
+#define __kernel_old_timeval __kernel_old_timeval
+
#else
/* sparc 32 bit */
diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
index 6b56a2208be7..04d5587f30d3 100644
--- a/include/uapi/linux/time.h
+++ b/include/uapi/linux/time.h
@@ -63,10 +63,12 @@ struct __kernel_itimerspec {
* here, this is probably because it is not y2038 safe and needs to
* be changed to use another interface.
*/
+#ifndef __kernel_old_timeval
struct __kernel_old_timeval {
__kernel_long_t tv_sec;
__kernel_long_t tv_usec;
};
+#endif
/*
* The IDs of the various system clocks (for POSIX.1b interval timers):
--
2.17.1
next prev parent reply other threads:[~2019-01-08 3:26 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 3:26 [PATCH v3 0/8] net: y2038-safe socket timestamps Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani
2019-01-08 3:26 ` [PATCH v3 1/8] arch: Use asm-generic/socket.h when possible Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani
2019-01-08 4:47 ` Max Filippov
2019-01-08 4:47 ` Max Filippov
2019-01-08 8:22 ` Heiko Carstens
2019-01-08 8:22 ` Heiko Carstens
2019-01-08 3:26 ` [PATCH v3 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani [this message]
2019-01-08 3:26 ` [PATCH v3 3/8] arch: sparc: Override struct __kernel_old_timeval Deepa Dinamani
2019-01-08 3:26 ` [PATCH v3 4/8] socket: Use old_timeval types for socket timestamps Deepa Dinamani
2019-01-08 3:26 ` [PATCH v3 5/8] socket: Add struct __kernel_sock_timeval Deepa Dinamani
2019-01-08 3:26 ` [PATCH v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani
2019-01-08 13:46 ` Willem de Bruijn
2019-01-08 13:46 ` Willem de Bruijn
2019-01-08 14:03 ` Willem de Bruijn
2019-01-08 14:03 ` Willem de Bruijn
2019-01-08 3:26 ` [PATCH v3 7/8] socket: Add SO_TIMESTAMPING_NEW Deepa Dinamani
2019-01-08 3:26 ` Deepa Dinamani
2019-01-08 13:40 ` Willem de Bruijn
2019-01-08 13:40 ` Willem de Bruijn
2019-01-08 3:26 ` [PATCH v3 8/8] socket: Update timestamping Documentation Deepa Dinamani
2019-01-08 13:37 ` [PATCH v3 0/8] net: y2038-safe socket timestamps Willem de Bruijn
2019-01-08 13:37 ` Willem de Bruijn
2019-01-08 13:37 ` Willem de Bruijn
2019-01-08 13:53 ` Willem de Bruijn
2019-01-08 13:53 ` Willem de Bruijn
2019-01-08 13:53 ` Willem de Bruijn
2019-01-08 13:53 ` Willem de Bruijn
2019-01-08 21:49 ` David Miller
2019-01-08 21:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190108032657.8331-4-deepa.kernel@gmail.com \
--to=deepa.kernel@gmail.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.