Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72785
b: refs/heads/master
c: 3a6c43a
h: refs/heads/master
i:
  72783: 4a43a46
v: v3
  • Loading branch information
Atsushi Nemoto authored and Ralf Baechle committed Oct 29, 2007
1 parent 295ef0c commit 50950d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: c637fecb4fe67e2baccef24b9b7e9cb79ee23cf8
refs/heads/master: 3a6c43a78763da67d4049745ce35122734e89fbc
14 changes: 10 additions & 4 deletions trunk/arch/mips/kernel/cevt-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int c0_compare_int_pending(void)

static int c0_compare_int_usable(void)
{
const unsigned int delta = 0x300000;
unsigned int delta;
unsigned int cnt;

/*
Expand All @@ -192,9 +192,15 @@ static int c0_compare_int_usable(void)
return 0;
}

cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
for (delta = 0x10; delta <= 0x400000; delta <<= 1) {
cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
irq_disable_hazard();
if ((int)(read_c0_count() - cnt) < 0)
break;
/* increase delta if the timer was already expired */
}

while ((int)(read_c0_count() - cnt) <= 0)
; /* Wait for expiry */
Expand Down

0 comments on commit 50950d0

Please sign in to comment.