mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[malloc] Rename malloc_dma() to malloc_phys()
The malloc_dma() function allocates memory with specified physical alignment, and is typically (though not exclusively) used to allocate memory for DMA. Rename to malloc_phys() to more closely match the functionality, and to create name space for functions that specifically allocate and map DMA-capable buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -267,7 +267,7 @@ nv_init_rings ( struct forcedeth_private *priv )
|
||||
|
||||
/* Allocate ring for both TX and RX */
|
||||
priv->rx_ring =
|
||||
malloc_dma ( sizeof(struct ring_desc) * RXTX_RING_SIZE, 32 );
|
||||
malloc_phys ( sizeof(struct ring_desc) * RXTX_RING_SIZE, 32 );
|
||||
if ( ! priv->rx_ring )
|
||||
goto err_malloc;
|
||||
priv->tx_ring = &priv->rx_ring[RX_RING_SIZE];
|
||||
@@ -308,7 +308,7 @@ nv_free_rxtx_resources ( struct forcedeth_private *priv )
|
||||
|
||||
DBGP ( "nv_free_rxtx_resources\n" );
|
||||
|
||||
free_dma ( priv->rx_ring, sizeof(struct ring_desc) * RXTX_RING_SIZE );
|
||||
free_phys ( priv->rx_ring, sizeof(struct ring_desc) * RXTX_RING_SIZE );
|
||||
|
||||
for ( i = 0; i < RX_RING_SIZE; i++ ) {
|
||||
free_iob ( priv->rx_iobuf[i] );
|
||||
|
||||
Reference in New Issue
Block a user