Commit 9f56f64c authored by Patrick McHardy's avatar Patrick McHardy

[PKT_SCHED]: Remove dead timer code.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 02bc27cb
...@@ -216,8 +216,6 @@ typedef long psched_tdiff_t; ...@@ -216,8 +216,6 @@ typedef long psched_tdiff_t;
typedef u64 psched_time_t; typedef u64 psched_time_t;
typedef long psched_tdiff_t; typedef long psched_tdiff_t;
extern psched_time_t psched_time_base;
#if PSCHED_CLOCK_SOURCE == PSCHED_JIFFIES #if PSCHED_CLOCK_SOURCE == PSCHED_JIFFIES
#if HZ < 96 #if HZ < 96
...@@ -256,6 +254,7 @@ extern int psched_clock_scale; ...@@ -256,6 +254,7 @@ extern int psched_clock_scale;
#define PSCHED_WATCHER u32 #define PSCHED_WATCHER u32
extern psched_time_t psched_time_base;
extern PSCHED_WATCHER psched_time_mark; extern PSCHED_WATCHER psched_time_mark;
#define PSCHED_GET_TIME(stamp) \ #define PSCHED_GET_TIME(stamp) \
......
...@@ -1103,16 +1103,14 @@ int psched_tod_diff(int delta_sec, int bound) ...@@ -1103,16 +1103,14 @@ int psched_tod_diff(int delta_sec, int bound)
EXPORT_SYMBOL(psched_tod_diff); EXPORT_SYMBOL(psched_tod_diff);
#endif #endif
psched_time_t psched_time_base;
#if PSCHED_CLOCK_SOURCE == PSCHED_CPU #if PSCHED_CLOCK_SOURCE == PSCHED_CPU
psched_tdiff_t psched_clock_per_hz; psched_tdiff_t psched_clock_per_hz;
int psched_clock_scale; int psched_clock_scale;
EXPORT_SYMBOL(psched_clock_per_hz); EXPORT_SYMBOL(psched_clock_per_hz);
EXPORT_SYMBOL(psched_clock_scale); EXPORT_SYMBOL(psched_clock_scale);
#endif
#ifdef PSCHED_WATCHER #ifdef PSCHED_WATCHER
psched_time_t psched_time_base;
PSCHED_WATCHER psched_time_mark; PSCHED_WATCHER psched_time_mark;
EXPORT_SYMBOL(psched_time_mark); EXPORT_SYMBOL(psched_time_mark);
EXPORT_SYMBOL(psched_time_base); EXPORT_SYMBOL(psched_time_base);
...@@ -1123,22 +1121,14 @@ static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0); ...@@ -1123,22 +1121,14 @@ static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0);
static void psched_tick(unsigned long dummy) static void psched_tick(unsigned long dummy)
{ {
#if PSCHED_CLOCK_SOURCE == PSCHED_CPU
psched_time_t dummy_stamp; psched_time_t dummy_stamp;
PSCHED_GET_TIME(dummy_stamp); PSCHED_GET_TIME(dummy_stamp);
/* It is OK up to 4GHz cpu */ /* It is OK up to 4GHz cpu */
psched_timer.expires = jiffies + 1*HZ; psched_timer.expires = jiffies + 1*HZ;
#else
unsigned long now = jiffies;
psched_time_base += ((u64)(now-psched_time_mark))<<PSCHED_JSCALE;
psched_time_mark = now;
psched_timer.expires = now + 60*60*HZ;
#endif
add_timer(&psched_timer); add_timer(&psched_timer);
} }
#endif #endif
#if PSCHED_CLOCK_SOURCE == PSCHED_CPU
int __init psched_calibrate_clock(void) int __init psched_calibrate_clock(void)
{ {
psched_time_t stamp, stamp1; psched_time_t stamp, stamp1;
...@@ -1185,9 +1175,6 @@ static int __init pktsched_init(void) ...@@ -1185,9 +1175,6 @@ static int __init pktsched_init(void)
#elif PSCHED_CLOCK_SOURCE == PSCHED_JIFFIES #elif PSCHED_CLOCK_SOURCE == PSCHED_JIFFIES
psched_tick_per_us = HZ<<PSCHED_JSCALE; psched_tick_per_us = HZ<<PSCHED_JSCALE;
psched_us_per_tick = 1000000; psched_us_per_tick = 1000000;
#ifdef PSCHED_WATCHER
psched_tick(0);
#endif
#endif #endif
link_p = rtnetlink_links[PF_UNSPEC]; link_p = rtnetlink_links[PF_UNSPEC];
......
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