diff options
author | David Howells | 2010-10-27 18:28:35 +0200 |
---|---|---|
committer | David Howells | 2010-10-27 18:28:35 +0200 |
commit | 3b950de9c94b4b9fde4f1340358ab52ce0f34be0 (patch) | |
tree | 724923f90b0d12bd6e0374b73e8fd06d8d8787e1 /include | |
parent | mn10300: Use pci_claim_resource (diff) | |
download | kernel-qcow2-linux-3b950de9c94b4b9fde4f1340358ab52ce0f34be0.tar.gz kernel-qcow2-linux-3b950de9c94b4b9fde4f1340358ab52ce0f34be0.tar.xz kernel-qcow2-linux-3b950de9c94b4b9fde4f1340358ab52ce0f34be0.zip |
MN10300: Prevent cnt32_to_63() from being preempted in sched_clock()
Prevent cnt32_to_63() from being preempted in sched_clock() because it may
read its internal counter, get preempted, get delayed for more than the half
period of the 'TSC' and then write the internal counter, thus corrupting it.
Whilst some callers of sched_clock() have interrupts disabled or hold
spinlocks, not all do, and so preemption must be held here.
Note that sched_clock() is called from lockdep, but that shouldn't be a problem
because although preempt_disable() calls into lockdep, lockdep has a recursion
counter to deal with this.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions