mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 09:04:37 +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:
@@ -831,7 +831,7 @@ static int exanic_probe ( struct pci_device *pci ) {
|
||||
}
|
||||
|
||||
/* Allocate transmit feedback region (shared between all ports) */
|
||||
exanic->txf = malloc_dma ( EXANIC_TXF_LEN, EXANIC_ALIGN );
|
||||
exanic->txf = malloc_phys ( EXANIC_TXF_LEN, EXANIC_ALIGN );
|
||||
if ( ! exanic->txf ) {
|
||||
rc = -ENOMEM;
|
||||
goto err_alloc_txf;
|
||||
@@ -853,7 +853,7 @@ static int exanic_probe ( struct pci_device *pci ) {
|
||||
for ( i-- ; i >= 0 ; i-- )
|
||||
exanic_remove_port ( exanic, i );
|
||||
exanic_reset ( exanic );
|
||||
free_dma ( exanic->txf, EXANIC_TXF_LEN );
|
||||
free_phys ( exanic->txf, EXANIC_TXF_LEN );
|
||||
err_alloc_txf:
|
||||
iounmap ( exanic->tx );
|
||||
err_ioremap_tx:
|
||||
@@ -882,7 +882,7 @@ static void exanic_remove ( struct pci_device *pci ) {
|
||||
exanic_reset ( exanic );
|
||||
|
||||
/* Free transmit feedback region */
|
||||
free_dma ( exanic->txf, EXANIC_TXF_LEN );
|
||||
free_phys ( exanic->txf, EXANIC_TXF_LEN );
|
||||
|
||||
/* Unmap transmit region */
|
||||
iounmap ( exanic->tx );
|
||||
|
||||
Reference in New Issue
Block a user