Commit 7e6a731d authored by Steven Rostedt's avatar Steven Rostedt Committed by Thomas Gleixner

net: suppress warning of smp_processor_id use.

John Kacur pointed out that the get_cpu_var used in net/sched/sch_generic.c
would trigger warnings. This was happing on a statistic variable and
by a softirq which is bound to a single thread.

John sent a patch that used local_irq_save which is a little bit of
overkill. This version uses preempt disable, but we still need to create
a preempt_disable_rt API that is only activated when PREEMPT_RT is configured.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 56c14578
...@@ -97,7 +97,9 @@ static inline int handle_dev_cpu_collision(struct sk_buff *skb, ...@@ -97,7 +97,9 @@ static inline int handle_dev_cpu_collision(struct sk_buff *skb,
* Another cpu is holding lock, requeue & delay xmits for * Another cpu is holding lock, requeue & delay xmits for
* some time. * some time.
*/ */
preempt_disable(); /* FIXME: we need an _rt version of this */
__get_cpu_var(netdev_rx_stat).cpu_collision++; __get_cpu_var(netdev_rx_stat).cpu_collision++;
preempt_enable();
ret = dev_requeue_skb(skb, q); ret = dev_requeue_skb(skb, q);
} }
......
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