diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-05-23 20:05:51 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-05-23 20:05:51 -0400 |
commit | 309179fabddd074f7da63c5602bc32cb6de677f9 (patch) | |
tree | ddefd2f4b14df480070ee416fcc53f6b82ec7b35 | |
parent | 2779ac167b1a1bf8153dca9f3a141c6148c6b89f (diff) | |
parent | ea54bca3aab3468daf1c37d15047ee66bca8760d (diff) |
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
-rw-r--r-- | include/linux/sched_clock.h | 1 | ||||
-rw-r--r-- | kernel/time/ntp.c | 17 | ||||
-rw-r--r-- | kernel/time/sched_clock.c | 13 |
3 files changed, 10 insertions, 21 deletions
diff --git a/include/linux/sched_clock.h b/include/linux/sched_clock.h index cddf0c2940b6..efa931c5cef1 100644 --- a/include/linux/sched_clock.h +++ b/include/linux/sched_clock.h | |||
@@ -14,7 +14,6 @@ extern void sched_clock_postinit(void); | |||
14 | static inline void sched_clock_postinit(void) { } | 14 | static inline void sched_clock_postinit(void) { } |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | ||
18 | extern void sched_clock_register(u64 (*read)(void), int bits, | 17 | extern void sched_clock_register(u64 (*read)(void), int bits, |
19 | unsigned long rate); | 18 | unsigned long rate); |
20 | 19 | ||
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 419a52cecd20..c8780cdaf852 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -165,21 +165,21 @@ static inline void pps_set_freq(s64 freq) | |||
165 | 165 | ||
166 | static inline int is_error_status(int status) | 166 | static inline int is_error_status(int status) |
167 | { | 167 | { |
168 | return (time_status & (STA_UNSYNC|STA_CLOCKERR)) | 168 | return (status & (STA_UNSYNC|STA_CLOCKERR)) |
169 | /* PPS signal lost when either PPS time or | 169 | /* PPS signal lost when either PPS time or |
170 | * PPS frequency synchronization requested | 170 | * PPS frequency synchronization requested |
171 | */ | 171 | */ |
172 | || ((time_status & (STA_PPSFREQ|STA_PPSTIME)) | 172 | || ((status & (STA_PPSFREQ|STA_PPSTIME)) |
173 | && !(time_status & STA_PPSSIGNAL)) | 173 | && !(status & STA_PPSSIGNAL)) |
174 | /* PPS jitter exceeded when | 174 | /* PPS jitter exceeded when |
175 | * PPS time synchronization requested */ | 175 | * PPS time synchronization requested */ |
176 | || ((time_status & (STA_PPSTIME|STA_PPSJITTER)) | 176 | || ((status & (STA_PPSTIME|STA_PPSJITTER)) |
177 | == (STA_PPSTIME|STA_PPSJITTER)) | 177 | == (STA_PPSTIME|STA_PPSJITTER)) |
178 | /* PPS wander exceeded or calibration error when | 178 | /* PPS wander exceeded or calibration error when |
179 | * PPS frequency synchronization requested | 179 | * PPS frequency synchronization requested |
180 | */ | 180 | */ |
181 | || ((time_status & STA_PPSFREQ) | 181 | || ((status & STA_PPSFREQ) |
182 | && (time_status & (STA_PPSWANDER|STA_PPSERROR))); | 182 | && (status & (STA_PPSWANDER|STA_PPSERROR))); |
183 | } | 183 | } |
184 | 184 | ||
185 | static inline void pps_fill_timex(struct timex *txc) | 185 | 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) | |||
923 | 923 | ||
924 | static int __init ntp_tick_adj_setup(char *str) | 924 | static int __init ntp_tick_adj_setup(char *str) |
925 | { | 925 | { |
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; | ||
927 | ntp_tick_adj <<= NTP_SCALE_SHIFT; | 930 | ntp_tick_adj <<= NTP_SCALE_SHIFT; |
928 | 931 | ||
929 | return 1; | 932 | return 1; |
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index 4d23dc4d8139..445106d2c729 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c | |||
@@ -49,13 +49,6 @@ static u64 notrace jiffy_sched_clock_read(void) | |||
49 | return (u64)(jiffies - INITIAL_JIFFIES); | 49 | return (u64)(jiffies - INITIAL_JIFFIES); |
50 | } | 50 | } |
51 | 51 | ||
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 | |||
59 | static u64 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read; | 52 | static u64 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read; |
60 | 53 | ||
61 | static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift) | 54 | 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, | |||
176 | pr_debug("Registered %pF as sched_clock source\n", read); | 169 | pr_debug("Registered %pF as sched_clock source\n", read); |
177 | } | 170 | } |
178 | 171 | ||
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 | |||
185 | void __init sched_clock_postinit(void) | 172 | void __init sched_clock_postinit(void) |
186 | { | 173 | { |
187 | /* | 174 | /* |