Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31397
b: refs/heads/master
c: 572e614
h: refs/heads/master
i:
  31395: e60a752
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Jun 30, 2006
1 parent 5df2e4e commit 5d3ffe6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6edb08620fbeeeba81ab63c7129a51cdb3acd8b3
refs/heads/master: 572e614750c3ed27da1ec6b75dc486066a11fffd
10 changes: 8 additions & 2 deletions trunk/arch/um/kernel/time_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ void time_init_kern(void)

void do_boot_timer_handler(struct sigcontext * sc)
{
unsigned long flags;
struct pt_regs regs;

CHOOSE_MODE((void) (UPT_SC(&regs.regs) = sc),
(void) (regs.regs.skas.is_user = 0));

write_seqlock_irqsave(&xtime_lock, flags);
do_timer(&regs);
write_sequnlock_irqrestore(&xtime_lock, flags);
}

static DEFINE_SPINLOCK(timer_spinlock);
Expand All @@ -125,15 +129,17 @@ irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
unsigned long long nsecs;
unsigned long flags;

write_seqlock_irqsave(&xtime_lock, flags);

do_timer(regs);

write_seqlock_irqsave(&xtime_lock, flags);
nsecs = get_time() + local_offset;
xtime.tv_sec = nsecs / NSEC_PER_SEC;
xtime.tv_nsec = nsecs - xtime.tv_sec * NSEC_PER_SEC;

write_sequnlock_irqrestore(&xtime_lock, flags);

return(IRQ_HANDLED);
return IRQ_HANDLED;
}

long um_time(int __user *tloc)
Expand Down

0 comments on commit 5d3ffe6

Please sign in to comment.