memblock: add alignment parameter to alloc functions
This commit is contained in:
@@ -251,8 +251,11 @@ extern int memblock_reserve(phys_addr_t base, size_t size);
|
||||
previous calls to memblock_alloc()
|
||||
|
||||
@param size the size of the buffer to allocate in bytes.
|
||||
@param align the alignment to use. for example, an alignment of 4096
|
||||
will result in the returned pointer being a multiple
|
||||
of 4096. this must be a power of 2.
|
||||
*/
|
||||
extern void *memblock_alloc(size_t size);
|
||||
extern void *memblock_alloc(size_t size, phys_addr_t align);
|
||||
|
||||
/* allocate a block of memory, returning a physical address.
|
||||
|
||||
@@ -270,8 +273,11 @@ extern void *memblock_alloc(size_t size);
|
||||
previous calls to memblock_alloc()
|
||||
|
||||
@param size the size of the buffer to allocate in bytes.
|
||||
@param align the alignment to use. for example, an alignment of 4096
|
||||
will result in the returned pointer being a multiple
|
||||
of 4096. this must be a power of 2.
|
||||
*/
|
||||
extern phys_addr_t memblock_alloc_phys(size_t size);
|
||||
extern phys_addr_t memblock_alloc_phys(size_t size, phys_addr_t align);
|
||||
|
||||
/* free a block of memory using its virtual address.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user