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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
cris
/
kernel
/
time.c
diff --git
a/arch/cris/kernel/time.c
b/arch/cris/kernel/time.c
index
6c28b0e
..
0f9213c
100644
(file)
--- a/
arch/cris/kernel/time.c
+++ b/
arch/cris/kernel/time.c
@@
-1,4
+1,4
@@
-/* $Id: time.c,v 1.1
4 2004/06/01 05:38:11
starvik Exp $
+/* $Id: time.c,v 1.1
8 2005/03/04 08:16:17
starvik Exp $
*
* linux/arch/cris/kernel/time.c
*
*
* linux/arch/cris/kernel/time.c
*
@@
-30,16
+30,13
@@
#include <linux/bcd.h>
#include <linux/timex.h>
#include <linux/init.h>
#include <linux/bcd.h>
#include <linux/timex.h>
#include <linux/init.h>
-
-u64 jiffies_64 = INITIAL_JIFFIES;
-
-EXPORT_SYMBOL(jiffies_64);
+#include <linux/profile.h>
+#include <linux/sched.h> /* just for sched_clock() - funny that */
int have_rtc; /* used to remember if we have an RTC or not */;
#define TICK_SIZE tick
int have_rtc; /* used to remember if we have an RTC or not */;
#define TICK_SIZE tick
-extern unsigned long wall_jiffies;
extern unsigned long loops_per_jiffy; /* init/main.c */
unsigned long loops_per_usec;
extern unsigned long loops_per_jiffy; /* init/main.c */
unsigned long loops_per_usec;
@@
-60,11
+57,6
@@
void do_gettimeofday(struct timeval *tv)
local_irq_save(flags);
local_irq_disable();
usec = do_gettimeoffset();
local_irq_save(flags);
local_irq_disable();
usec = do_gettimeoffset();
- {
- unsigned long lost = jiffies - wall_jiffies;
- if (lost)
- usec += lost * (1000000 / HZ);
- }
/*
* If time_adjust is negative then NTP is slowing the clock
/*
* If time_adjust is negative then NTP is slowing the clock
@@
-105,7
+97,6
@@
int do_settimeofday(struct timespec *tv)
* made, and then undo it!
*/
nsec -= do_gettimeoffset() * NSEC_PER_USEC;
* made, and then undo it!
*/
nsec -= do_gettimeoffset() * NSEC_PER_USEC;
- nsec -= (jiffies - wall_jiffies) * TICK_NSEC;
wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
@@
-113,10
+104,7
@@
int do_settimeofday(struct timespec *tv)
set_normalized_timespec(&xtime, sec, nsec);
set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
set_normalized_timespec(&xtime, sec, nsec);
set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
- time_adjust = 0; /* stop active adjtime() */
- time_status |= STA_UNSYNC;
- time_maxerror = NTP_PHASE_LIMIT;
- time_esterror = NTP_PHASE_LIMIT;
+ ntp_clear();
write_sequnlock_irq(&xtime_lock);
clock_was_set();
return 0;
write_sequnlock_irq(&xtime_lock);
clock_was_set();
return 0;
@@
-214,6
+202,21
@@
update_xtime_from_cmos(void)
}
}
}
}
+extern void cris_profile_sample(struct pt_regs* regs);
+
+void
+cris_do_profile(struct pt_regs* regs)
+{
+
+#if CONFIG_SYSTEM_PROFILER
+ cris_profile_sample(regs);
+#endif
+
+#if CONFIG_PROFILING
+ profile_tick(CPU_PROFILING, regs);
+#endif
+}
+
/*
* Scheduler clock - returns current time in nanosec units.
*/
/*
* Scheduler clock - returns current time in nanosec units.
*/