Lines Matching refs:thread
148 static void mvpp2_thread_write(struct mvpp2 *priv, unsigned int thread, in mvpp2_thread_write() argument
151 writel(data, priv->swth_base[thread] + offset); in mvpp2_thread_write()
154 static u32 mvpp2_thread_read(struct mvpp2 *priv, unsigned int thread, in mvpp2_thread_read() argument
157 return readl(priv->swth_base[thread] + offset); in mvpp2_thread_read()
160 static void mvpp2_thread_write_relaxed(struct mvpp2 *priv, unsigned int thread, in mvpp2_thread_write_relaxed() argument
163 writel_relaxed(data, priv->swth_base[thread] + offset); in mvpp2_thread_write_relaxed()
166 static u32 mvpp2_thread_read_relaxed(struct mvpp2 *priv, unsigned int thread, in mvpp2_thread_read_relaxed() argument
169 return readl_relaxed(priv->swth_base[thread] + offset); in mvpp2_thread_read_relaxed()
443 unsigned int thread = mvpp2_cpu_to_thread(priv, get_cpu()); in mvpp2_bm_bufs_get_addrs() local
445 *dma_addr = mvpp2_thread_read(priv, thread, in mvpp2_bm_bufs_get_addrs()
447 *phys_addr = mvpp2_thread_read(priv, thread, MVPP2_BM_VIRT_ALLOC_REG); in mvpp2_bm_bufs_get_addrs()
453 val = mvpp2_thread_read(priv, thread, MVPP22_BM_ADDR_HIGH_ALLOC); in mvpp2_bm_bufs_get_addrs()
587 unsigned int thread = mvpp2_cpu_to_thread(priv, get_cpu()); in mvpp2_bm_pool_cleanup() local
593 mvpp2_thread_read(priv, thread, MVPP2_BM_PHY_ALLOC_REG(pool_id)); in mvpp2_bm_pool_cleanup()
764 unsigned int thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_bm_pool_put() local
767 if (test_bit(thread, &port->priv->lock_map)) in mvpp2_bm_pool_put()
768 spin_lock_irqsave(&port->bm_lock[thread], flags); in mvpp2_bm_pool_put()
782 mvpp2_thread_write_relaxed(port->priv, thread, in mvpp2_bm_pool_put()
791 mvpp2_thread_write_relaxed(port->priv, thread, in mvpp2_bm_pool_put()
793 mvpp2_thread_write_relaxed(port->priv, thread, in mvpp2_bm_pool_put()
796 if (test_bit(thread, &port->priv->lock_map)) in mvpp2_bm_pool_put()
797 spin_unlock_irqrestore(&port->bm_lock[thread], flags); in mvpp2_bm_pool_put()
2163 unsigned int thread = in mvpp2_aggr_desc_num_check() local
2166 MVPP2_AGGR_TXQ_STATUS_REG(thread)); in mvpp2_aggr_desc_num_check()
2185 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_txq_alloc_reserved_desc() local
2190 mvpp2_thread_write_relaxed(priv, thread, MVPP2_TXQ_RSVD_REQ_REG, val); in mvpp2_txq_alloc_reserved_desc()
2192 val = mvpp2_thread_read_relaxed(priv, thread, MVPP2_TXQ_RSVD_RSLT_REG); in mvpp2_txq_alloc_reserved_desc()
2206 unsigned int thread; in mvpp2_txq_reserved_desc_num_proc() local
2217 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_reserved_desc_num_proc()
2220 txq_pcpu_aux = per_cpu_ptr(txq->pcpu, thread); in mvpp2_txq_reserved_desc_num_proc()
2382 unsigned int thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_rx_pkts_coal_set() local
2387 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_NUM_REG, rxq->id); in mvpp2_rx_pkts_coal_set()
2388 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_THRESH_REG, in mvpp2_rx_pkts_coal_set()
2398 unsigned int thread; in mvpp2_tx_pkts_coal_set() local
2406 for (thread = 0; thread < MVPP2_MAX_THREADS; thread++) { in mvpp2_tx_pkts_coal_set()
2407 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id); in mvpp2_tx_pkts_coal_set()
2408 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_THRESH_REG, val); in mvpp2_tx_pkts_coal_set()
2512 if (txq_pcpu->thread != mvpp2_cpu_to_thread(port->priv, smp_processor_id())) in mvpp2_txq_done()
2528 unsigned int thread) in mvpp2_tx_done() argument
2539 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_tx_done()
2556 unsigned int thread, struct mvpp2 *priv) in mvpp2_aggr_txq_init() argument
2571 MVPP2_AGGR_TXQ_INDEX_REG(thread)); in mvpp2_aggr_txq_init()
2582 mvpp2_write(priv, MVPP2_AGGR_TXQ_DESC_ADDR_REG(thread), txq_dma); in mvpp2_aggr_txq_init()
2583 mvpp2_write(priv, MVPP2_AGGR_TXQ_DESC_SIZE_REG(thread), in mvpp2_aggr_txq_init()
2594 unsigned int thread; in mvpp2_rxq_init() local
2613 thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_rxq_init()
2614 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_NUM_REG, rxq->id); in mvpp2_rxq_init()
2619 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_DESC_ADDR_REG, rxq_dma); in mvpp2_rxq_init()
2620 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_DESC_SIZE_REG, rxq->size); in mvpp2_rxq_init()
2621 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_INDEX_REG, 0); in mvpp2_rxq_init()
2702 unsigned int thread; in mvpp2_rxq_deinit() local
2727 thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_rxq_deinit()
2728 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_NUM_REG, rxq->id); in mvpp2_rxq_deinit()
2729 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_DESC_ADDR_REG, 0); in mvpp2_rxq_deinit()
2730 mvpp2_thread_write(port->priv, thread, MVPP2_RXQ_DESC_SIZE_REG, 0); in mvpp2_rxq_deinit()
2739 unsigned int thread; in mvpp2_txq_init() local
2755 thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_txq_init()
2756 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id); in mvpp2_txq_init()
2757 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_DESC_ADDR_REG, in mvpp2_txq_init()
2759 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_DESC_SIZE_REG, in mvpp2_txq_init()
2761 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_INDEX_REG, 0); in mvpp2_txq_init()
2762 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_RSVD_CLR_REG, in mvpp2_txq_init()
2764 val = mvpp2_thread_read(port->priv, thread, MVPP2_TXQ_PENDING_REG); in mvpp2_txq_init()
2766 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_PENDING_REG, val); in mvpp2_txq_init()
2777 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_PREF_BUF_REG, in mvpp2_txq_init()
2796 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_init()
2797 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_txq_init()
2831 unsigned int thread; in mvpp2_txq_deinit() local
2833 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_deinit()
2834 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_txq_deinit()
2860 thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_txq_deinit()
2861 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id); in mvpp2_txq_deinit()
2862 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_DESC_ADDR_REG, 0); in mvpp2_txq_deinit()
2863 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_DESC_SIZE_REG, 0); in mvpp2_txq_deinit()
2872 unsigned int thread = mvpp2_cpu_to_thread(port->priv, get_cpu()); in mvpp2_txq_clean() local
2875 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id); in mvpp2_txq_clean()
2876 val = mvpp2_thread_read(port->priv, thread, MVPP2_TXQ_PREF_BUF_REG); in mvpp2_txq_clean()
2878 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_PREF_BUF_REG, val); in mvpp2_txq_clean()
2894 pending = mvpp2_thread_read(port->priv, thread, in mvpp2_txq_clean()
2900 mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_PREF_BUF_REG, val); in mvpp2_txq_clean()
2903 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_txq_clean()
2904 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_txq_clean()
3282 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_xdp_finish_tx() local
3289 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_xdp_finish_tx()
3291 aggr_txq = &port->priv->aggr_txqs[thread]; in mvpp2_xdp_finish_tx()
3313 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_xdp_submit_frame() local
3325 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_xdp_submit_frame()
3326 aggr_txq = &port->priv->aggr_txqs[thread]; in mvpp2_xdp_submit_frame()
3723 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in tx_desc_unmap_put() local
3724 struct mvpp2_txq_pcpu *txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in tx_desc_unmap_put()
3829 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_tx_frag_process() local
3830 struct mvpp2_txq_pcpu *txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_tx_frag_process()
4002 unsigned int thread; in mvpp2_tx() local
4007 thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_tx()
4011 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_tx()
4012 aggr_txq = &port->priv->aggr_txqs[thread]; in mvpp2_tx()
4014 if (test_bit(thread, &port->priv->lock_map)) in mvpp2_tx()
4015 spin_lock_irqsave(&port->tx_lock[thread], flags); in mvpp2_tx()
4070 struct mvpp2_pcpu_stats *stats = per_cpu_ptr(port->stats, thread); in mvpp2_tx()
4100 struct mvpp2_port_pcpu *port_pcpu = per_cpu_ptr(port->pcpu, thread); in mvpp2_tx()
4110 if (test_bit(thread, &port->priv->lock_map)) in mvpp2_tx()
4111 spin_unlock_irqrestore(&port->tx_lock[thread], flags); in mvpp2_tx()
4132 unsigned int thread = mvpp2_cpu_to_thread(port->priv, smp_processor_id()); in mvpp2_poll() local
4155 mvpp2_thread_write(port->priv, thread, in mvpp2_poll()
4520 unsigned int thread; in mvpp2_stop() local
4535 for (thread = 0; thread < port->priv->nthreads; thread++) { in mvpp2_stop()
4536 port_pcpu = per_cpu_ptr(port->pcpu, thread); in mvpp2_stop()
5550 unsigned int thread; in mvpp2_port_init() local
5606 for (thread = 0; thread < priv->nthreads; thread++) { in mvpp2_port_init()
5607 txq_pcpu = per_cpu_ptr(txq->pcpu, thread); in mvpp2_port_init()
5608 txq_pcpu->thread = thread; in mvpp2_port_init()
6354 unsigned int ntxqs, nrxqs, thread; in mvpp2_port_probe() local
6524 for (thread = 0; thread < priv->nthreads; thread++) { in mvpp2_port_probe()
6525 port_pcpu = per_cpu_ptr(port->pcpu, thread); in mvpp2_port_probe()