Commit 788729e0 authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

net/sched fixes:

- include/net/pkt_sched.h: wrong detection of 32bit archs, Martin Devera
- net/sched/sch_api.c: jiffies wrap bug, Martin Devera
parent df59c450
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES #define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h>
#include <linux/pkt_sched.h> #include <linux/pkt_sched.h>
#include <net/pkt_cls.h> #include <net/pkt_cls.h>
...@@ -221,7 +222,7 @@ extern psched_time_t psched_time_base; ...@@ -221,7 +222,7 @@ extern psched_time_t psched_time_base;
#define PSCHED_EXPORTLIST_2 #define PSCHED_EXPORTLIST_2
#if ~0UL == 0xFFFFFFFF #if BITS_PER_LONG <= 32
#define PSCHED_WATCHER unsigned long #define PSCHED_WATCHER unsigned long
......
...@@ -1117,7 +1117,7 @@ static void psched_tick(unsigned long dummy) ...@@ -1117,7 +1117,7 @@ static void psched_tick(unsigned long dummy)
psched_timer.expires = jiffies + 1*HZ; psched_timer.expires = jiffies + 1*HZ;
#else #else
unsigned long now = jiffies; unsigned long now = jiffies;
psched_time_base = ((u64)now)<<PSCHED_JSCALE; psched_time_base += ((u64)(now-psched_time_mark))<<PSCHED_JSCALE;
psched_time_mark = now; psched_time_mark = now;
psched_timer.expires = now + 60*60*HZ; psched_timer.expires = now + 60*60*HZ;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment