Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Mar 2011 01:53:35 +0000 (18:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Mar 2011 01:53:35 +0000 (18:53 -0700)
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (62 commits)
  posix-clocks: Check write permissions in posix syscalls
  hrtimer: Remove empty hrtimer_init_hres_timer()
  hrtimer: Update hrtimer->state documentation
  hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
  timers: Export CLOCK_BOOTTIME via the posix timers interface
  timers: Add CLOCK_BOOTTIME hrtimer base
  time: Extend get_xtime_and_monotonic_offset() to also return sleep
  time: Introduce get_monotonic_boottime and ktime_get_boottime
  hrtimers: extend hrtimer base code to handle more then 2 clockids
  ntp: Remove redundant and incorrect parameter check
  mn10300: Switch do_timer() to xtimer_update()
  posix clocks: Introduce dynamic clocks
  posix-timers: Cleanup namespace
  posix-timers: Add support for fd based clocks
  x86: Add clock_adjtime for x86
  posix-timers: Introduce a syscall for clock tuning.
  time: Splitout compat timex accessors
  ntp: Add ADJ_SETOFFSET mode bit
  time: Introduce timekeeping_inject_offset
  posix-timer: Update comment
  ...

Fix up new system-call-related conflicts in
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/syscall_table_32.S
(name_to_handle_at()/open_by_handle_at() vs clock_adjtime()), and some
due to movement of get_jiffies_64() in:
kernel/time.c

14 files changed:
1  2 
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/syscall_table_32.S
include/linux/sched.h
include/linux/security.h
include/linux/syscalls.h
kernel/hrtimer.c
kernel/time.c
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-internal.h
kernel/timer.c
security/security.c

@@@ -853,6 -851,5 +853,7 @@@ ia32_sys_call_table
        .quad sys_fanotify_init
        .quad sys32_fanotify_mark
        .quad sys_prlimit64             /* 340 */
 +      .quad sys_name_to_handle_at
 +      .quad compat_sys_open_by_handle_at
+       .quad compat_sys_clock_adjtime
  ia32_syscall_end:
  #define __NR_fanotify_init    338
  #define __NR_fanotify_mark    339
  #define __NR_prlimit64                340
 -#define __NR_clock_adjtime    341
 +#define __NR_name_to_handle_at        341
 +#define __NR_open_by_handle_at  342
++#define __NR_clock_adjtime    343
  
  #ifdef __KERNEL__
  
- #define NR_syscalls 343
 -#define NR_syscalls 342
++#define NR_syscalls 344
  
  #define __ARCH_WANT_IPC_PARSE_VERSION
  #define __ARCH_WANT_OLD_READDIR
@@@ -669,10 -669,8 +669,12 @@@ __SYSCALL(__NR_fanotify_init, sys_fanot
  __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
  #define __NR_prlimit64                                302
  __SYSCALL(__NR_prlimit64, sys_prlimit64)
 -#define __NR_clock_adjtime                    303
 +#define __NR_name_to_handle_at                        303
 +__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
 +#define __NR_open_by_handle_at                        304
 +__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at)
++#define __NR_clock_adjtime                    305
+ __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime)
  
  #ifndef __NO_STUBS
  #define __ARCH_WANT_OLD_READDIR
@@@ -340,5 -340,4 +340,6 @@@ ENTRY(sys_call_table
        .long sys_fanotify_init
        .long sys_fanotify_mark
        .long sys_prlimit64             /* 340 */
 +      .long sys_name_to_handle_at
 +      .long sys_open_by_handle_at
+       .long sys_clock_adjtime
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/time.c
@@@ -674,42 -674,6 +674,24 @@@ u64 nsecs_to_jiffies64(u64 n
  #endif
  }
  
 +/**
 + * nsecs_to_jiffies - Convert nsecs in u64 to jiffies
 + *
 + * @n:        nsecs in u64
 + *
 + * Unlike {m,u}secs_to_jiffies, type of input is not unsigned int but u64.
 + * And this doesn't return MAX_JIFFY_OFFSET since this function is designed
 + * for scheduler, not for use in device drivers to calculate timeout value.
 + *
 + * note:
 + *   NSEC_PER_SEC = 10^9 = (5^9 * 2^9) = (1953125 * 512)
 + *   ULLONG_MAX ns = 18446744073.709551615 secs = about 584 years
 + */
 +unsigned long nsecs_to_jiffies(u64 n)
 +{
 +      return (unsigned long)nsecs_to_jiffies64(n);
 +}
 +
- #if (BITS_PER_LONG < 64)
- u64 get_jiffies_64(void)
- {
-       unsigned long seq;
-       u64 ret;
-       do {
-               seq = read_seqbegin(&xtime_lock);
-               ret = jiffies_64;
-       } while (read_seqretry(&xtime_lock, seq));
-       return ret;
- }
- EXPORT_SYMBOL(get_jiffies_64);
- #endif
- EXPORT_SYMBOL(jiffies);
  /*
   * Add two timespec values and do a safety check for overflow.
   * It's assumed that both values are valid (>= 0)
Simple merge
Simple merge
Simple merge
diff --cc kernel/timer.c
Simple merge
Simple merge