[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:
Michael Brown
2020-11-05 19:08:48 +00:00
parent 36dde9b0bf
commit be1c87b722
48 changed files with 350 additions and 350 deletions
+2 -2
View File
@@ -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] );