diff options
author | Ioana Radulescu <ruxandra.radulescu@freescale.com> | 2013-08-21 13:23:25 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-09-11 23:30:27 (GMT) |
commit | 6e8727d17c85c39df6beb317332a055d6fd598c0 (patch) | |
tree | e2a432a4ff89beafdef200edb060cfa66c68bf67 /drivers/net/ethernet/freescale/dpa | |
parent | 29a00d700281673eac96fdeb0033805f3231d2f7 (diff) | |
download | linux-fsl-qoriq-6e8727d17c85c39df6beb317332a055d6fd598c0.tar.xz |
dpaa_eth: Replace per_cpu_ptr with __this_cpu_ptr
We randomly used either __this_cpu_ptr() or per_cpu_ptr() on current
processor.
Use only __this_cpu_ptr() in ordr to make the code more uniform.
No functional or performance impact.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/4193
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Change-Id: Ifd63f277fe35b3a44f7b7dc7beacf6b86765e900
Reviewed-on: http://git.am.freescale.net:8181/4654
Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index 683347e..066cae0 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -331,7 +331,7 @@ priv_rx_error_dqrr(struct qman_portal *portal, net_dev = ((struct dpa_fq *)fq)->net_dev; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); if (dpaa_eth_napi_schedule(percpu_priv)) return qman_cb_dqrr_stop; @@ -396,7 +396,7 @@ priv_tx_conf_error_dqrr(struct qman_portal *portal, net_dev = ((struct dpa_fq *)fq)->net_dev; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); if (dpaa_eth_napi_schedule(percpu_priv)) return qman_cb_dqrr_stop; @@ -538,7 +538,7 @@ static void dpaa_eth_poll_controller(struct net_device *net_dev) { struct dpa_priv_s *priv = netdev_priv(net_dev); struct dpa_percpu_priv_s *percpu_priv = - this_cpu_ptr(priv->percpu_priv); + __this_cpu_ptr(priv->percpu_priv); struct napi_struct napi = percpu_priv->napi; qman_irqsource_remove(QM_PIRQ_DQRI); diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c index 2927df8..4c367bc 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c @@ -190,7 +190,7 @@ void __cold dpa_timeout(struct net_device *net_dev) struct dpa_percpu_priv_s *percpu_priv; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); if (netif_msg_timer(priv)) netdev_crit(net_dev, "Transmit timeout latency: %u ms\n", diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c index 49b46b4..cc687b7 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c @@ -619,7 +619,7 @@ int __hot dpa_tx(struct sk_buff *skb, struct net_device *net_dev) goto done; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); percpu_stats = &percpu_priv->stats; countptr = __this_cpu_ptr(priv->dpa_bp->percpu_count); diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c index c0dcee8..c43473e 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c @@ -237,7 +237,7 @@ shared_rx_dqrr(struct qman_portal *portal, struct qman_fq *fq, net_dev = ((struct dpa_fq *)fq)->net_dev; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); dpa_bp = dpa_bpid2pool(fd->bpid); BUG_ON(IS_ERR(dpa_bp)); @@ -371,7 +371,7 @@ shared_tx_error_dqrr(struct qman_portal *portal, dpa_bp = dpa_bpid2pool(fd->bpid); BUG_ON(IS_ERR(dpa_bp)); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); if (netif_msg_hw(priv) && net_ratelimit()) netdev_warn(net_dev, "FD status = 0x%08x\n", @@ -404,7 +404,7 @@ shared_tx_default_dqrr(struct qman_portal *portal, dpa_bp = dpa_bpid2pool(fd->bpid); BUG_ON(IS_ERR(dpa_bp)); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); if (unlikely(fd->status & FM_FD_STAT_ERRORS) != 0) { if (netif_msg_hw(priv) && net_ratelimit()) @@ -435,7 +435,7 @@ static void shared_ern(struct qman_portal *portal, net_dev = dpa_fq->net_dev; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); dpa_fd_release(net_dev, &msg->ern.fd); @@ -457,7 +457,7 @@ int __hot dpa_shared_tx(struct sk_buff *skb, struct net_device *net_dev) fm_prs_result_t parse_results; priv = netdev_priv(net_dev); - percpu_priv = per_cpu_ptr(priv->percpu_priv, smp_processor_id()); + percpu_priv = __this_cpu_ptr(priv->percpu_priv); memset(&fd, 0, sizeof(fd)); fd.format = qm_fd_contig; |