diff options
Diffstat (limited to 'tools/testing/memblock/internal.h')
| -rw-r--r-- | tools/testing/memblock/internal.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/tools/testing/memblock/internal.h b/tools/testing/memblock/internal.h index 009b97bbdd22..f1974e009013 100644 --- a/tools/testing/memblock/internal.h +++ b/tools/testing/memblock/internal.h @@ -11,22 +11,44 @@ static int memblock_debug = 1; #define pr_warn_ratelimited(fmt, ...) printf(fmt, ##__VA_ARGS__) +#define K(x) ((x) << (PAGE_SHIFT-10)) + bool mirrored_kernelcore = false; struct page {}; +static inline void *page_address(struct page *page) +{ + BUG(); + return page; +} -void memblock_free_pages(unsigned long pfn, unsigned int order) +static inline struct page *virt_to_page(void *virt) { + BUG(); + return virt; } -static inline void accept_memory(phys_addr_t start, unsigned long size) +#define for_each_valid_pfn(pfn, start_pfn, end_pfn) \ + for ((pfn) = (start_pfn); (pfn) < (end_pfn); (pfn)++) + +static inline void *kasan_reset_tag(const void *addr) { + return (void *)addr; } -static inline unsigned long free_reserved_area(void *start, void *end, - int poison, const char *s) +static inline bool __is_kernel(unsigned long addr) +{ + return false; +} + +#define for_each_valid_pfn(pfn, start_pfn, end_pfn) \ + for ((pfn) = (start_pfn); (pfn) < (end_pfn); (pfn)++) + +#define __SetPageReserved(p) ((void)(p)) + +static inline bool kho_scratch_overlap(phys_addr_t phys, size_t size) { - return 0; + return false; } #endif |
