diff options
Diffstat (limited to 'tools/testing/memblock/tests/common.h')
-rw-r--r-- | tools/testing/memblock/tests/common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/testing/memblock/tests/common.h b/tools/testing/memblock/tests/common.h index b864c64fb60f..619054d03219 100644 --- a/tools/testing/memblock/tests/common.h +++ b/tools/testing/memblock/tests/common.h @@ -2,8 +2,23 @@ #ifndef _MEMBLOCK_TEST_H #define _MEMBLOCK_TEST_H +#include <stdlib.h> +#include <assert.h> #include <linux/types.h> #include <linux/memblock.h> +#include <linux/sizes.h> + +#define MEM_SIZE SZ_16K + +/* + * Available memory registered with memblock needs to be valid for allocs + * test to run. This is a convenience wrapper for memory allocated in + * dummy_physical_memory_init() that is later registered with memblock + * in setup_memblock(). + */ +struct test_memory { + void *base; +}; struct region { phys_addr_t base; @@ -12,5 +27,8 @@ struct region { void reset_memblock_regions(void); void reset_memblock_attributes(void); +void setup_memblock(void); +void dummy_physical_memory_init(void); +void dummy_physical_memory_cleanup(void); #endif |