02 Feb, 2011
24 commits
-
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: Richard Cochran
Acked-by: John Stultz
LKML-Reference:
Signed-off-by: Thomas Gleixner -
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: John Stultz
Signed-off-by: Richard Cochran
LKML-Reference:
Signed-off-by: Thomas Gleixner -
Pick the cleanup to the comment in posix-timers.c from Richards all in
one conversion patch.Originally-from: Richard Cochran
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
LKML-Reference: -
All functions are accessed via clock_posix_cpu now. So make them static.
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
All users gone. Remove the cruft.
Huge thanks to Richard Cochran who tackled that maze first.
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Setup timer_create for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and
remove the no_timer_create() implementation.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Use the new kclock decoding. Fixup the fallout in mmtimer.c
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Richard Cochran
Cc: John Stultz
Signed-off-by: Thomas Gleixner -
Use the new kclock decoding mechanism and rename the misnomed
common_clock_get() to posix_clock_realtime_get().Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
posix timers were the last users of the legacy arg0-3 members of
restart_block. Remove the cruft.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
posix timers still use the legacy arg0-arg3 members of
restart_block. Use restart_block.nanosleep insteadSigned-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Use the new kclock decoding function in clock_nanosleep_restart.
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Use the new kclock decoding function in clock_nanosleep and cleanup all
kclocks which use the default functions.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Thomas Gleixner
Cc: John Stultz
Acked-by: Richard Cochran
LKML-Reference: -
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: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Cosmetic. No functional change
Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
Define the conditional nanosleep not supported error value outside of
do_posix_clock_nonanosleep(). Preparatory patch for further cleanups.Signed-off-by: Thomas Gleixner
Acked-by: John Stultz
Tested-by: Richard Cochran
LKML-Reference: -
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: Richard Cochran
Acked-by: John Stultz
LKML-Reference:
Signed-off-by: Thomas Gleixner
01 Feb, 2011
2 commits
-
The xtime/dotimer cleanup broke architectures which do not implement
clockevents. Time to send out another __do_IRQ threat.Signed-off-by: Thomas Gleixner
Reported-by: Ingo Molnar
Cc: Torben Hohn
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
LKML-Reference:
Signed-off-by: Ingo Molnar -
All callers of do_timer() are converted to xtime_update(). The only
users of xtime_lock are in kernel/time/. Make both local to
kernel/time/ and remove them from the global header files.[ tglx: Reuse tick-internal.h instead of creating another local header
file. Massaged changelog ]Signed-off-by: Torben Hohn
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
Signed-off-by: Thomas Gleixner
31 Jan, 2011
14 commits
-
xtime_update() takes the xtime_lock itself.
set_linux_timer() does not need to be protected by xtime_lock.
[ tglx: This code is broken on SMP anyway. ]
Signed-off-by: Torben Hohn
Cc: Chris Zankel
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
pcic_clear_clock_irq() and clear_clock_irq do not need
to be protected by xtime_lock.Signed-off-by: Torben Hohn
Acked-by: David S. Miller
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn
Cc: hch@infradead.org
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: Helge Deller
Cc: "James E.J. Bottomley"
Cc: Kyle McMartin
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() properly takes the xtime_lock
Signed-off-by: Torben Hohn
Cc: Sam Creasey
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: Roman Zippel
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
Cc: Geert Uytterhoeven
Cc: Greg Ungerer
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() does proper locking.
Signed-off-by: Torben Hohn
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: Hirokazu Takata
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
local_cpu_data->itm_next = new_itm; does not need to be protected by
xtime_lock. xtime_update() takes the lock itself.Signed-off-by: Torben Hohn
Cc: Fenghua Yu
Cc: Tony Luck
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn
Cc: Yoshinori Sato
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
__set_LEDS() does not need to be protected by xtime_lock.
its used unprotected in other places.[ tglx: Removed stale comment ]
Signed-off-by: Torben Hohn
Cc: hch@infradead.org
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: David Howells
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn
Cc: hch@infradead.org
Cc: Jesper Nilsson
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: Mikael Starvik
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
This code failed to take the xtime_lock, which must be held when
calling do_timer(). Use the safe version xtime_update()Signed-off-by: Torben Hohn
Cc: hch@infradead.org
Cc: Jesper Nilsson
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: Mikael Starvik
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn
Cc: Mike Frysinger
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
do_timer() requires holding the xtime_lock, which this
code did not do. Use the safe version xtime_update()Signed-off-by: Torben Hohn
Cc: Russell King
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update takes the xtime_lock itself.
Signed-off-by: Torben Hohn
Cc: Russell King
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner -
xtime_update() takes the xtime_lock itself.
timer_interrupt() is only called on the boot cpu. See do_entInt(). So
"state" in timer_interrupt does not require protection by xtime_lock.Signed-off-by: Torben Hohn
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: Peter Zijlstra
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference:
Signed-off-by: Thomas Gleixner