net: Replace get_cpu_var through this_cpu_ptr
Replace uses of get_cpu_var for address calculation through this_cpu_ptr. Cc: netdev@vger.kernel.org Cc: Eric Dumazet <edumazet@google.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:

committed by
Tejun Heo

parent
f7f66b05aa
commit
903ceff7ca
@@ -2153,7 +2153,7 @@ static inline void __netif_reschedule(struct Qdisc *q)
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
sd = &__get_cpu_var(softnet_data);
|
||||
sd = this_cpu_ptr(&softnet_data);
|
||||
q->next_sched = NULL;
|
||||
*sd->output_queue_tailp = q;
|
||||
sd->output_queue_tailp = &q->next_sched;
|
||||
@@ -3195,7 +3195,7 @@ static void rps_trigger_softirq(void *data)
|
||||
static int rps_ipi_queued(struct softnet_data *sd)
|
||||
{
|
||||
#ifdef CONFIG_RPS
|
||||
struct softnet_data *mysd = &__get_cpu_var(softnet_data);
|
||||
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
|
||||
|
||||
if (sd != mysd) {
|
||||
sd->rps_ipi_next = mysd->rps_ipi_list;
|
||||
@@ -3222,7 +3222,7 @@ static bool skb_flow_limit(struct sk_buff *skb, unsigned int qlen)
|
||||
if (qlen < (netdev_max_backlog >> 1))
|
||||
return false;
|
||||
|
||||
sd = &__get_cpu_var(softnet_data);
|
||||
sd = this_cpu_ptr(&softnet_data);
|
||||
|
||||
rcu_read_lock();
|
||||
fl = rcu_dereference(sd->flow_limit);
|
||||
@@ -3369,7 +3369,7 @@ EXPORT_SYMBOL(netif_rx_ni);
|
||||
|
||||
static void net_tx_action(struct softirq_action *h)
|
||||
{
|
||||
struct softnet_data *sd = &__get_cpu_var(softnet_data);
|
||||
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
|
||||
|
||||
if (sd->completion_queue) {
|
||||
struct sk_buff *clist;
|
||||
@@ -3794,7 +3794,7 @@ EXPORT_SYMBOL(netif_receive_skb);
|
||||
static void flush_backlog(void *arg)
|
||||
{
|
||||
struct net_device *dev = arg;
|
||||
struct softnet_data *sd = &__get_cpu_var(softnet_data);
|
||||
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
|
||||
struct sk_buff *skb, *tmp;
|
||||
|
||||
rps_lock(sd);
|
||||
@@ -4301,7 +4301,7 @@ void __napi_schedule(struct napi_struct *n)
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
____napi_schedule(&__get_cpu_var(softnet_data), n);
|
||||
____napi_schedule(this_cpu_ptr(&softnet_data), n);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_schedule);
|
||||
@@ -4422,7 +4422,7 @@ EXPORT_SYMBOL(netif_napi_del);
|
||||
|
||||
static void net_rx_action(struct softirq_action *h)
|
||||
{
|
||||
struct softnet_data *sd = &__get_cpu_var(softnet_data);
|
||||
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
|
||||
unsigned long time_limit = jiffies + 2;
|
||||
int budget = netdev_budget;
|
||||
void *have;
|
||||
|
Reference in New Issue
Block a user