diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-09-24 15:09:29 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-10-04 12:01:20 +0530 |
commit | 7f5d67ca5f9a50d1c2169e5b2417e60b1b7d3967 (patch) | |
tree | 92aef4d0b73ae743c2dc59912fc0de6bc88b9420 /include | |
parent | 7e0d5387128228d407ee1cafd2ce6fa9ac6252b9 (diff) | |
download | SLOF-7f5d67ca5f9a50d1c2169e5b2417e60b1b7d3967.zip SLOF-7f5d67ca5f9a50d1c2169e5b2417e60b1b7d3967.tar.gz SLOF-7f5d67ca5f9a50d1c2169e5b2417e60b1b7d3967.tar.bz2 |
Implement range allocator
Use the allocator with dma-map-in so it does not create duplicate TCE
entries.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/allocator.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/allocator.h b/include/allocator.h new file mode 100644 index 0000000..0f75fce --- /dev/null +++ b/include/allocator.h @@ -0,0 +1,23 @@ +/****************************************************************************** + * Copyright (c) 2007, 2012, 2013 IBM Corporation + * All rights reserved. + * This program and the accompanying materials + * are made available under the terms of the BSD License + * which accompanies this distribution, and is available at + * http://www.opensource.org/licenses/bsd-license.php + * + * Contributors: + * IBM Corporation - initial implementation + *****************************************************************************/ + +#ifndef _ALLOCATOR_H +#define _ALLOCATOR_H + +extern void SLOF_bm_print(unsigned long handle); +extern unsigned long SLOF_bm_allocator_init(unsigned long start, + unsigned long size, + unsigned long blocksize); +extern unsigned long SLOF_bm_alloc(unsigned long handle, unsigned long size); +extern void SLOF_bm_free(unsigned long handle, unsigned long ptr, unsigned long size); + +#endif /* _ALLOCATOR_H */ |