mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner: "The timer departement provides: - More y2038 work in the area of ntp and pps. - Optimization of posix cpu timers - New time related selftests - Some new clocksource drivers - The usual pile of fixes, cleanups and improvements" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) timeconst: Update path in comment timers/x86/hpet: Type adjustments clocksource/drivers/armada-370-xp: Implement ARM delay timer clocksource/drivers/tango_xtal: Add new timer for Tango SoCs clocksource/drivers/imx: Allow timer irq affinity change clocksource/drivers/exynos_mct: Use container_of() instead of this_cpu_ptr() clocksource/drivers/h8300_*: Remove unneeded memset()s clocksource/drivers/sh_cmt: Remove unneeded memset() in sh_cmt_setup() clocksource/drivers/em_sti: Remove unneeded memset()s clocksource/drivers/mediatek: Use GPT as sched clock source clockevents/drivers/mtk: Fix spurious interrupt leading to crash posix_cpu_timer: Reduce unnecessary sighand lock contention posix_cpu_timer: Convert cputimer->running to bool posix_cpu_timer: Check thread timers only when there are active thread timers posix_cpu_timer: Optimize fastpath_timer_check() timers, kselftest: Add 'adjtick' test to validate adjtimex() tick adjustments timers: Use __fls in apply_slack() clocksource: Remove return statement from void functions net: sfc: avoid using timespec ntp/pps: use y2038 safe types in pps_event_time ...
This commit is contained in:
commit
7b2a4306f9
34 changed files with 468 additions and 120 deletions
|
|
@ -59,7 +59,8 @@ extern struct fs_struct init_fs;
|
|||
.rlim = INIT_RLIMITS, \
|
||||
.cputimer = { \
|
||||
.cputime_atomic = INIT_CPUTIME_ATOMIC, \
|
||||
.running = 0, \
|
||||
.running = false, \
|
||||
.checking_timer = false, \
|
||||
}, \
|
||||
INIT_PREV_CPUTIME(sig) \
|
||||
.cred_guard_mutex = \
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ struct pps_source_info {
|
|||
|
||||
struct pps_event_time {
|
||||
#ifdef CONFIG_NTP_PPS
|
||||
struct timespec ts_raw;
|
||||
struct timespec64 ts_raw;
|
||||
#endif /* CONFIG_NTP_PPS */
|
||||
struct timespec ts_real;
|
||||
struct timespec64 ts_real;
|
||||
};
|
||||
|
||||
/* The main struct */
|
||||
|
|
@ -105,7 +105,7 @@ extern void pps_event(struct pps_device *pps,
|
|||
struct pps_device *pps_lookup_dev(void const *cookie);
|
||||
|
||||
static inline void timespec_to_pps_ktime(struct pps_ktime *kt,
|
||||
struct timespec ts)
|
||||
struct timespec64 ts)
|
||||
{
|
||||
kt->sec = ts.tv_sec;
|
||||
kt->nsec = ts.tv_nsec;
|
||||
|
|
@ -115,24 +115,24 @@ static inline void timespec_to_pps_ktime(struct pps_ktime *kt,
|
|||
|
||||
static inline void pps_get_ts(struct pps_event_time *ts)
|
||||
{
|
||||
getnstime_raw_and_real(&ts->ts_raw, &ts->ts_real);
|
||||
ktime_get_raw_and_real_ts64(&ts->ts_raw, &ts->ts_real);
|
||||
}
|
||||
|
||||
#else /* CONFIG_NTP_PPS */
|
||||
|
||||
static inline void pps_get_ts(struct pps_event_time *ts)
|
||||
{
|
||||
getnstimeofday(&ts->ts_real);
|
||||
ktime_get_real_ts64(&ts->ts_real);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NTP_PPS */
|
||||
|
||||
/* Subtract known time delay from PPS event time(s) */
|
||||
static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec delta)
|
||||
static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta)
|
||||
{
|
||||
ts->ts_real = timespec_sub(ts->ts_real, delta);
|
||||
ts->ts_real = timespec64_sub(ts->ts_real, delta);
|
||||
#ifdef CONFIG_NTP_PPS
|
||||
ts->ts_raw = timespec_sub(ts->ts_raw, delta);
|
||||
ts->ts_raw = timespec64_sub(ts->ts_raw, delta);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -617,15 +617,18 @@ struct task_cputime_atomic {
|
|||
/**
|
||||
* struct thread_group_cputimer - thread group interval timer counts
|
||||
* @cputime_atomic: atomic thread group interval timers.
|
||||
* @running: non-zero when there are timers running and
|
||||
* @cputime receives updates.
|
||||
* @running: true when there are timers running and
|
||||
* @cputime_atomic receives updates.
|
||||
* @checking_timer: true when a thread in the group is in the
|
||||
* process of checking for thread group timers.
|
||||
*
|
||||
* This structure contains the version of task_cputime, above, that is
|
||||
* used for thread group CPU timer calculations.
|
||||
*/
|
||||
struct thread_group_cputimer {
|
||||
struct task_cputime_atomic cputime_atomic;
|
||||
int running;
|
||||
bool running;
|
||||
bool checking_timer;
|
||||
};
|
||||
|
||||
#include <linux/rwsem.h>
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ extern void timekeeping_inject_sleeptime64(struct timespec64 *delta);
|
|||
/*
|
||||
* PPS accessor
|
||||
*/
|
||||
extern void getnstime_raw_and_real(struct timespec *ts_raw,
|
||||
struct timespec *ts_real);
|
||||
extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw,
|
||||
struct timespec64 *ts_real);
|
||||
|
||||
/*
|
||||
* Persistent clock related interfaces
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */
|
|||
#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
|
||||
|
||||
extern int do_adjtimex(struct timex *);
|
||||
extern void hardpps(const struct timespec *, const struct timespec *);
|
||||
extern void hardpps(const struct timespec64 *, const struct timespec64 *);
|
||||
|
||||
int read_current_timer(unsigned long *timer_val);
|
||||
void ntp_notify_cmos_timer(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue