net: mvpp2: map the CPUs to threads

This patch maps all uses of the CPU to threads. All this_cpu calls are
replaced, and all smp_processor_id() calls are wrapped into the
indirection.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Antoine Tenart
2018-09-19 11:27:09 +02:00
committed by David S. Miller
parent 543ec376e3
commit 074c74dfcb
2 changed files with 55 additions and 40 deletions

View File

@@ -814,6 +814,9 @@ struct mvpp2_port {
void __iomem *base;
void __iomem *stats_base;
/* Number of threads used on the port */
unsigned int nthreads;
struct mvpp2_rx_queue **rxqs;
unsigned int nrxqs;
struct mvpp2_tx_queue **txqs;
@@ -971,7 +974,7 @@ struct mvpp2_txq_pcpu_buf {
/* Per-CPU Tx queue control */
struct mvpp2_txq_pcpu {
unsigned int cpu;
unsigned int thread;
/* Number of Tx DMA descriptors in the descriptor ring */
int size;