unsigned int node_id);
extern void
-buddy_deinit(struct buddy_memzone * zone);
+buddy_deinit(struct buddy_memzone * zone,
+ int (*free_callback)(void *user_metadata));
/* Add pool at given physical address */
extern int
void **user_metadata);
-// constraint=0 => no constraints, otherwise bitmask of:
-#define LWK_BUDDY_CONSTRAINT_4GB 0x1
/* Allocate pages, returns physical address */
extern uintptr_t
buddy_alloc(struct buddy_memzone * zone,
unsigned long order,
- int constraints);
+ int (*filter_func)(void *paddr, void *filter_state),
+ void *filter_state);
/* Free a physical address */
-extern void
+extern int
buddy_free(struct buddy_memzone * zone,
uintptr_t addr,
unsigned long order);