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:
@@ -246,7 +246,7 @@ pcnet32_setup_rx_resources ( struct pcnet32_private *priv )
|
||||
{
|
||||
DBGP ( "pcnet32_setup_rx_resources\n" );
|
||||
|
||||
priv->rx_base = malloc_dma ( RX_RING_BYTES, RX_RING_ALIGN );
|
||||
priv->rx_base = malloc_phys ( RX_RING_BYTES, RX_RING_ALIGN );
|
||||
|
||||
DBG ( "priv->rx_base = %#08lx\n", virt_to_bus ( priv->rx_base ) );
|
||||
|
||||
@@ -270,7 +270,7 @@ pcnet32_free_rx_resources ( struct pcnet32_private *priv )
|
||||
|
||||
DBGP ( "pcnet32_free_rx_resources\n" );
|
||||
|
||||
free_dma ( priv->rx_base, RX_RING_BYTES );
|
||||
free_phys ( priv->rx_base, RX_RING_BYTES );
|
||||
|
||||
for ( i = 0; i < RX_RING_SIZE; i++ ) {
|
||||
free_iob ( priv->rx_iobuf[i] );
|
||||
@@ -290,7 +290,7 @@ pcnet32_setup_tx_resources ( struct pcnet32_private *priv )
|
||||
{
|
||||
DBGP ( "pcnet32_setup_tx_resources\n" );
|
||||
|
||||
priv->tx_base = malloc_dma ( TX_RING_BYTES, TX_RING_ALIGN );
|
||||
priv->tx_base = malloc_phys ( TX_RING_BYTES, TX_RING_ALIGN );
|
||||
|
||||
if ( ! priv->tx_base ) {
|
||||
return -ENOMEM;
|
||||
@@ -312,7 +312,7 @@ pcnet32_free_tx_resources ( struct pcnet32_private *priv )
|
||||
{
|
||||
DBGP ( "pcnet32_free_tx_resources\n" );
|
||||
|
||||
free_dma ( priv->tx_base, TX_RING_BYTES );
|
||||
free_phys ( priv->tx_base, TX_RING_BYTES );
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user