diff options
| author | Michael Brown | 2020-11-05 20:08:48 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-11-05 20:13:52 +0100 |
| commit | be1c87b72237f633c4f4b05bcb133acf2967d788 (patch) | |
| tree | adc9bc36da62d55f0f1f5708af7c66d1cc3af949 /src/interface | |
| parent | [efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance (diff) | |
| download | ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.gz ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.xz ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.zip | |
[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>
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/hyperv/vmbus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interface/hyperv/vmbus.c b/src/interface/hyperv/vmbus.c index e50fe9951..86d2a08d7 100644 --- a/src/interface/hyperv/vmbus.c +++ b/src/interface/hyperv/vmbus.c @@ -434,7 +434,7 @@ int vmbus_open ( struct vmbus_device *vmdev, len = ( sizeof ( *vmdev->out ) + out_len + sizeof ( *vmdev->in ) + in_len ); assert ( ( len % PAGE_SIZE ) == 0 ); - ring = malloc_dma ( len, PAGE_SIZE ); + ring = malloc_phys ( len, PAGE_SIZE ); if ( ! ring ) { rc = -ENOMEM; goto err_alloc_ring; @@ -509,7 +509,7 @@ int vmbus_open ( struct vmbus_device *vmdev, err_post_message: vmbus_gpadl_teardown ( vmdev, vmdev->gpadl ); err_establish: - free_dma ( ring, len ); + free_phys ( ring, len ); err_alloc_ring: free ( packet ); err_alloc_packet: @@ -555,7 +555,7 @@ void vmbus_close ( struct vmbus_device *vmdev ) { /* Free ring buffer */ len = ( sizeof ( *vmdev->out ) + vmdev->out_len + sizeof ( *vmdev->in ) + vmdev->in_len ); - free_dma ( vmdev->out, len ); + free_phys ( vmdev->out, len ); vmdev->out = NULL; vmdev->in = NULL; |
