X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fbuddy.h;h=163c5a82ffaf0f218b62c7eb5e5a5b48470b1cb4;hb=b58fe2254858e3ecc94be5d86f2a93f2cfe0a0d5;hp=4781cfc5afc9d07bbd949e4fc5dee7e432b4cb7f;hpb=82071a7f5f0b18fbf1a4adc2a37fed1624572a79;p=palacios.git diff --git a/linux_module/buddy.h b/linux_module/buddy.h index 4781cfc..163c5a8 100644 --- a/linux_module/buddy.h +++ b/linux_module/buddy.h @@ -73,7 +73,8 @@ buddy_init(unsigned long pool_order, 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 @@ -91,18 +92,17 @@ buddy_remove_pool(struct buddy_memzone * zone, 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);