Torben Hohn
22b7fcdae5
mn10300: Switch do_timer() to xtimer_update()
...
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: Torben 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: Thomas Gleixner <tglx@linutronix.de >
2011-02-09 16:17:24 +01:00
Richard Cochran
0606f422b4
posix clocks: Introduce dynamic clocks
...
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: Richard Cochran <richard.cochran@omicron.at >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134420.164172635@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:20 +01:00
Thomas Gleixner
527087374f
posix-timers: Cleanup namespace
...
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: Thomas Gleixner <tglx@linutronix.de >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
Cc: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <alpine.LFD.2.00.1102021222240.31804@localhost6.localdomain6 >
2011-02-02 15:28:19 +01:00
Richard Cochran
81e294cba2
posix-timers: Add support for fd based clocks
...
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: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134420.062860200@linutronix.de >
2011-02-02 15:28:19 +01:00
Richard Cochran
ce26efdefa
x86: Add clock_adjtime for x86
...
This patch adds the clock_adjtime system call to the x86 architecture.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134419.968905083@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:19 +01:00
Richard Cochran
f1f1d5ebd1
posix-timers: Introduce a syscall for clock tuning.
...
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: Richard Cochran <richard.cochran@omicron.at >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134419.869804645@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:19 +01:00
Richard Cochran
65f5d80bdf
time: Splitout compat timex accessors
...
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: John Stultz <johnstul@us.ibm.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
LKML-Reference: <20110201134419.772343089@linutronix.de >
2011-02-02 15:28:18 +01:00
Richard Cochran
094aa1881f
ntp: Add ADJ_SETOFFSET mode bit
...
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 <richard.cochran@omicron.at >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134320.688829863@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:18 +01:00
John Stultz
c528f7c6c2
time: Introduce timekeeping_inject_offset
...
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 <john.stultz@linaro.org >
Signed-off-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.584311693@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:18 +01:00
Richard Cochran
0061748dd2
posix-timer: Update comment
...
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: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134419.487708516@linutronix.de >
2011-02-02 15:28:18 +01:00
Thomas Gleixner
bc2c8ea483
posix-timers: Make posix-cpu-timers functions static
...
All functions are accessed via clock_posix_cpu now. So make them static.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.389755466@linutronix.de >
2011-02-02 15:28:17 +01:00
Thomas Gleixner
0aa3975f02
posix-timers: Remove CLOCK_DISPATCH leftovers
...
All users gone. Remove the cruft.
Huge thanks to Richard Cochran who tackled that maze first.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.294620613@linutronix.de >
2011-02-02 15:28:17 +01:00
Thomas Gleixner
6761c6702e
posix-timers: Convert timer_delete() to clockid_to_kclock()
...
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.198999420@linutronix.de >
2011-02-02 15:28:17 +01:00
Thomas Gleixner
a7319fa253
posix-timers: Convert timer_gettime() to clockid_to_kclock()
...
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.101243181@linutronix.de >
2011-02-02 15:28:16 +01:00
Thomas Gleixner
27722df16e
posix-timers: Convert timer_settime() to clockid_to_kclock()
...
Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
and use the new decoding function.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134419.001863714@linutronix.de >
2011-02-02 15:28:16 +01:00
Thomas Gleixner
838394fbf9
posix-timers: Convert timer_create() to clockid_to_kclock()
...
Setup timer_create for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks and
remove the no_timer_create() implementation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.903604289@linutronix.de >
2011-02-02 15:28:15 +01:00
Thomas Gleixner
ebaac757ac
posix-timers: Remove useless res field from k_clock
...
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 <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.808714587@linutronix.de >
2011-02-02 15:28:15 +01:00
Thomas Gleixner
e5e542eea9
posix-timers: Convert clock_getres() to clockid_to_kclock()
...
Use the new kclock decoding. Fixup the fallout in mmtimer.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.709802797@linutronix.de >
2011-02-02 15:28:15 +01:00
Thomas Gleixner
4359ac0ace
posix-timers: Make clock_getres and clock_get mandatory
...
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 <richardcochran@gmail.com >
Cc: John Stultz <johnstul@us.ibm.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:15 +01:00
Thomas Gleixner
4228577763
posix-timers: Convert clock_gettime() to clockid_to_kclock()
...
Use the new kclock decoding mechanism and rename the misnomed
common_clock_get() to posix_clock_realtime_get().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.611097203@linutronix.de >
2011-02-02 15:28:14 +01:00
Thomas Gleixner
26f9a4796a
posix-timers: Convert clock_settime to clockid_to_kclock()
...
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 <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.518851246@linutronix.de >
2011-02-02 15:28:14 +01:00
Thomas Gleixner
79c9da0d05
posix-cpu-timers: Remove the stub nanosleep functions
...
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 <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.422446502@linutronix.de >
2011-02-02 15:28:14 +01:00
Thomas Gleixner
d608c18203
thread_info: Remove legacy arg0-3 from restart_block
...
posix timers were the last users of the legacy arg0-3 members of
restart_block. Remove the cruft.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.326209775@linutronix.de >
2011-02-02 15:28:13 +01:00
Thomas Gleixner
3751f9f29b
posix-timers: Cleanup restart_block usage
...
posix timers still use the legacy arg0-arg3 members of
restart_block. Use restart_block.nanosleep instead
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.232288779@linutronix.de >
2011-02-02 15:28:13 +01:00
Thomas Gleixner
59bd5bc24a
posix-timers: Convert clock_nanosleep_restart to clockid_to_kclock()
...
Use the new kclock decoding function in clock_nanosleep_restart.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.131263211@linutronix.de >
2011-02-02 15:28:13 +01:00
Thomas Gleixner
a5cd288010
posix-timers: Convert clock_nanosleep to clockid_to_kclock()
...
Use the new kclock decoding function in clock_nanosleep and cleanup all
kclocks which use the default functions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134418.034175556@linutronix.de >
2011-02-02 15:28:13 +01:00
Thomas Gleixner
cc785ac22b
posix-timers: Introduce clockid_to_kclock()
...
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 <tglx@linutronix.de >
Cc: John Stultz <johnstul@us.ibm.com >
Acked-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134417.938447839@linutronix.de >
2011-02-02 15:28:12 +01:00
Thomas Gleixner
1976945eea
posix-timers: Introduce clock_posix_cpu
...
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 <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134417.841974553@linutronix.de >
2011-02-02 15:28:12 +01:00
Thomas Gleixner
2fd1f04089
posix-timers: Cleanup struct initializers
...
Cosmetic. No functional change
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134417.745627057@linutronix.de >
2011-02-02 15:28:12 +01:00
Thomas Gleixner
65da528d7c
posix-timers: Define nanosleep not supported error separate
...
Define the conditional nanosleep not supported error value outside of
do_posix_clock_nonanosleep(). Preparatory patch for further cleanups.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: John Stultz <johnstul@us.ibm.com >
Tested-by: Richard Cochran <richard.cochran@omicron.at >
LKML-Reference: <20110201134417.643486574@linutronix.de >
2011-02-02 15:28:11 +01:00
Richard Cochran
1e6d767924
time: Correct the *settime* parameters
...
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 <richard.cochran@omicron.at >
Acked-by: John Stultz <johnstul@us.ibm.com >
LKML-Reference: <20110201134417.545698637@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-02-02 15:28:11 +01:00
Thomas Gleixner
7cf37e87dd
time: Fix legacy arch fallout
...
The xtime/dotimer cleanup broke architectures which do not implement
clockevents. Time to send out another __do_IRQ threat.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reported-by: Ingo Molnar <mingo@elte.hu >
Cc: Torben Hohn <torbenh@gmx.de >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
LKML-Reference: <20110127145905.23248.30458.stgit@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2011-02-01 09:46:47 +01:00
Torben Hohn
e2830b5c1b
time: Make do_timer() and xtime_lock local to kernel/time/
...
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 <torbenh@gmx.de >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 19:26:50 +01:00
Torben Hohn
d12b0e24c5
xtensa: Switch do_timer() to xtime_update()
...
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 <torbenh@gmx.de >
Cc: Chris Zankel <chris@zankel.net >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127150027.23248.61798.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:46 +01:00
Torben Hohn
4ea1b72551
sparc: Switch do_timer() to xtime_update()
...
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 <torbenh@gmx.de >
Acked-by: David S. Miller <davem@davemloft.net >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127150022.23248.80369.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:46 +01:00
Torben Hohn
bb1dfc1cf6
parisc: Switch do_timer() to xtime_update()
...
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: hch@infradead.org
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: Helge Deller <deller@gmx.de >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Kyle McMartin <kyle@mcmartin.ca >
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127150017.23248.22559.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:46 +01:00
Torben Hohn
e53f276beb
m68k: Switch do_timer() to xtime_update()
...
xtime_update() properly takes the xtime_lock
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Sam Creasey <sammy@sammy.net >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: Roman Zippel <zippel@linux-m68k.org >
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Greg Ungerer <gerg@uclinux.org >
LKML-Reference: <20110127150006.23248.71790.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:46 +01:00
Torben Hohn
7bde2ab7cb
m32r: Switch from do_timer() to xtime_update()
...
xtime_update() does proper locking.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: Hirokazu Takata <takata@linux-m32r.org >
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127150001.23248.68620.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:45 +01:00
Torben Hohn
1aabd67d2e
ia64: Switch do_timer() to xtime_update()
...
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 <torbenh@gmx.de >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145956.23248.49107.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:45 +01:00
Torben Hohn
daad8b581e
h8300: Switch do_timer() to xtime_update()
...
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145951.23248.92727.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:45 +01:00
Torben Hohn
57464bd87f
frv: Switch do_timer() to xtime_update()
...
__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 <torbenh@gmx.de >
Cc: hch@infradead.org
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: David Howells <dhowells@redhat.com >
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145946.23248.57952.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:45 +01:00
Torben Hohn
36cb07bb81
cris: arch-v32: Switch do_timer() to xtime_update()
...
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: hch@infradead.org
Cc: Jesper Nilsson <jesper.nilsson@axis.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: Mikael Starvik <starvik@axis.com >
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145941.23248.92547.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:44 +01:00
Torben Hohn
17588b9918
cris: arch-v10: Switch do_timer() to xtime_update()
...
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 <torbenh@gmx.de >
Cc: hch@infradead.org
Cc: Jesper Nilsson <jesper.nilsson@axis.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: Mikael Starvik <starvik@axis.com >
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145936.23248.16192.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:44 +01:00
Torben Hohn
4196b892d5
blackfin: Switch from do_timer() to xtime_update()
...
xtime_update() takes the xtime_lock itself.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Mike Frysinger <vapier@gentoo.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145931.23248.33917.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:44 +01:00
Torben Hohn
ec2dff2feb
arm/mach-clps711x: Switch do_timer() to xtime_update()
...
do_timer() requires holding the xtime_lock, which this
code did not do. Use the safe version xtime_update()
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Russell King <linux@arm.linux.org.uk >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145926.23248.56369.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:44 +01:00
Torben Hohn
6906e33cc5
arm: Switch from do_timer() to xtime_update()
...
xtime_update takes the xtime_lock itself.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Russell King <linux@arm.linux.org.uk >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145920.23248.75541.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:43 +01:00
Torben Hohn
1340f3e0b2
alpha: Change do_timer() to xtime_update()
...
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 <torbenh@gmx.de >
Cc: Richard Henderson <rth@twiddle.net >
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru >
Cc: Matt Turner <mattst88@gmail.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127145915.23248.20919.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:43 +01:00
Torben Hohn
f0af911a9d
time: Provide xtime_update()
...
xtime_update() takes xtime_lock write locked and calls
do_timer(). Provided to replace the do_timer() calls in the
architecture code.
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
LKML-Reference: <20110127145910.23248.21379.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:43 +01:00
Thomas Gleixner
79ecaf0d15
time: Remove unused __get_wall_to_monotonic()
...
No users left. Remove it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:43 +01:00
Torben Hohn
48cf76f710
time: Provide get_xtime_and_monotonic_offset()
...
The hrtimer code accesses timekeeping variables under
xtime_lock. Provide a sensible accessor function and use it.
[ tglx: Removed the conditionals, unused variable, fixed codingstyle
and massaged changelog ]
Signed-off-by: Torben Hohn <torbenh@gmx.de >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: johnstul@us.ibm.com
Cc: yong.zhang0@gmail.com
Cc: hch@infradead.org
LKML-Reference: <20110127145905.23248.30458.stgit@localhost>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2011-01-31 14:55:42 +01:00