Skip to content

Commit

Permalink
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull timers and timekeeping updates from Thomas Gleixner:

 - Core infrastucture work for Y2038 to address the COMPAT interfaces:

     + Add a new Y2038 safe __kernel_timespec and use it in the core
       code

     + Introduce config switches which allow to control the various
       compat mechanisms

     + Use the new config switch in the posix timer code to control the
       32bit compat syscall implementation.

 - Prevent bogus selection of CPU local clocksources which causes an
   endless reselection loop

 - Remove the extra kthread in the clocksource code which has no value
   and just adds another level of indirection

 - The usual bunch of trivial updates, cleanups and fixlets all over the
   place

 - More SPDX conversions

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
  clocksource/drivers/mxs_timer: Switch to SPDX identifier
  clocksource/drivers/timer-imx-tpm: Switch to SPDX identifier
  clocksource/drivers/timer-imx-gpt: Switch to SPDX identifier
  clocksource/drivers/timer-imx-gpt: Remove outdated file path
  clocksource/drivers/arc_timer: Add comments about locking while read GFRC
  clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages
  clocksource/drivers/sprd: Fix Kconfig dependency
  clocksource: Move inline keyword to the beginning of function declarations
  timer_list: Remove unused function pointer typedef
  timers: Adjust a kernel-doc comment
  tick: Prefer a lower rating device only if it's CPU local device
  clocksource: Remove kthread
  time: Change nanosleep to safe __kernel_* types
  time: Change types to new y2038 safe __kernel_* types
  time: Fix get_timespec64() for y2038 safe compat interfaces
  time: Add new y2038 safe __kernel_timespec
  posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME
  time: Introduce CONFIG_COMPAT_32BIT_TIME
  time: Introduce CONFIG_64BIT_TIME in architectures
  compat: Enable compat_get/put_timespec64 always
  ...
  • Loading branch information
torvalds committed Jun 5, 2018
2 parents 0ef283d + e45e778 commit 0bbcce5
Show file tree
Hide file tree
Showing 67 changed files with 266 additions and 270 deletions.
15 changes: 15 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,21 @@ config OLD_SIGACTION
config COMPAT_OLD_SIGACTION
bool

config 64BIT_TIME
def_bool ARCH_HAS_64BIT_TIME
help
This should be selected by all architectures that need to support
new system calls with a 64-bit time_t. This is relevant on all 32-bit
architectures, and 64-bit architectures as part of compat syscall
handling.

config COMPAT_32BIT_TIME
def_bool (!64BIT && 64BIT_TIME) || COMPAT
help
This enables 32 bit time_t support in addition to 64 bit time_t support.
This is relevant on all 32-bit architectures, and 64-bit architectures
as part of compat syscall handling.

config ARCH_NO_COHERENT_DMA_MMAP
bool

Expand Down
1 change: 1 addition & 0 deletions arch/alpha/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0


generic-y += compat.h
generic-y += exec.h
generic-y += export.h
generic-y += fb.h
Expand Down
1 change: 1 addition & 0 deletions arch/arc/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
generic-y += bugs.h
generic-y += compat.h
generic-y += device.h
generic-y += div64.h
generic-y += dma-mapping.h
Expand Down
1 change: 1 addition & 0 deletions arch/arm/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generic-y += compat.h
generic-y += current.h
generic-y += early_ioremap.h
generic-y += emergency-restart.h
Expand Down
11 changes: 0 additions & 11 deletions arch/arm64/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u16 __compat_uid_t;
Expand Down Expand Up @@ -66,16 +65,6 @@ typedef u32 compat_ulong_t;
typedef u64 compat_u64;
typedef u32 compat_uptr_t;

struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};

struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};

struct compat_stat {
#ifdef __AARCH64EB__
short st_dev;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/include/asm/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#ifdef CONFIG_COMPAT

#include <linux/compat_time.h>
#include <asm/compat.h>

/*
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <linux/smp.h>
#include <linux/uaccess.h>

#include <asm/compat.h>
#include <asm/current.h>
#include <asm/debug-monitors.h>
#include <asm/hw_breakpoint.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/perf_regs.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compat.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/perf_event.h>
#include <linux/bug.h>
#include <linux/sched/task_stack.h>

#include <asm/compat.h>
#include <asm/perf_regs.h>
#include <asm/ptrace.h>

Expand Down
1 change: 1 addition & 0 deletions arch/c6x/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
generic-y += atomic.h
generic-y += barrier.h
generic-y += bugs.h
generic-y += compat.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 1 addition & 0 deletions arch/h8300/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ generic-y += barrier.h
generic-y += bugs.h
generic-y += cacheflush.h
generic-y += checksum.h
generic-y += compat.h
generic-y += current.h
generic-y += delay.h
generic-y += device.h
Expand Down
1 change: 1 addition & 0 deletions arch/hexagon/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
generic-y += barrier.h
generic-y += bug.h
generic-y += bugs.h
generic-y += compat.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generic-y += compat.h
generic-y += exec.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
generic-y += barrier.h
generic-y += compat.h
generic-y += device.h
generic-y += emergency-restart.h
generic-y += exec.h
Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ generic-y += barrier.h
generic-y += bitops.h
generic-y += bug.h
generic-y += bugs.h
generic-y += compat.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
Expand Down
11 changes: 0 additions & 11 deletions arch/mips/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_suseconds_t;

Expand Down Expand Up @@ -46,16 +45,6 @@ typedef u32 compat_ulong_t;
typedef u64 compat_u64;
typedef u32 compat_uptr_t;

struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};

struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};

struct compat_stat {
compat_dev_t st_dev;
s32 st_pad1[3];
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/signal32.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
* Copyright (C) 2016, Imagination Technologies Ltd.
*/
#include <linux/compat.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/syscalls.h>

#include <asm/compat.h>
#include <asm/compat-signal.h>
#include <linux/uaccess.h>
#include <asm/unistd.h>
Expand Down
1 change: 1 addition & 0 deletions arch/nds32/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ generic-y += checksum.h
generic-y += clkdev.h
generic-y += cmpxchg.h
generic-y += cmpxchg-local.h
generic-y += compat.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 1 addition & 0 deletions arch/nios2/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ generic-y += bitops.h
generic-y += bug.h
generic-y += bugs.h
generic-y += cmpxchg.h
generic-y += compat.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 1 addition & 0 deletions arch/openrisc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ generic-y += barrier.h
generic-y += bug.h
generic-y += bugs.h
generic-y += checksum.h
generic-y += compat.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
11 changes: 0 additions & 11 deletions arch/parisc/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u32 __compat_uid_t;
Expand All @@ -40,16 +39,6 @@ typedef u32 compat_ulong_t;
typedef u64 compat_u64;
typedef u32 compat_uptr_t;

struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};

struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};

struct compat_stat {
compat_dev_t st_dev; /* dev_t is 32 bits on parisc */
compat_ino_t st_ino; /* 32 bits */
Expand Down
11 changes: 0 additions & 11 deletions arch/powerpc/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u32 __compat_uid_t;
Expand Down Expand Up @@ -45,16 +44,6 @@ typedef u32 compat_ulong_t;
typedef u64 compat_u64;
typedef u32 compat_uptr_t;

struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};

struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};

struct compat_stat {
compat_dev_t st_dev;
compat_ino_t st_ino;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* 2 of the License, or (at your option) any later version.
*/

#include <linux/compat.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -42,7 +43,6 @@
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/cache.h>
#include <asm/compat.h>
#include <asm/mmu.h>
#include <asm/hvcall.h>
#include <asm/xics.h>
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/oprofile/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* 2 of the License, or (at your option) any later version.
**/

#include <linux/compat_time.h>
#include <linux/oprofile.h>
#include <linux/sched.h>
#include <asm/processor.h>
Expand Down
1 change: 0 additions & 1 deletion arch/s390/hypfs/hypfs_sprp.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/string.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <asm/compat.h>
#include <asm/diag.h>
#include <asm/sclp.h>
#include "hypfs.h"
Expand Down
11 changes: 0 additions & 11 deletions arch/s390/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u16 __compat_uid_t;
Expand Down Expand Up @@ -97,16 +96,6 @@ typedef struct {
u32 gprs_high[NUM_GPRS];
} s390_compat_regs_high;

struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};

struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};

struct compat_stat {
compat_dev_t st_dev;
u16 __pad1;
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@
* ELF register definitions..
*/

#include <linux/compat.h>

#include <asm/ptrace.h>
#include <asm/compat.h>
#include <asm/syscall.h>
#include <asm/user.h>

Expand All @@ -136,7 +137,6 @@ typedef s390_regs elf_gregset_t;
typedef s390_fp_regs compat_elf_fpregset_t;
typedef s390_compat_regs compat_elf_gregset_t;

#include <linux/compat.h>
#include <linux/sched/mm.h> /* for task_struct */
#include <asm/mmu_context.h>

Expand Down
1 change: 0 additions & 1 deletion arch/s390/kvm/priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <asm/gmap.h>
#include <asm/io.h>
#include <asm/ptrace.h>
#include <asm/compat.h>
#include <asm/sclp.h>
#include "gaccess.h"
#include "kvm-s390.h"
Expand Down
1 change: 0 additions & 1 deletion arch/s390/pci/pci_clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/uaccess.h>
#include <asm/pci_debug.h>
#include <asm/pci_clp.h>
#include <asm/compat.h>
#include <asm/clp.h>
#include <uapi/asm/clp.h>

Expand Down
1 change: 1 addition & 0 deletions arch/sh/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generic-y += compat.h
generic-y += current.h
generic-y += delay.h
generic-y += div64.h
Expand Down
Loading

0 comments on commit 0bbcce5

Please sign in to comment.