diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 12:58:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-14 12:58:24 -0500 |
commit | d0316554d3586cbea60592a41391b5def2553d6f (patch) | |
tree | 5e7418f0bacbc68cec5dfd1541e03eb56870aa02 /drivers/net | |
parent | fb0bbb92d42d5bd0ab224605444efdfed06d6934 (diff) | |
parent | 51e99be00ce2713cbb841cedc997cafa6e26c7f4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (34 commits)
m68k: rename global variable vmalloc_end to m68k_vmalloc_end
percpu: add missing per_cpu_ptr_to_phys() definition for UP
percpu: Fix kdump failure if booted with percpu_alloc=page
percpu: make misc percpu symbols unique
percpu: make percpu symbols in ia64 unique
percpu: make percpu symbols in powerpc unique
percpu: make percpu symbols in x86 unique
percpu: make percpu symbols in xen unique
percpu: make percpu symbols in cpufreq unique
percpu: make percpu symbols in oprofile unique
percpu: make percpu symbols in tracer unique
percpu: make percpu symbols under kernel/ and mm/ unique
percpu: remove some sparse warnings
percpu: make alloc_percpu() handle array types
vmalloc: fix use of non-existent percpu variable in put_cpu_var()
this_cpu: Use this_cpu_xx in trace_functions_graph.c
this_cpu: Use this_cpu_xx for ftrace
this_cpu: Use this_cpu_xx in nmi handling
this_cpu: Use this_cpu operations in RCU
this_cpu: Use this_cpu ops for VM statistics
...
Fix up trivial (famous last words) global per-cpu naming conflicts in
arch/x86/kvm/svm.c
mm/slab.c
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/chelsio/sge.c | 5 | ||||
-rw-r--r-- | drivers/net/loopback.c | 2 | ||||
-rw-r--r-- | drivers/net/veth.c | 7 |
3 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 8c658cf6f62f..109d2783e4d8 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -1378,7 +1378,7 @@ static void sge_rx(struct sge *sge, struct freelQ *fl, unsigned int len) | |||
1378 | } | 1378 | } |
1379 | __skb_pull(skb, sizeof(*p)); | 1379 | __skb_pull(skb, sizeof(*p)); |
1380 | 1380 | ||
1381 | st = per_cpu_ptr(sge->port_stats[p->iff], smp_processor_id()); | 1381 | st = this_cpu_ptr(sge->port_stats[p->iff]); |
1382 | 1382 | ||
1383 | skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev); | 1383 | skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev); |
1384 | if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff && | 1384 | if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff && |
@@ -1780,8 +1780,7 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1780 | { | 1780 | { |
1781 | struct adapter *adapter = dev->ml_priv; | 1781 | struct adapter *adapter = dev->ml_priv; |
1782 | struct sge *sge = adapter->sge; | 1782 | struct sge *sge = adapter->sge; |
1783 | struct sge_port_stats *st = per_cpu_ptr(sge->port_stats[dev->if_port], | 1783 | struct sge_port_stats *st = this_cpu_ptr(sge->port_stats[dev->if_port]); |
1784 | smp_processor_id()); | ||
1785 | struct cpl_tx_pkt *cpl; | 1784 | struct cpl_tx_pkt *cpl; |
1786 | struct sk_buff *orig_skb = skb; | 1785 | struct sk_buff *orig_skb = skb; |
1787 | int ret; | 1786 | int ret; |
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index eae4ad749e9d..b9fcc9819837 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -81,7 +81,7 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb, | |||
81 | 81 | ||
82 | /* it's OK to use per_cpu_ptr() because BHs are off */ | 82 | /* it's OK to use per_cpu_ptr() because BHs are off */ |
83 | pcpu_lstats = dev->ml_priv; | 83 | pcpu_lstats = dev->ml_priv; |
84 | lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id()); | 84 | lb_stats = this_cpu_ptr(pcpu_lstats); |
85 | 85 | ||
86 | len = skb->len; | 86 | len = skb->len; |
87 | if (likely(netif_rx(skb) == NET_RX_SUCCESS)) { | 87 | if (likely(netif_rx(skb) == NET_RX_SUCCESS)) { |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 63099c58a6dd..3a15de56df9c 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -153,15 +153,14 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
153 | struct net_device *rcv = NULL; | 153 | struct net_device *rcv = NULL; |
154 | struct veth_priv *priv, *rcv_priv; | 154 | struct veth_priv *priv, *rcv_priv; |
155 | struct veth_net_stats *stats, *rcv_stats; | 155 | struct veth_net_stats *stats, *rcv_stats; |
156 | int length, cpu; | 156 | int length; |
157 | 157 | ||
158 | priv = netdev_priv(dev); | 158 | priv = netdev_priv(dev); |
159 | rcv = priv->peer; | 159 | rcv = priv->peer; |
160 | rcv_priv = netdev_priv(rcv); | 160 | rcv_priv = netdev_priv(rcv); |
161 | 161 | ||
162 | cpu = smp_processor_id(); | 162 | stats = this_cpu_ptr(priv->stats); |
163 | stats = per_cpu_ptr(priv->stats, cpu); | 163 | rcv_stats = this_cpu_ptr(rcv_priv->stats); |
164 | rcv_stats = per_cpu_ptr(rcv_priv->stats, cpu); | ||
165 | 164 | ||
166 | if (!(rcv->flags & IFF_UP)) | 165 | if (!(rcv->flags & IFF_UP)) |
167 | goto tx_drop; | 166 | goto tx_drop; |