Skip to content

Commit

Permalink
Merge branch 'fortglx/3.16/time' of git://git.linaro.org/people/john.…
Browse files Browse the repository at this point in the history
…stultz/linux into timers/core

* Remove the deprecated setup_sched_clock() API
* Minor NTP updates
  • Loading branch information
Thomas Gleixner committed May 24, 2014
2 parents 2779ac1 + ea54bca commit 309179f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
1 change: 0 additions & 1 deletion include/linux/sched_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ extern void sched_clock_postinit(void);
static inline void sched_clock_postinit(void) { }
#endif

extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate);
extern void sched_clock_register(u64 (*read)(void), int bits,
unsigned long rate);

Expand Down
17 changes: 10 additions & 7 deletions kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,21 @@ static inline void pps_set_freq(s64 freq)

static inline int is_error_status(int status)
{
return (time_status & (STA_UNSYNC|STA_CLOCKERR))
return (status & (STA_UNSYNC|STA_CLOCKERR))
/* PPS signal lost when either PPS time or
* PPS frequency synchronization requested
*/
|| ((time_status & (STA_PPSFREQ|STA_PPSTIME))
&& !(time_status & STA_PPSSIGNAL))
|| ((status & (STA_PPSFREQ|STA_PPSTIME))
&& !(status & STA_PPSSIGNAL))
/* PPS jitter exceeded when
* PPS time synchronization requested */
|| ((time_status & (STA_PPSTIME|STA_PPSJITTER))
|| ((status & (STA_PPSTIME|STA_PPSJITTER))
== (STA_PPSTIME|STA_PPSJITTER))
/* PPS wander exceeded or calibration error when
* PPS frequency synchronization requested
*/
|| ((time_status & STA_PPSFREQ)
&& (time_status & (STA_PPSWANDER|STA_PPSERROR)));
|| ((status & STA_PPSFREQ)
&& (status & (STA_PPSWANDER|STA_PPSERROR)));
}

static inline void pps_fill_timex(struct timex *txc)
Expand Down Expand Up @@ -923,7 +923,10 @@ void __hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts)

static int __init ntp_tick_adj_setup(char *str)
{
ntp_tick_adj = simple_strtol(str, NULL, 0);
int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);

if (rc)
return rc;
ntp_tick_adj <<= NTP_SCALE_SHIFT;

return 1;
Expand Down
13 changes: 0 additions & 13 deletions kernel/time/sched_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ static u64 notrace jiffy_sched_clock_read(void)
return (u64)(jiffies - INITIAL_JIFFIES);
}

static u32 __read_mostly (*read_sched_clock_32)(void);

static u64 notrace read_sched_clock_32_wrapper(void)
{
return read_sched_clock_32();
}

static u64 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read;

static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift)
Expand Down Expand Up @@ -176,12 +169,6 @@ void __init sched_clock_register(u64 (*read)(void), int bits,
pr_debug("Registered %pF as sched_clock source\n", read);
}

void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
{
read_sched_clock_32 = read;
sched_clock_register(read_sched_clock_32_wrapper, bits, rate);
}

void __init sched_clock_postinit(void)
{
/*
Expand Down

0 comments on commit 309179f

Please sign in to comment.