mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +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:
@@ -370,7 +370,7 @@ static void atl1e_free_ring_resources(struct atl1e_adapter *adapter)
|
||||
atl1e_clean_rx_ring(adapter);
|
||||
|
||||
if (adapter->ring_vir_addr) {
|
||||
free_dma(adapter->ring_vir_addr, adapter->ring_size);
|
||||
free_phys(adapter->ring_vir_addr, adapter->ring_size);
|
||||
adapter->ring_vir_addr = NULL;
|
||||
adapter->ring_dma = 0;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ static int atl1e_setup_ring_resources(struct atl1e_adapter *adapter)
|
||||
/* real ring DMA buffer */
|
||||
|
||||
size = adapter->ring_size;
|
||||
adapter->ring_vir_addr = malloc_dma(adapter->ring_size, 32);
|
||||
adapter->ring_vir_addr = malloc_phys(adapter->ring_size, 32);
|
||||
|
||||
if (adapter->ring_vir_addr == NULL) {
|
||||
DBG("atl1e: out of memory allocating %d bytes for %s ring\n",
|
||||
|
||||
Reference in New Issue
Block a user