aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorThéo Lebrun <theo.lebrun@bootlin.com>2026-10-13 15:16:44 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-10-20 09:30:24 +0200
commited16494c2c50efc4666bd3618f6644062e44a1fd (patch)
treec9917850de508e25697674f95f5b614acd4404e1 /scripts/Makefile.thinlto
parentnet: macb: change caps helpers signatures (diff)
net: macb: change function signatures to take contexts
For parallel MACB context to start become a reality, many functions need to stop operating on bp->ctx (the currently active context) and instead work on a context they get passed. That context might be (1) the new one that is getting allocated and initialised, or, (2) the old one to be freed. To reduce bug surface area, taint those functions to *only* take a context `struct macb_context *ctx` and no `struct macb *bp`. That way, no bug of using `bp->ctx` instead of `ctx` will ever occur. We also convert functions that take a `struct macb_queue *queue` to instead take `struct macb_context *ctx, unsigned int q`, with q indexing ctx->txq[] and ctx->rxq[]. Full list: macb_adj_dma_desc_idx() macb_tx_ring_wrap() macb_tx_desc() macb_rx_ring_wrap() macb_rx_desc() macb_get_addr() gem_rx_refill() macb_init_rx_ring() gem_free_rx_buffers() macb_free_rx_buffers() macb_tx_ring_size_per_queue() macb_rx_ring_size_per_queue() macb_free() gem_alloc_rx_buffers() macb_alloc_rx_buffers() macb_alloc() gem_init_rx_ring() gem_init_rings() macb_init_rings() Note about gem_rx_refill(): it ends with a netdev_vdbg() that prints the queue pointer. Change to print the queue index because we do not have access to the queue anymore. Note: functions that operate on the interface during its normal lifetime do not need to be converted and have no risk of using the wrong context. We do not allow concurrent swaps. When interface is alive, there can only be one context alive. Acked-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Link: https://patch.msgid.link/20261013-macb-context-v11-6-b27785167566@bootlin.com Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # RPi CM5 with RP1 GEM Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions