* [PATCH v3 0/7] Introduce struct __kernel_timex
@ 2018-07-07 5:42 Deepa Dinamani
2018-07-07 5:42 ` [PATCH v3 3/7] riscv: Delete asm/compat.h Deepa Dinamani
0 siblings, 1 reply; 6+ messages in thread
From: Deepa Dinamani @ 2018-07-07 5:42 UTC (permalink / raw)
To: linux-riscv
The series introduces struct __kernel_timex as a substitute for
the non y2038 safe struct timex.
The series is based on the original series posted by Arnd Bergmann
in [1].
The overview of the series is as below:
1. Prepare for the compat timex interfaces to be used unconditionally.
2. Introduce struct __kernel_timex.
3. Use struct __kernel_timex in place of struct timex.
4. Switch syscalls to use struct __kernel_timex.
[1] https://sourceware.org/ml/libc-alpha/2015-05/msg00070.html
Changes since v2:
* Use only generic compat.h for riscv
Changes since v1:
* Fix riscv asm/compat.h to pick up generic compat types
Deepa Dinamani (7):
arm64: Make basic compat_* types always available
sparc: Make thread_info.h available directly
riscv: Delete asm/compat.h
timex: prepare compat helpers for y2038 changes
time: Add struct __kernel_timex
timex: use __kernel_timex internally
timex: change syscalls to use struct __kernel_timex
arch/alpha/kernel/osf_sys.c | 2 +-
arch/arm64/include/asm/compat.h | 22 ++++-----
arch/riscv/include/asm/Kbuild | 1 +
arch/riscv/include/asm/compat.h | 29 ------------
arch/sparc/include/asm/compat.h | 2 +
drivers/ptp/ptp_clock.c | 2 +-
include/asm-generic/compat.h | 8 +++-
include/linux/compat.h | 33 --------------
include/linux/compat_time.h | 34 ++++++++++++++
include/linux/posix-clock.h | 2 +-
include/linux/syscalls.h | 5 +--
include/linux/timex.h | 9 +++-
include/uapi/linux/timex.h | 41 +++++++++++++++++
kernel/compat.c | 63 --------------------------
kernel/time/ntp.c | 12 ++---
kernel/time/ntp_internal.h | 2 +-
kernel/time/posix-clock.c | 2 +-
kernel/time/posix-timers.c | 14 ++----
kernel/time/posix-timers.h | 2 +-
kernel/time/time.c | 80 ++++++++++++++++++++++++++++++---
kernel/time/timekeeping.c | 4 +-
21 files changed, 199 insertions(+), 170 deletions(-)
delete mode 100644 arch/riscv/include/asm/compat.h
base-commit: 526674536360a4c508e84f67314c2028e45e1bf2
--
2.17.1
Cc: catalin.marinas at arm.com
Cc: davem at davemloft.net
Cc: linux-alpha at vger.kernel.org
Cc: linux-api at vger.kernel.org
Cc: linux-arch at vger.kernel.org
Cc: linux-riscv at lists.infradead.org
Cc: netdev at vger.kernel.org
Cc: palmer at sifive.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/7] riscv: Delete asm/compat.h
2018-07-07 5:42 [PATCH v3 0/7] Introduce struct __kernel_timex Deepa Dinamani
@ 2018-07-07 5:42 ` Deepa Dinamani
2018-07-12 8:14 ` Christoph Hellwig
2018-08-03 1:26 ` Palmer Dabbelt
0 siblings, 2 replies; 6+ messages in thread
From: Deepa Dinamani @ 2018-07-07 5:42 UTC (permalink / raw)
To: linux-riscv
riscv does not enable CONFIG_COMPAT in default configurations:
defconfig, allmodconfig and allnoconfig.
Remove the asm/compat.h as it does not seem to add any value to
the architecture without CONFIG_COMPAT.
Now that time compat syscalls are being reused in non CONFIG_COMPAT
modes, asm-generic/compat.h provides definitions for riscv 32 bit
mode.
Alternative would be to make compat_time.h to be conditional on
CONFIG_COMPAT_32BIT_TIME. But, since riscv does not does not need
asm/compat.h, delete it instead.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: palmer at sifive.com
Cc: linux-riscv at lists.infradead.org
---
arch/riscv/include/asm/Kbuild | 1 +
arch/riscv/include/asm/compat.h | 29 -----------------------------
2 files changed, 1 insertion(+), 29 deletions(-)
delete mode 100644 arch/riscv/include/asm/compat.h
diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
index 576ffdca06ba..efdbe311e936 100644
--- a/arch/riscv/include/asm/Kbuild
+++ b/arch/riscv/include/asm/Kbuild
@@ -1,6 +1,7 @@
generic-y += bugs.h
generic-y += cacheflush.h
generic-y += checksum.h
+generic-y += compat.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
diff --git a/arch/riscv/include/asm/compat.h b/arch/riscv/include/asm/compat.h
deleted file mode 100644
index 044aecff8854..000000000000
--- a/arch/riscv/include/asm/compat.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2012 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __ASM_COMPAT_H
-#define __ASM_COMPAT_H
-#ifdef CONFIG_COMPAT
-
-#if defined(CONFIG_64BIT)
-#define COMPAT_UTS_MACHINE "riscv64\0\0"
-#elif defined(CONFIG_32BIT)
-#define COMPAT_UTS_MACHINE "riscv32\0\0"
-#else
-#error "Unknown RISC-V base ISA"
-#endif
-
-#endif /*CONFIG_COMPAT*/
-#endif /*__ASM_COMPAT_H*/
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/7] riscv: Delete asm/compat.h
2018-07-07 5:42 ` [PATCH v3 3/7] riscv: Delete asm/compat.h Deepa Dinamani
@ 2018-07-12 8:14 ` Christoph Hellwig
2018-08-03 1:26 ` Palmer Dabbelt
1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-07-12 8:14 UTC (permalink / raw)
To: linux-riscv
On Fri, Jul 06, 2018 at 10:42:43PM -0700, Deepa Dinamani wrote:
> riscv does not enable CONFIG_COMPAT in default configurations:
> defconfig, allmodconfig and allnoconfig.
> Remove the asm/compat.h as it does not seem to add any value to
> the architecture without CONFIG_COMPAT.
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Now that time compat syscalls are being reused in non CONFIG_COMPAT
> modes, asm-generic/compat.h provides definitions for riscv 32 bit
> mode.
>
> Alternative would be to make compat_time.h to be conditional on
> CONFIG_COMPAT_32BIT_TIME. But, since riscv does not does not need
> asm/compat.h, delete it instead.
Except that all this isn't relavant for this patch (and a horribly
bad idea, but ?'ll reply to it separately).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/7] riscv: Delete asm/compat.h
2018-07-07 5:42 ` [PATCH v3 3/7] riscv: Delete asm/compat.h Deepa Dinamani
2018-07-12 8:14 ` Christoph Hellwig
@ 2018-08-03 1:26 ` Palmer Dabbelt
2018-08-03 7:39 ` Christoph Hellwig
1 sibling, 1 reply; 6+ messages in thread
From: Palmer Dabbelt @ 2018-08-03 1:26 UTC (permalink / raw)
To: linux-riscv
On Fri, 06 Jul 2018 22:42:43 PDT (-0700), deepa.kernel at gmail.com wrote:
> riscv does not enable CONFIG_COMPAT in default configurations:
> defconfig, allmodconfig and allnoconfig.
> Remove the asm/compat.h as it does not seem to add any value to
> the architecture without CONFIG_COMPAT.
>
> Now that time compat syscalls are being reused in non CONFIG_COMPAT
> modes, asm-generic/compat.h provides definitions for riscv 32 bit
> mode.
>
> Alternative would be to make compat_time.h to be conditional on
> CONFIG_COMPAT_32BIT_TIME. But, since riscv does not does not need
> asm/compat.h, delete it instead.
>
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> Cc: palmer at sifive.com
> Cc: linux-riscv at lists.infradead.org
> ---
> arch/riscv/include/asm/Kbuild | 1 +
> arch/riscv/include/asm/compat.h | 29 -----------------------------
> 2 files changed, 1 insertion(+), 29 deletions(-)
> delete mode 100644 arch/riscv/include/asm/compat.h
>
> diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
> index 576ffdca06ba..efdbe311e936 100644
> --- a/arch/riscv/include/asm/Kbuild
> +++ b/arch/riscv/include/asm/Kbuild
> @@ -1,6 +1,7 @@
> generic-y += bugs.h
> generic-y += cacheflush.h
> generic-y += checksum.h
> +generic-y += compat.h
> generic-y += cputime.h
> generic-y += device.h
> generic-y += div64.h
> diff --git a/arch/riscv/include/asm/compat.h b/arch/riscv/include/asm/compat.h
> deleted file mode 100644
> index 044aecff8854..000000000000
> --- a/arch/riscv/include/asm/compat.h
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -/*
> - * Copyright (C) 2012 ARM Ltd.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program. If not, see <http://www.gnu.org/licenses/>.
> - */
> -#ifndef __ASM_COMPAT_H
> -#define __ASM_COMPAT_H
> -#ifdef CONFIG_COMPAT
> -
> -#if defined(CONFIG_64BIT)
> -#define COMPAT_UTS_MACHINE "riscv64\0\0"
> -#elif defined(CONFIG_32BIT)
> -#define COMPAT_UTS_MACHINE "riscv32\0\0"
> -#else
> -#error "Unknown RISC-V base ISA"
> -#endif
> -
> -#endif /*CONFIG_COMPAT*/
> -#endif /*__ASM_COMPAT_H*/
I thought we were using this to make uname print "riscv64" (or "riscv32")
instead of just "riscv"? Is there another mechanism to do that?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/7] riscv: Delete asm/compat.h
2018-08-03 1:26 ` Palmer Dabbelt
@ 2018-08-03 7:39 ` Christoph Hellwig
2018-08-05 21:29 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2018-08-03 7:39 UTC (permalink / raw)
To: linux-riscv
On Thu, Aug 02, 2018 at 06:26:58PM -0700, Palmer Dabbelt wrote:
> I thought we were using this to make uname print "riscv64" (or "riscv32")
> instead of just "riscv"? Is there another mechanism to do that?
That is set in the UTS_MACHINE variable in arch/riscv/Makefile
and doesn't involve compat.h at all except when actually implementing
32-bit compat on 64 bit, which RISC-V doesn't (at least yet).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/7] riscv: Delete asm/compat.h
2018-08-03 7:39 ` Christoph Hellwig
@ 2018-08-05 21:29 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-08-05 21:29 UTC (permalink / raw)
To: linux-riscv
On Fri, Aug 3, 2018 at 9:39 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Thu, Aug 02, 2018 at 06:26:58PM -0700, Palmer Dabbelt wrote:
>> I thought we were using this to make uname print "riscv64" (or "riscv32")
>> instead of just "riscv"? Is there another mechanism to do that?
>
> That is set in the UTS_MACHINE variable in arch/riscv/Makefile
> and doesn't involve compat.h at all except when actually implementing
> 32-bit compat on 64 bit, which RISC-V doesn't (at least yet).
Note that the logic was also wrong, if we had an implementation of
CONFIG_COMPAT for arch/riscv, it would always result in the
"riscv64" string for both PER_LINUX and PER_LINUX32, when
it should be "riscv32" for the PER_LINUX32 personaliy.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-05 21:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-07 5:42 [PATCH v3 0/7] Introduce struct __kernel_timex Deepa Dinamani
2018-07-07 5:42 ` [PATCH v3 3/7] riscv: Delete asm/compat.h Deepa Dinamani
2018-07-12 8:14 ` Christoph Hellwig
2018-08-03 1:26 ` Palmer Dabbelt
2018-08-03 7:39 ` Christoph Hellwig
2018-08-05 21:29 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).