- 11 3月, 2011 2 次提交
-
-
由 Thomas Gleixner 提交于
Leftover from earlier implementation. All empty, remove it. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
We changed some of the state bits and combinations thereof over time, but never updated the documentation. Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 03 3月, 2011 1 次提交
-
-
由 Thomas Gleixner 提交于
We calculate the current time of each clock base by adding an offset to clock_monotonic. The offset for the clock bases is set in retrigger_next_event() which is called when we switch a cpu to highres mode or when the clock was set. Add the missing update for clock boottime. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: John Stultz <johnstul@us.ibm.com>
-
- 22 2月, 2011 5 次提交
-
-
由 John Stultz 提交于
This patch exports CLOCK_BOOTTIME through the posix timers interface CC: Jamie Lokier <jamie@shareable.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Alexander Shishkin <virtuoso@slind.org> CC: Arve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
由 John Stultz 提交于
CLOCK_MONOTONIC stops while the system is in suspend. This is because to applications system suspend is invisible. However, there is a growing set of applications that are wanting to be suspend-aware, but do not want to deal with the complications of CLOCK_REALTIME (which might jump around if settimeofday is called). For these applications, I propose a new clockid: CLOCK_BOOTTIME. CLOCK_BOOTTIME is idential to CLOCK_MONOTONIC, except it also includes any time spent in suspend. This patch add hrtimer base for CLOCK_BOOTTIME, using get_monotonic_boottime/ktime_get_boottime, to allow in kernel users to set timers against. CC: Jamie Lokier <jamie@shareable.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Alexander Shishkin <virtuoso@slind.org> CC: Arve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
由 John Stultz 提交于
Extend get_xtime_and_monotonic_offset to get_xtime_and_monotonic_and_sleep_offset(). CC: Jamie Lokier <jamie@shareable.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Alexander Shishkin <virtuoso@slind.org> CC: Arve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
由 John Stultz 提交于
This adds new functions that return the monotonic time since boot (in other words, CLOCK_MONOTONIC + suspend time). CC: Jamie Lokier <jamie@shareable.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Alexander Shishkin <virtuoso@slind.org> CC: Arve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
由 John Stultz 提交于
The hrtimer code is written mainly with CLOCK_REALTIME and CLOCK_MONOTONIC in mind. These are clockids 0 and 1 resepctively. However, if we are to introduce any new hrtimer bases, using new clockids, we have to skip the cputimers (clockids 2,3) as well as other clockids that may not impelement timers. This patch adds a little bit of indirection between the clockid and the base, so that we can extend the base by one when we add a new clockid at number 7 or so. CC: Jamie Lokier <jamie@shareable.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Alexander Shishkin <virtuoso@slind.org> CC: Arve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
- 19 2月, 2011 1 次提交
-
-
由 Richard Cochran 提交于
The ADJ_SETOFFSET code redundantly checks the range of the nanoseconds field of the time value. This field is checked again in the subsequent call to timekeeping_inject_offset(). Also, as is, the check will not detect whether the number of microseconds is out of range. Let timekeeping_inject_offset() do the error checking. Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Cc: johnstul@us.ibm.com LKML-Reference: <20110218090724.GA2924@riccoc20.at.omicron.at> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 09 2月, 2011 1 次提交
-
-
由 Torben Hohn 提交于
Only one CPU gets the timer interrupt so mn10300_last_tsc does not need to be protected by xtime lock. Remove xtime lovking and use xtime_update() which does the locking itself. Signed-off-by: NTorben Hohn <torbenh@gmx.de> Cc: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> LKML-Reference: <20110127150011.23248.62040.stgit@localhost> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 02 2月, 2011 30 次提交
-
-
由 Richard Cochran 提交于
This patch adds support for adding and removing posix clocks. The clock lifetime cycle is patterned after usb devices. Each clock is represented by a standard character device. In addition, the driver may optionally implement custom character device operations. The posix clock and timer system calls listed below now work with dynamic posix clocks, as well as the traditional static clocks. The following system calls are affected: - clock_adjtime (brand new syscall) - clock_gettime - clock_getres - clock_settime - timer_create - timer_delete - timer_gettime - timer_settime [ tglx: Adapted to the posix-timer cleanup. Moved clock_posix_dynamic to posix-clock.c and made all referenced functions static ] Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134420.164172635@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
Rename register_posix_clock() to posix_timers_register_clock(). That's what the function really does. As a side effect this cleans up the posix_clock namespace for the upcoming dynamic posix_clock infrastructure. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NRichard Cochran <richard.cochran@omicron.at> Cc: John Stultz <johnstul@us.ibm.com> LKML-Reference: <alpine.LFD.2.00.1102021222240.31804@localhost6.localdomain6>
-
由 Richard Cochran 提交于
Extend the negative clockids which are currently used by posix cpu timers to encode the PID with a file descriptor based type which encodes the fd in the upper bits. Originally-from: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134420.062860200@linutronix.de>
-
由 Richard Cochran 提交于
This patch adds the clock_adjtime system call to the x86 architecture. Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134419.968905083@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Richard Cochran 提交于
A new syscall is introduced that allows tuning of a POSIX clock. The new call, clock_adjtime, takes two parameters, the clock ID and a pointer to a struct timex. Any ADJTIMEX(2) operation may be requested via this system call, but various POSIX clocks may or may not support tuning. [ tglx: Adapted to the posix-timer cleanup series. Avoid copy_to_user in the error case ] Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134419.869804645@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Richard Cochran 提交于
Split out the compat timex accessors into separate functions. Preparatory patch for a new syscall. [ tglx: Split that patch from Richards "posix-timers: Introduce a syscall for clock tuning.". Keeps the changes strictly separate ] Originally-from: Richard Cochran <richardcochran@gmail.com> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> LKML-Reference: <20110201134419.772343089@linutronix.de>
-
由 Richard Cochran 提交于
This patch adds a new mode bit into the timex structure. When set, the bit instructs the kernel to add the given time value to the current time. Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134320.688829863@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 John Stultz 提交于
This adds a kernel-internal timekeeping interface to add or subtract a fixed amount from CLOCK_REALTIME. This makes it so kernel users or interfaces trying to do so do not have to read the time, then add an offset and then call settimeofday(), which adds some extra error in comparision to just simply adding the offset in the kernel timekeeping core. Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.584311693@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Richard Cochran 提交于
Pick the cleanup to the comment in posix-timers.c from Richards all in one conversion patch. Originally-from: Richard Cochran <richardcochran@gmail.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134419.487708516@linutronix.de>
-
由 Thomas Gleixner 提交于
All functions are accessed via clock_posix_cpu now. So make them static. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.389755466@linutronix.de>
-
由 Thomas Gleixner 提交于
All users gone. Remove the cruft. Huge thanks to Richard Cochran who tackled that maze first. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.294620613@linutronix.de>
-
由 Thomas Gleixner 提交于
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and use the new decoding function. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.198999420@linutronix.de>
-
由 Thomas Gleixner 提交于
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and use the new decoding function. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.101243181@linutronix.de>
-
由 Thomas Gleixner 提交于
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and use the new decoding function. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134419.001863714@linutronix.de>
-
由 Thomas Gleixner 提交于
Setup timer_create for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and remove the no_timer_create() implementation. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.903604289@linutronix.de>
-
由 Thomas Gleixner 提交于
The res member of kclock is only used by mmtimer.c, but even there it contains redundant information. Remove the field and fixup mmtimer. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.808714587@linutronix.de>
-
由 Thomas Gleixner 提交于
Use the new kclock decoding. Fixup the fallout in mmtimer.c Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.709802797@linutronix.de>
-
由 Thomas Gleixner 提交于
Richard said: "I would think that we can require k_clocks to provide the read function. This could be checked and enforced in register_posix_clock()." Add checks for clock_getres and clock_get in the register function. Suggested-by: NRichard Cochran <richardcochran@gmail.com> Cc: John Stultz <johnstul@us.ibm.com> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-
由 Thomas Gleixner 提交于
Use the new kclock decoding mechanism and rename the misnomed common_clock_get() to posix_clock_realtime_get(). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.611097203@linutronix.de>
-
由 Thomas Gleixner 提交于
Use the new kclock decoding function in clock_settime and cleanup all kclocks which use the default functions. Rename the misnomed common_clock_set() to posix_clock_realtime_set(). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.518851246@linutronix.de>
-
由 Thomas Gleixner 提交于
CLOCK_THREAD_CPUTIME_ID implements stub functions for nanosleep and nanosleep_restart, which return -EINVAL. That return value is wrong. The correct return value is -ENOTSUP. Remove the stubs and let the new dispatch code return the correct error code. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.422446502@linutronix.de>
-
由 Thomas Gleixner 提交于
posix timers were the last users of the legacy arg0-3 members of restart_block. Remove the cruft. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.326209775@linutronix.de>
-
由 Thomas Gleixner 提交于
posix timers still use the legacy arg0-arg3 members of restart_block. Use restart_block.nanosleep instead Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.232288779@linutronix.de>
-
由 Thomas Gleixner 提交于
Use the new kclock decoding function in clock_nanosleep_restart. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.131263211@linutronix.de>
-
由 Thomas Gleixner 提交于
Use the new kclock decoding function in clock_nanosleep and cleanup all kclocks which use the default functions. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134418.034175556@linutronix.de>
-
由 Thomas Gleixner 提交于
New function to find the kclock for a given clockid. Returns a pointer to clock_posix_cpu if clockid < 0. If clockid >= MAXCLOCK or if the clock_getres pointer is not set it returns NULL. For valid clocks it returns a pointer to the matching posix_clock. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Cc: John Stultz <johnstul@us.ibm.com> Acked-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134417.938447839@linutronix.de>
-
由 Thomas Gleixner 提交于
The CLOCK_DISPATCH() macro is a horrible magic. We call common functions if a function pointer is not set. That's just backwards. To support dynamic file decriptor based clocks we need to cleanup that dispatch logic. Create a k_clock struct clock_posix_cpu which has all the posix-cpu-timer functions filled in. After the cleanup the functions can be made static. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134417.841974553@linutronix.de>
-
由 Thomas Gleixner 提交于
Cosmetic. No functional change Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134417.745627057@linutronix.de>
-
由 Thomas Gleixner 提交于
Define the conditional nanosleep not supported error value outside of do_posix_clock_nonanosleep(). Preparatory patch for further cleanups. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NJohn Stultz <johnstul@us.ibm.com> Tested-by: NRichard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134417.643486574@linutronix.de>
-
由 Richard Cochran 提交于
Both settimeofday() and clock_settime() promise with a 'const' attribute not to alter the arguments passed in. This patch adds the missing 'const' attribute into the various kernel functions implementing these calls. Signed-off-by: NRichard Cochran <richard.cochran@omicron.at> Acked-by: NJohn Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134417.545698637@linutronix.de> Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
-