diff options
author | Cristian Sovaiala <cristian.sovaiala@freescale.com> | 2013-09-23 13:28:59 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-10-01 20:14:07 (GMT) |
commit | f101a60e9772908826dc88971fe52a96968e2408 (patch) | |
tree | e917f7c6019d301ff59169a3ba7a303058d00ed8 /drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c | |
parent | 6950fbb9458118286ccdf9e11f554b1731984a9b (diff) | |
download | linux-fsl-qoriq-f101a60e9772908826dc88971fe52a96968e2408.tar.xz |
dpaa_eth: Replace for_each_online_cpu with for_each_possible_cpu
At bootime, we currently initialize a NAPI instance per each
online core, per interface. Booting with a subset of cores and
bringing up more cores afterwards means that no NAPI instances
are created for the newly added cores.
Therefore we create a NAPI instance for each possible core in
the system such that there will always be <total_no_of_cores>
NAPI instances for each interface.
This also gurantees that we do enable/disable NAPI on all possible
cores at ifconfig up/down thus eliminating the need to keep track
of the cores that were online at the previous ifconfig operation.
Even though we do create a NAPI instance and enable it for all
possible cores (including offline cores), the scheduler ensures
that NAPI will not be scheduled on offline cores.
Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com>
Change-Id: I666bbb870fb8645495a80343cdbefb047c086f4c
Reviewed-on: http://git.am.freescale.net:8181/5118
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/dpaa_eth_shared.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c index 565b46e..300c456 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_shared.c @@ -693,7 +693,7 @@ dpaa_eth_shared_probe(struct platform_device *_of_dev) err = -ENOMEM; goto alloc_percpu_failed; } - for_each_online_cpu(i) { + for_each_possible_cpu(i) { percpu_priv = per_cpu_ptr(priv->percpu_priv, i); memset(percpu_priv, 0, sizeof(*percpu_priv)); } |