Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218701
b: refs/heads/master
c: 3b950de
h: refs/heads/master
i:
  218699: 9628481
v: v3
  • Loading branch information
David Howells committed Oct 27, 2010
1 parent 8165847 commit 8c0b496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcd42ed3ea829aa99cf00d34c61e082ce575b193
refs/heads/master: 3b950de9c94b4b9fde4f1340358ab52ce0f34be0
5 changes: 5 additions & 0 deletions trunk/arch/mn10300/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ unsigned long long sched_clock(void)
unsigned long tsc, tmp;
unsigned product[3]; /* 96-bit intermediate value */

/* cnt32_to_63() is not safe with preemption */
preempt_disable();

/* read the TSC value
*/
tsc = 0 - get_cycles(); /* get_cycles() counts down */
Expand All @@ -64,6 +67,8 @@ unsigned long long sched_clock(void)
*/
tsc64.ll = cnt32_to_63(tsc) & 0x7fffffffffffffffULL;

preempt_enable();

/* scale the 64-bit TSC value to a nanosecond value via a 96-bit
* intermediate
*/
Expand Down

0 comments on commit 8c0b496

Please sign in to comment.