aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/pktio/physmem/physmem.h
diff options
context:
space:
mode:
authorJosep Puigdemont <josep.puigdemont@linaro.org>2018-01-02 15:47:50 +0100
committerJosep Puigdemont <josep.puigdemont@linaro.org>2018-01-16 13:39:01 +0100
commitd99b3beb5ba18f061b4baa2debd46d674e542403 (patch)
tree16c4a18a30072c759827d44f0313e4202593beed /platform/linux-generic/pktio/physmem/physmem.h
parent217b610fa1c7c14e0e8f4a33a94dba6f50c79328 (diff)
physmem: change API, alloc now does a mapping toodevel/native-drivers
We add the _reserve() function to the API to do what was previously achieved with _alloc(), which is to reserve a set of huge pages that are physically contiguous. We changed _alloc() so it now calls _reserve() and _map() and it returns a block that is already mapped in the process' virtual address space. Signed-off-by: Josep Puigdemont <josep.puigdemont@linaro.org> Reviewed-by: Yi He <yi.he@linaro.org>
Diffstat (limited to 'platform/linux-generic/pktio/physmem/physmem.h')
-rw-r--r--platform/linux-generic/pktio/physmem/physmem.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/linux-generic/pktio/physmem/physmem.h b/platform/linux-generic/pktio/physmem/physmem.h
index 77dcb3894..ea3e65674 100644
--- a/platform/linux-generic/pktio/physmem/physmem.h
+++ b/platform/linux-generic/pktio/physmem/physmem.h
@@ -37,6 +37,7 @@ struct physmem_block {
int physmem_block_init_global(void);
int physmem_block_term_global(void);
+struct physmem_block *physmem_block_reserve(uint64_t size);
struct physmem_block *physmem_block_alloc(uint64_t size);
void physmem_block_free(struct physmem_block *block);
int physmem_block_map(struct physmem_block *block, void *addr);