Loading arch/frv/Kconfig +4 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,10 @@ config GENERIC_HARDIRQS bool bool default n default n config GENERIC_TIME bool default y config TIME_LOW_RES config TIME_LOW_RES bool bool default y default y Loading arch/frv/kernel/time.c +0 −81 Original line number Original line Diff line number Diff line Loading @@ -32,8 +32,6 @@ #define TICK_SIZE (tick_nsec / 1000) #define TICK_SIZE (tick_nsec / 1000) extern unsigned long wall_jiffies; unsigned long __nongprelbss __clkin_clock_speed_HZ; unsigned long __nongprelbss __clkin_clock_speed_HZ; unsigned long __nongprelbss __ext_bus_clock_speed_HZ; unsigned long __nongprelbss __ext_bus_clock_speed_HZ; unsigned long __nongprelbss __res_bus_clock_speed_HZ; unsigned long __nongprelbss __res_bus_clock_speed_HZ; Loading Loading @@ -144,85 +142,6 @@ void time_init(void) time_divisor_init(); time_divisor_init(); } } /* * This version of gettimeofday has near microsecond resolution. */ void do_gettimeofday(struct timeval *tv) { unsigned long seq; unsigned long usec, sec; unsigned long max_ntp_tick; do { unsigned long lost; seq = read_seqbegin(&xtime_lock); usec = 0; lost = jiffies - wall_jiffies; /* * If time_adjust is negative then NTP is slowing the clock * so make sure not to go into next possible interval. * Better to lose some accuracy than have time go backwards.. */ if (unlikely(time_adjust < 0)) { max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; usec = min(usec, max_ntp_tick); if (lost) usec += lost * max_ntp_tick; } else if (unlikely(lost)) usec += lost * (USEC_PER_SEC / HZ); sec = xtime.tv_sec; usec += (xtime.tv_nsec / 1000); } while (read_seqretry(&xtime_lock, seq)); while (usec >= 1000000) { usec -= 1000000; sec++; } tv->tv_sec = sec; tv->tv_usec = usec; } EXPORT_SYMBOL(do_gettimeofday); int do_settimeofday(struct timespec *tv) { time_t wtm_sec, sec = tv->tv_sec; long wtm_nsec, nsec = tv->tv_nsec; if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) return -EINVAL; write_seqlock_irq(&xtime_lock); /* * This is revolting. We need to set "xtime" correctly. However, the * value in this location is the value at the most recent update of * wall time. Discover what correction gettimeofday() would have * made, and then undo it! */ nsec -= 0 * NSEC_PER_USEC; nsec -= (jiffies - wall_jiffies) * TICK_NSEC; wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); set_normalized_timespec(&xtime, sec, nsec); set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); ntp_clear(); write_sequnlock_irq(&xtime_lock); clock_was_set(); return 0; } EXPORT_SYMBOL(do_settimeofday); /* /* * Scheduler clock - returns current time in nanosec units. * Scheduler clock - returns current time in nanosec units. */ */ Loading arch/ia64/kernel/entry.S +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1605,8 +1605,8 @@ sys_call_table: data8 sys_ni_syscall // 1295 reserved for ppoll data8 sys_ni_syscall // 1295 reserved for ppoll data8 sys_unshare data8 sys_unshare data8 sys_splice data8 sys_splice data8 sys_set_robust_list data8 sys_ni_syscall // reserved for set_robust_list data8 sys_get_robust_list data8 sys_ni_syscall // reserved for get_robust_list data8 sys_sync_file_range // 1300 data8 sys_sync_file_range // 1300 data8 sys_tee data8 sys_tee data8 sys_vmsplice data8 sys_vmsplice Loading arch/ia64/kernel/head.S +5 −0 Original line number Original line Diff line number Diff line Loading @@ -197,6 +197,11 @@ start_ap: ;; ;; srlz.i srlz.i ;; ;; { flushrs // must be first insn in group srlz.i } ;; /* /* * Save the region registers, predicate before they get clobbered * Save the region registers, predicate before they get clobbered */ */ Loading arch/ia64/kernel/perfmon.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -4936,13 +4936,15 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count) if (likely(ctx)) { if (likely(ctx)) { DPRINT(("context unlocked\n")); DPRINT(("context unlocked\n")); UNPROTECT_CTX(ctx, flags); UNPROTECT_CTX(ctx, flags); fput(file); } } /* copy argument back to user, if needed */ /* copy argument back to user, if needed */ if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; error_args: error_args: if (file) fput(file); kfree(args_k); kfree(args_k); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); Loading Loading
arch/frv/Kconfig +4 −0 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,10 @@ config GENERIC_HARDIRQS bool bool default n default n config GENERIC_TIME bool default y config TIME_LOW_RES config TIME_LOW_RES bool bool default y default y Loading
arch/frv/kernel/time.c +0 −81 Original line number Original line Diff line number Diff line Loading @@ -32,8 +32,6 @@ #define TICK_SIZE (tick_nsec / 1000) #define TICK_SIZE (tick_nsec / 1000) extern unsigned long wall_jiffies; unsigned long __nongprelbss __clkin_clock_speed_HZ; unsigned long __nongprelbss __clkin_clock_speed_HZ; unsigned long __nongprelbss __ext_bus_clock_speed_HZ; unsigned long __nongprelbss __ext_bus_clock_speed_HZ; unsigned long __nongprelbss __res_bus_clock_speed_HZ; unsigned long __nongprelbss __res_bus_clock_speed_HZ; Loading Loading @@ -144,85 +142,6 @@ void time_init(void) time_divisor_init(); time_divisor_init(); } } /* * This version of gettimeofday has near microsecond resolution. */ void do_gettimeofday(struct timeval *tv) { unsigned long seq; unsigned long usec, sec; unsigned long max_ntp_tick; do { unsigned long lost; seq = read_seqbegin(&xtime_lock); usec = 0; lost = jiffies - wall_jiffies; /* * If time_adjust is negative then NTP is slowing the clock * so make sure not to go into next possible interval. * Better to lose some accuracy than have time go backwards.. */ if (unlikely(time_adjust < 0)) { max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; usec = min(usec, max_ntp_tick); if (lost) usec += lost * max_ntp_tick; } else if (unlikely(lost)) usec += lost * (USEC_PER_SEC / HZ); sec = xtime.tv_sec; usec += (xtime.tv_nsec / 1000); } while (read_seqretry(&xtime_lock, seq)); while (usec >= 1000000) { usec -= 1000000; sec++; } tv->tv_sec = sec; tv->tv_usec = usec; } EXPORT_SYMBOL(do_gettimeofday); int do_settimeofday(struct timespec *tv) { time_t wtm_sec, sec = tv->tv_sec; long wtm_nsec, nsec = tv->tv_nsec; if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) return -EINVAL; write_seqlock_irq(&xtime_lock); /* * This is revolting. We need to set "xtime" correctly. However, the * value in this location is the value at the most recent update of * wall time. Discover what correction gettimeofday() would have * made, and then undo it! */ nsec -= 0 * NSEC_PER_USEC; nsec -= (jiffies - wall_jiffies) * TICK_NSEC; wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); set_normalized_timespec(&xtime, sec, nsec); set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); ntp_clear(); write_sequnlock_irq(&xtime_lock); clock_was_set(); return 0; } EXPORT_SYMBOL(do_settimeofday); /* /* * Scheduler clock - returns current time in nanosec units. * Scheduler clock - returns current time in nanosec units. */ */ Loading
arch/ia64/kernel/entry.S +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1605,8 +1605,8 @@ sys_call_table: data8 sys_ni_syscall // 1295 reserved for ppoll data8 sys_ni_syscall // 1295 reserved for ppoll data8 sys_unshare data8 sys_unshare data8 sys_splice data8 sys_splice data8 sys_set_robust_list data8 sys_ni_syscall // reserved for set_robust_list data8 sys_get_robust_list data8 sys_ni_syscall // reserved for get_robust_list data8 sys_sync_file_range // 1300 data8 sys_sync_file_range // 1300 data8 sys_tee data8 sys_tee data8 sys_vmsplice data8 sys_vmsplice Loading
arch/ia64/kernel/head.S +5 −0 Original line number Original line Diff line number Diff line Loading @@ -197,6 +197,11 @@ start_ap: ;; ;; srlz.i srlz.i ;; ;; { flushrs // must be first insn in group srlz.i } ;; /* /* * Save the region registers, predicate before they get clobbered * Save the region registers, predicate before they get clobbered */ */ Loading
arch/ia64/kernel/perfmon.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -4936,13 +4936,15 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count) if (likely(ctx)) { if (likely(ctx)) { DPRINT(("context unlocked\n")); DPRINT(("context unlocked\n")); UNPROTECT_CTX(ctx, flags); UNPROTECT_CTX(ctx, flags); fput(file); } } /* copy argument back to user, if needed */ /* copy argument back to user, if needed */ if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; error_args: error_args: if (file) fput(file); kfree(args_k); kfree(args_k); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); Loading