projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[powerpc.git]
/
arch
/
ppc
/
kernel
/
time.c
diff --git
a/arch/ppc/kernel/time.c
b/arch/ppc/kernel/time.c
index
53ea723
..
d4b2cf7
100644
(file)
--- a/
arch/ppc/kernel/time.c
+++ b/
arch/ppc/kernel/time.c
@@
-42,7
+42,6
@@
* "A Kernel Model for Precision Timekeeping" by Dave Mills
*/
* "A Kernel Model for Precision Timekeeping" by Dave Mills
*/
-#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
@@
-81,8
+80,6
@@
unsigned tb_to_us;
unsigned tb_last_stamp;
unsigned long tb_to_ns_scale;
unsigned tb_last_stamp;
unsigned long tb_to_ns_scale;
-extern unsigned long wall_jiffies;
-
/* used for timezone offset */
static long timezone_offset;
/* used for timezone offset */
static long timezone_offset;
@@
-145,7
+142,7
@@
void timer_interrupt(struct pt_regs * regs)
while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
jiffy_stamp += tb_ticks_per_jiffy;
while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
jiffy_stamp += tb_ticks_per_jiffy;
- profile_tick(CPU_PROFILING
, regs
);
+ profile_tick(CPU_PROFILING);
update_process_times(user_mode(regs));
if (smp_processor_id())
update_process_times(user_mode(regs));
if (smp_processor_id())
@@
-154,7
+151,7
@@
void timer_interrupt(struct pt_regs * regs)
/* We are in an interrupt, no need to save/restore flags */
write_seqlock(&xtime_lock);
tb_last_stamp = jiffy_stamp;
/* We are in an interrupt, no need to save/restore flags */
write_seqlock(&xtime_lock);
tb_last_stamp = jiffy_stamp;
- do_timer(
regs
);
+ do_timer(
1
);
/*
* update the rtc when needed, this should be performed on the
/*
* update the rtc when needed, this should be performed on the
@@
-174,8
+171,7
@@
void timer_interrupt(struct pt_regs * regs)
*/
if ( ppc_md.set_rtc_time && ntp_synced() &&
xtime.tv_sec - last_rtc_update >= 659 &&
*/
if ( ppc_md.set_rtc_time && ntp_synced() &&
xtime.tv_sec - last_rtc_update >= 659 &&
- abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
- jiffies - wall_jiffies == 1) {
+ abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ) {
if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
last_rtc_update = xtime.tv_sec+1;
else
if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
last_rtc_update = xtime.tv_sec+1;
else
@@
-201,7
+197,7
@@
void do_gettimeofday(struct timeval *tv)
{
unsigned long flags;
unsigned long seq;
{
unsigned long flags;
unsigned long seq;
- unsigned delta,
lost_ticks,
usec, sec;
+ unsigned delta, usec, sec;
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
do {
seq = read_seqbegin_irqsave(&xtime_lock, flags);
@@
-215,10
+211,9
@@
void do_gettimeofday(struct timeval *tv)
if (!smp_tb_synchronized)
delta = 0;
#endif /* CONFIG_SMP */
if (!smp_tb_synchronized)
delta = 0;
#endif /* CONFIG_SMP */
- lost_ticks = jiffies - wall_jiffies;
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
} while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
- usec += mulhwu(tb_to_us,
tb_ticks_per_jiffy * lost_ticks +
delta);
+ usec += mulhwu(tb_to_us, delta);
while (usec >= 1000000) {
sec++;
usec -= 1000000;
while (usec >= 1000000) {
sec++;
usec -= 1000000;
@@
-259,7
+254,6
@@
int do_settimeofday(struct timespec *tv)
* still reasonable when gettimeofday resolution is 1 jiffy.
*/
tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id()));
* still reasonable when gettimeofday resolution is 1 jiffy.
*/
tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id()));
- tb_delta += (jiffies - wall_jiffies) * tb_ticks_per_jiffy;
new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta);
new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta);