diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
commit | 03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch) | |
tree | 88db8dba75ae06ba3bad08e42c5e52efc162535c /net/sched | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/cls_rsvp.h | 3 | ||||
-rw-r--r-- | net/sched/sch_api.c | 24 |
3 files changed, 16 insertions, 13 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0bf7a92f4..081896dc5 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -291,7 +291,7 @@ static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct tcf_proto *tp, unsigned long fh, int event) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 8f50013f7..4168f541f 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h @@ -537,7 +537,7 @@ insert: if (s == NULL) goto errout; memset(s, 0, sizeof(*s)); - memcpy(s->dst, dst, sizeof(*dst)); + memcpy(s->dst, dst, sizeof(s->dst)); s->dpi = pinfo->dpi; s->protocol = pinfo->protocol; s->tunnelid = pinfo->tunnelid; @@ -590,7 +590,6 @@ static void rsvp_walk(struct tcf_proto *tp, struct tcf_walker *arg) static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, struct sk_buff *skb, struct tcmsg *t) { - struct rsvp_head *head = tp->root; struct rsvp_filter *f = (struct rsvp_filter*)fh; struct rsvp_session *s; unsigned char *b = skb->tail; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index a684cde66..f2fb9e36f 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -7,6 +7,10 @@ * 2 of the License, or (at your option) any later version. * * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> + * + * Fixes: + * + * Rani Assaf <rani@magic.metawire.com> :980802: JIFFIES and CPU clock sources are repaired. */ #include <linux/config.h> @@ -506,7 +510,7 @@ process_existing: } static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, - pid_t pid, u32 seq, unsigned flags, int event) + u32 pid, u32 seq, unsigned flags, int event) { struct tcmsg *tcm; struct nlmsghdr *nlh; @@ -538,7 +542,7 @@ static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct Qdisc *old, struct Qdisc *new) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) @@ -715,7 +719,7 @@ out: static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, unsigned long cl, - pid_t pid, u32 seq, unsigned flags, int event) + u32 pid, u32 seq, unsigned flags, int event) { struct tcmsg *tcm; struct nlmsghdr *nlh; @@ -745,7 +749,7 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n, struct Qdisc *q, unsigned long cl, int event) { struct sk_buff *skb; - pid_t pid = oskb ? NETLINK_CB(oskb).pid : 0; + u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) @@ -850,7 +854,7 @@ int psched_clock_scale; #endif #ifdef PSCHED_WATCHER -u32 psched_time_mark; +PSCHED_WATCHER psched_time_mark; static void psched_tick(unsigned long); @@ -864,10 +868,10 @@ static void psched_tick(unsigned long dummy) PSCHED_GET_TIME(dummy_stamp); psched_timer.expires = jiffies + 4*HZ; #else - unsigned long jiffies = now; + unsigned long now = jiffies; psched_time_base = ((u64)now)<<PSCHED_JSCALE; psched_time_mark = now; - psched_timer.expires = jiffies + 60*60*HZ; + psched_timer.expires = now + 60*60*HZ; #endif add_timer(&psched_timer); } @@ -883,7 +887,7 @@ __initfunc(int psched_calibrate_clock(void)) unsigned long stop; #if CPU == 586 || CPU == 686 - if (!(boot_cpu_data.x86_capability & X86_FEATURE_TSC) + if (!(boot_cpu_data.x86_capability & X86_FEATURE_TSC)) return -1; #endif @@ -895,7 +899,7 @@ __initfunc(int psched_calibrate_clock(void)) PSCHED_GET_TIME(stamp); do_gettimeofday(&tv); while (jiffies < stop) - boundary(); + barrier(); PSCHED_GET_TIME(stamp1); do_gettimeofday(&tv1); end_bh_atomic(); @@ -910,7 +914,7 @@ __initfunc(int psched_calibrate_clock(void)) while ((delay>>=1) != 0) psched_clock_scale++; psched_us_per_tick = 1<<psched_clock_scale; - psched_clock_per_hz = (delay*(1000000/HZ))>>psched_clock_scale; + psched_clock_per_hz = (psched_tick_per_us*(1000000/HZ))>>psched_clock_scale; return 0; } #endif |