[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:
@@ -165,7 +165,7 @@ static int myson_create_ring ( struct myson_nic *myson,
|
||||
int rc;
|
||||
|
||||
/* Allocate descriptor ring */
|
||||
ring->desc = malloc_dma ( len, MYSON_RING_ALIGN );
|
||||
ring->desc = malloc_phys ( len, MYSON_RING_ALIGN );
|
||||
if ( ! ring->desc ) {
|
||||
rc = -ENOMEM;
|
||||
goto err_alloc;
|
||||
@@ -197,7 +197,7 @@ static int myson_create_ring ( struct myson_nic *myson,
|
||||
return 0;
|
||||
|
||||
err_64bit:
|
||||
free_dma ( ring->desc, len );
|
||||
free_phys ( ring->desc, len );
|
||||
ring->desc = NULL;
|
||||
err_alloc:
|
||||
return rc;
|
||||
@@ -217,7 +217,7 @@ static void myson_destroy_ring ( struct myson_nic *myson,
|
||||
writel ( 0, myson->regs + ring->reg );
|
||||
|
||||
/* Free descriptor ring */
|
||||
free_dma ( ring->desc, len );
|
||||
free_phys ( ring->desc, len );
|
||||
ring->desc = NULL;
|
||||
ring->prod = 0;
|
||||
ring->cons = 0;
|
||||
|
||||
Reference in New Issue
Block a user