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-10 23:18:24 (GMT) |
commit | 0f31dfdabd2e1e71603d2db4d0ece3f4901c3669 (patch) | |
tree | 0001024af47c557d17d61f185ff9b4e220c72eb4 /drivers/net/ethernet/freescale/dpa | |
parent | f1df4a5deb8b65f6e6f615a97918930f5923750e (diff) | |
download | linux-fsl-qoriq-0f31dfdabd2e1e71603d2db4d0ece3f4901c3669.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>
Change-Id: I1d449ec799e8d920935325d283f0ba510ee56e87
Reviewed-on: http://git.am.freescale.net:8181/4193
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/4468
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@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 b239dc3..2981467 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -330,7 +330,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; @@ -395,7 +395,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; @@ -537,7 +537,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 be31b7d..392ec1a 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 6ce1af5..2cfaaa8 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c @@ -620,7 +620,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; |