X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fbuddy.h;h=e0ef86dfd1f79ec1d27ed07dbeddeea2885484c6;hb=60ad6a41c6d0ee08ed689e8505eb0c3df0c2a289;hp=34742e1c76d563249dc925a7dc4c49c64f17e3be;hpb=84c84a909e8c3374e2cd7768ef4240ca9d73222f;p=palacios.git diff --git a/linux_module/buddy.h b/linux_module/buddy.h index 34742e1..e0ef86d 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,14 +92,18 @@ 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); + unsigned long order, + int constraints); /* Free a physical address */ -extern void +extern int buddy_free(struct buddy_memzone * zone, uintptr_t addr, unsigned long order);