Skip to content

Commit 309179f

Browse files
committed
Merge branch 'fortglx/3.16/time' of git://git.linaro.org/people/john.stultz/linux into timers/core
* Remove the deprecated setup_sched_clock() API * Minor NTP updates
2 parents 2779ac1 + ea54bca commit 309179f

3 files changed

Lines changed: 10 additions & 21 deletions

File tree

‎include/linux/sched_clock.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ extern void sched_clock_postinit(void);
1414
static inline void sched_clock_postinit(void) { }
1515
#endif
1616

17-
extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate);
1817
extern void sched_clock_register(u64 (*read)(void), int bits,
1918
unsigned long rate);
2019

‎kernel/time/ntp.c‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,21 +165,21 @@ static inline void pps_set_freq(s64 freq)
165165

166166
static inline int is_error_status(int status)
167167
{
168-
return (time_status & (STA_UNSYNC|STA_CLOCKERR))
168+
return (status & (STA_UNSYNC|STA_CLOCKERR))
169169
/* PPS signal lost when either PPS time or
170170
* PPS frequency synchronization requested
171171
*/
172-
|| ((time_status & (STA_PPSFREQ|STA_PPSTIME))
173-
&& !(time_status & STA_PPSSIGNAL))
172+
|| ((status & (STA_PPSFREQ|STA_PPSTIME))
173+
&& !(status & STA_PPSSIGNAL))
174174
/* PPS jitter exceeded when
175175
* PPS time synchronization requested */
176-
|| ((time_status & (STA_PPSTIME|STA_PPSJITTER))
176+
|| ((status & (STA_PPSTIME|STA_PPSJITTER))
177177
== (STA_PPSTIME|STA_PPSJITTER))
178178
/* PPS wander exceeded or calibration error when
179179
* PPS frequency synchronization requested
180180
*/
181-
|| ((time_status & STA_PPSFREQ)
182-
&& (time_status & (STA_PPSWANDER|STA_PPSERROR)));
181+
|| ((status & STA_PPSFREQ)
182+
&& (status & (STA_PPSWANDER|STA_PPSERROR)));
183183
}
184184

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

924924
static int __init ntp_tick_adj_setup(char *str)
925925
{
926-
ntp_tick_adj = simple_strtol(str, NULL, 0);
926+
int rc = kstrtol(str, 0, (long *)&ntp_tick_adj);
927+
928+
if (rc)
929+
return rc;
927930
ntp_tick_adj <<= NTP_SCALE_SHIFT;
928931

929932
return 1;

‎kernel/time/sched_clock.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ static u64 notrace jiffy_sched_clock_read(void)
4949
return (u64)(jiffies - INITIAL_JIFFIES);
5050
}
5151

52-
static u32 __read_mostly (*read_sched_clock_32)(void);
53-
54-
static u64 notrace read_sched_clock_32_wrapper(void)
55-
{
56-
return read_sched_clock_32();
57-
}
58-
5952
static u64 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read;
6053

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

179-
void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
180-
{
181-
read_sched_clock_32 = read;
182-
sched_clock_register(read_sched_clock_32_wrapper, bits, rate);
183-
}
184-
185172
void __init sched_clock_postinit(void)
186173
{
187174
/*

0 commit comments

Comments
 (0)