git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
arch
/
um
/
kernel
/
time_kern.c
diff --git
a/arch/um/kernel/time_kern.c
b/arch/um/kernel/time_kern.c
index
c36bff0
..
7209ba5
100644
(file)
--- a/
arch/um/kernel/time_kern.c
+++ b/
arch/um/kernel/time_kern.c
@@
-20,7
+20,6
@@
#include "user_util.h"
#include "time_user.h"
#include "mode.h"
#include "user_util.h"
#include "time_user.h"
#include "mode.h"
-#include "os.h"
u64 jiffies_64;
u64 jiffies_64;
@@
-43,10
+42,10
@@
unsigned long long sched_clock(void)
int timer_irq_inited = 0;
static int first_tick;
int timer_irq_inited = 0;
static int first_tick;
-static unsigned long long prev_
usecs
;
+static unsigned long long prev_
tsc
;
static long long delta; /* Deviation per interval */
static long long delta; /* Deviation per interval */
-#define MILLION 1000000
+extern unsigned long long host_hz;
void timer_irq(union uml_pt_regs *regs)
{
void timer_irq(union uml_pt_regs *regs)
{
@@
-61,24
+60,21
@@
void timer_irq(union uml_pt_regs *regs)
if(first_tick){
#if defined(CONFIG_UML_REAL_TIME_CLOCK)
if(first_tick){
#if defined(CONFIG_UML_REAL_TIME_CLOCK)
+ unsigned long long tsc;
/* We've had 1 tick */
/* We've had 1 tick */
-
unsigned long long usecs = os_usecs
();
+
tsc = time_stamp
();
- delta +=
usecs - prev_usecs
;
- prev_
usecs = usecs
;
+ delta +=
tsc - prev_tsc
;
+ prev_
tsc = tsc
;
- /* Protect against the host clock being set backwards */
- if(delta < 0)
- delta = 0;
-
- ticks += (delta * HZ) / MILLION;
- delta -= (ticks * MILLION) / HZ;
+ ticks += (delta * HZ) / host_hz;
+ delta -= (ticks * host_hz) / HZ;
#else
ticks = 1;
#endif
}
else {
#else
ticks = 1;
#endif
}
else {
- prev_
usecs = os_usecs
();
+ prev_
tsc = time_stamp
();
first_tick = 1;
}
first_tick = 1;
}
@@
-153,7
+149,7
@@
void __udelay(um_udelay_t usecs)
{
int i, n;
{
int i, n;
- n = (loops_per_jiffy * HZ * usecs) /
MILLION
;
+ n = (loops_per_jiffy * HZ * usecs) /
1000000
;
for(i=0;i<n;i++) ;
}
for(i=0;i<n;i++) ;
}
@@
-161,7
+157,7
@@
void __const_udelay(um_udelay_t usecs)
{
int i, n;
{
int i, n;
- n = (loops_per_jiffy * HZ * usecs) /
MILLION
;
+ n = (loops_per_jiffy * HZ * usecs) /
1000000
;
for(i=0;i<n;i++) ;
}
for(i=0;i<n;i++) ;
}