diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 20:46:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 20:46:42 -0400 |
commit | e7fda6c4c3c1a7d6996dd75fd84670fa0b5d448f (patch) | |
tree | daa51c16462c318b890acf7f01fba5827275dd74 /drivers/misc | |
parent | 08d69a25714429850cf9ef71f22d8cdc9189d93f (diff) | |
parent | 953dec21aed4038464fec02f96a2f1b8701a5bce (diff) |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer and time updates from Thomas Gleixner:
"A rather large update of timers, timekeeping & co
- Core timekeeping code is year-2038 safe now for 32bit machines.
Now we just need to fix all in kernel users and the gazillion of
user space interfaces which rely on timespec/timeval :)
- Better cache layout for the timekeeping internal data structures.
- Proper nanosecond based interfaces for in kernel users.
- Tree wide cleanup of code which wants nanoseconds but does hoops
and loops to convert back and forth from timespecs. Some of it
definitely belongs into the ugly code museum.
- Consolidation of the timekeeping interface zoo.
- A fast NMI safe accessor to clock monotonic for tracing. This is a
long standing request to support correlated user/kernel space
traces. With proper NTP frequency correction it's also suitable
for correlation of traces accross separate machines.
- Checkpoint/restart support for timerfd.
- A few NOHZ[_FULL] improvements in the [hr]timer code.
- Code move from kernel to kernel/time of all time* related code.
- New clocksource/event drivers from the ARM universe. I'm really
impressed that despite an architected timer in the newer chips SoC
manufacturers insist on inventing new and differently broken SoC
specific timers.
[ Ed. "Impressed"? I don't think that word means what you think it means ]
- Another round of code move from arch to drivers. Looks like most
of the legacy mess in ARM regarding timers is sorted out except for
a few obnoxious strongholds.
- The usual updates and fixlets all over the place"
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
timekeeping: Fixup typo in update_vsyscall_old definition
clocksource: document some basic timekeeping concepts
timekeeping: Use cached ntp_tick_length when accumulating error
timekeeping: Rework frequency adjustments to work better w/ nohz
timekeeping: Minor fixup for timespec64->timespec assignment
ftrace: Provide trace clocks monotonic
timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONIC
seqcount: Add raw_write_seqcount_latch()
seqcount: Provide raw_read_seqcount()
timekeeping: Use tk_read_base as argument for timekeeping_get_ns()
timekeeping: Create struct tk_read_base and use it in struct timekeeper
timekeeping: Restructure the timekeeper some more
clocksource: Get rid of cycle_last
clocksource: Move cycle_last validation to core code
clocksource: Make delta calculation a function
wireless: ath9k: Get rid of timespec conversions
drm: vmwgfx: Use nsec based interfaces
drm: i915: Use nsec based interfaces
timekeeping: Provide ktime_get_raw()
hangcheck-timer: Use ktime_get_ns()
...
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ioc4.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 06f6ad29ceff..3336ddca45ac 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c | |||
@@ -145,7 +145,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) | |||
145 | union ioc4_int_out int_out; | 145 | union ioc4_int_out int_out; |
146 | union ioc4_gpcr gpcr; | 146 | union ioc4_gpcr gpcr; |
147 | unsigned int state, last_state = 1; | 147 | unsigned int state, last_state = 1; |
148 | struct timespec start_ts, end_ts; | ||
149 | uint64_t start, end, period; | 148 | uint64_t start, end, period; |
150 | unsigned int count = 0; | 149 | unsigned int count = 0; |
151 | 150 | ||
@@ -174,10 +173,10 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) | |||
174 | if (!last_state && state) { | 173 | if (!last_state && state) { |
175 | count++; | 174 | count++; |
176 | if (count == IOC4_CALIBRATE_END) { | 175 | if (count == IOC4_CALIBRATE_END) { |
177 | ktime_get_ts(&end_ts); | 176 | end = ktime_get_ns(); |
178 | break; | 177 | break; |
179 | } else if (count == IOC4_CALIBRATE_DISCARD) | 178 | } else if (count == IOC4_CALIBRATE_DISCARD) |
180 | ktime_get_ts(&start_ts); | 179 | start = ktime_get_ns(); |
181 | } | 180 | } |
182 | last_state = state; | 181 | last_state = state; |
183 | } while (1); | 182 | } while (1); |
@@ -192,8 +191,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) | |||
192 | * by which the IOC4 generates the square wave, to get the | 191 | * by which the IOC4 generates the square wave, to get the |
193 | * period of an IOC4 INT_OUT count. | 192 | * period of an IOC4 INT_OUT count. |
194 | */ | 193 | */ |
195 | end = end_ts.tv_sec * NSEC_PER_SEC + end_ts.tv_nsec; | ||
196 | start = start_ts.tv_sec * NSEC_PER_SEC + start_ts.tv_nsec; | ||
197 | period = (end - start) / | 194 | period = (end - start) / |
198 | (IOC4_CALIBRATE_CYCLES * 2 * (IOC4_CALIBRATE_COUNT + 1)); | 195 | (IOC4_CALIBRATE_CYCLES * 2 * (IOC4_CALIBRATE_COUNT + 1)); |
199 | 196 | ||