diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 14 | ||||
-rw-r--r-- | net/core/drop_monitor.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b65a5051361f..9ef13ff354fe 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2153,7 +2153,7 @@ static inline void __netif_reschedule(struct Qdisc *q) | |||
2153 | unsigned long flags; | 2153 | unsigned long flags; |
2154 | 2154 | ||
2155 | local_irq_save(flags); | 2155 | local_irq_save(flags); |
2156 | sd = &__get_cpu_var(softnet_data); | 2156 | sd = this_cpu_ptr(&softnet_data); |
2157 | q->next_sched = NULL; | 2157 | q->next_sched = NULL; |
2158 | *sd->output_queue_tailp = q; | 2158 | *sd->output_queue_tailp = q; |
2159 | sd->output_queue_tailp = &q->next_sched; | 2159 | sd->output_queue_tailp = &q->next_sched; |
@@ -3195,7 +3195,7 @@ static void rps_trigger_softirq(void *data) | |||
3195 | static int rps_ipi_queued(struct softnet_data *sd) | 3195 | static int rps_ipi_queued(struct softnet_data *sd) |
3196 | { | 3196 | { |
3197 | #ifdef CONFIG_RPS | 3197 | #ifdef CONFIG_RPS |
3198 | struct softnet_data *mysd = &__get_cpu_var(softnet_data); | 3198 | struct softnet_data *mysd = this_cpu_ptr(&softnet_data); |
3199 | 3199 | ||
3200 | if (sd != mysd) { | 3200 | if (sd != mysd) { |
3201 | sd->rps_ipi_next = mysd->rps_ipi_list; | 3201 | sd->rps_ipi_next = mysd->rps_ipi_list; |
@@ -3222,7 +3222,7 @@ static bool skb_flow_limit(struct sk_buff *skb, unsigned int qlen) | |||
3222 | if (qlen < (netdev_max_backlog >> 1)) | 3222 | if (qlen < (netdev_max_backlog >> 1)) |
3223 | return false; | 3223 | return false; |
3224 | 3224 | ||
3225 | sd = &__get_cpu_var(softnet_data); | 3225 | sd = this_cpu_ptr(&softnet_data); |
3226 | 3226 | ||
3227 | rcu_read_lock(); | 3227 | rcu_read_lock(); |
3228 | fl = rcu_dereference(sd->flow_limit); | 3228 | fl = rcu_dereference(sd->flow_limit); |
@@ -3369,7 +3369,7 @@ EXPORT_SYMBOL(netif_rx_ni); | |||
3369 | 3369 | ||
3370 | static void net_tx_action(struct softirq_action *h) | 3370 | static void net_tx_action(struct softirq_action *h) |
3371 | { | 3371 | { |
3372 | struct softnet_data *sd = &__get_cpu_var(softnet_data); | 3372 | struct softnet_data *sd = this_cpu_ptr(&softnet_data); |
3373 | 3373 | ||
3374 | if (sd->completion_queue) { | 3374 | if (sd->completion_queue) { |
3375 | struct sk_buff *clist; | 3375 | struct sk_buff *clist; |
@@ -3794,7 +3794,7 @@ EXPORT_SYMBOL(netif_receive_skb); | |||
3794 | static void flush_backlog(void *arg) | 3794 | static void flush_backlog(void *arg) |
3795 | { | 3795 | { |
3796 | struct net_device *dev = arg; | 3796 | struct net_device *dev = arg; |
3797 | struct softnet_data *sd = &__get_cpu_var(softnet_data); | 3797 | struct softnet_data *sd = this_cpu_ptr(&softnet_data); |
3798 | struct sk_buff *skb, *tmp; | 3798 | struct sk_buff *skb, *tmp; |
3799 | 3799 | ||
3800 | rps_lock(sd); | 3800 | rps_lock(sd); |
@@ -4301,7 +4301,7 @@ void __napi_schedule(struct napi_struct *n) | |||
4301 | unsigned long flags; | 4301 | unsigned long flags; |
4302 | 4302 | ||
4303 | local_irq_save(flags); | 4303 | local_irq_save(flags); |
4304 | ____napi_schedule(&__get_cpu_var(softnet_data), n); | 4304 | ____napi_schedule(this_cpu_ptr(&softnet_data), n); |
4305 | local_irq_restore(flags); | 4305 | local_irq_restore(flags); |
4306 | } | 4306 | } |
4307 | EXPORT_SYMBOL(__napi_schedule); | 4307 | EXPORT_SYMBOL(__napi_schedule); |
@@ -4422,7 +4422,7 @@ EXPORT_SYMBOL(netif_napi_del); | |||
4422 | 4422 | ||
4423 | static void net_rx_action(struct softirq_action *h) | 4423 | static void net_rx_action(struct softirq_action *h) |
4424 | { | 4424 | { |
4425 | struct softnet_data *sd = &__get_cpu_var(softnet_data); | 4425 | struct softnet_data *sd = this_cpu_ptr(&softnet_data); |
4426 | unsigned long time_limit = jiffies + 2; | 4426 | unsigned long time_limit = jiffies + 2; |
4427 | int budget = netdev_budget; | 4427 | int budget = netdev_budget; |
4428 | void *have; | 4428 | void *have; |
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 50f9a9db5792..252e155c837b 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -146,7 +146,7 @@ static void trace_drop_common(struct sk_buff *skb, void *location) | |||
146 | unsigned long flags; | 146 | unsigned long flags; |
147 | 147 | ||
148 | local_irq_save(flags); | 148 | local_irq_save(flags); |
149 | data = &__get_cpu_var(dm_cpu_data); | 149 | data = this_cpu_ptr(&dm_cpu_data); |
150 | spin_lock(&data->lock); | 150 | spin_lock(&data->lock); |
151 | dskb = data->skb; | 151 | dskb = data->skb; |
152 | 152 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 163b673f9e62..adfc7ee1acf2 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -345,7 +345,7 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask) | |||
345 | unsigned long flags; | 345 | unsigned long flags; |
346 | 346 | ||
347 | local_irq_save(flags); | 347 | local_irq_save(flags); |
348 | nc = &__get_cpu_var(netdev_alloc_cache); | 348 | nc = this_cpu_ptr(&netdev_alloc_cache); |
349 | if (unlikely(!nc->frag.page)) { | 349 | if (unlikely(!nc->frag.page)) { |
350 | refill: | 350 | refill: |
351 | for (order = NETDEV_FRAG_PAGE_MAX_ORDER; ;) { | 351 | for (order = NETDEV_FRAG_PAGE_MAX_ORDER; ;) { |