Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333881
b: refs/heads/master
c: 26cff4e
h: refs/heads/master
i:
  333879: 883b79e
v: v3
  • Loading branch information
Hildner, Christian authored and Thomas Gleixner committed Oct 9, 2012
1 parent 68e7476 commit 0350c04
Show file tree
Hide file tree
Showing 2 changed files with 7 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: db8c246937713e60b7628661ccc187eeb81f2bae
refs/heads/master: 26cff4e2aa4d666dc6a120ea34336b5057e3e187
10 changes: 6 additions & 4 deletions trunk/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ EXPORT_SYMBOL(jiffies_64);
#define TVR_SIZE (1 << TVR_BITS)
#define TVN_MASK (TVN_SIZE - 1)
#define TVR_MASK (TVR_SIZE - 1)
#define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1))

struct tvec {
struct list_head vec[TVN_SIZE];
Expand Down Expand Up @@ -359,11 +360,12 @@ __internal_add_timer(struct tvec_base *base, struct timer_list *timer)
vec = base->tv1.vec + (base->timer_jiffies & TVR_MASK);
} else {
int i;
/* If the timeout is larger than 0xffffffff on 64-bit
* architectures then we use the maximum timeout:
/* If the timeout is larger than MAX_TVAL (on 64-bit
* architectures or with CONFIG_BASE_SMALL=1) then we
* use the maximum timeout.
*/
if (idx > 0xffffffffUL) {
idx = 0xffffffffUL;
if (idx > MAX_TVAL) {
idx = MAX_TVAL;
expires = idx + base->timer_jiffies;
}
i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
Expand Down

0 comments on commit 0350c04

Please sign in to comment.