X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fmm.c;h=166cfd2d03dd25e2fcf80e2c1c21b934991ef00e;hb=002d46c777ac52048d0a3e82c80821ad3c8fef46;hp=04dcab32787bd96ea20c7aa962fc98853180badc;hpb=ed7cae62acb31ddd833c7efb0f6cda1b4915e7cb;p=palacios.git diff --git a/linux_module/mm.c b/linux_module/mm.c index 04dcab3..166cfd2 100644 --- a/linux_module/mm.c +++ b/linux_module/mm.c @@ -91,6 +91,8 @@ static uintptr_t alloc_contig_pgs(u64 num_pages, u32 alignment) { } } + /* printk("PALACIOS BAD: LARGE PAGE ALLOCATION FAILED\n"); */ + return 0; } @@ -103,29 +105,31 @@ uintptr_t alloc_palacios_pgs(u64 num_pages, u32 alignment) { struct page * pgs = NULL; int order = get_order(num_pages * PAGE_SIZE); - pgs = alloc_pages(GFP_DMA, order); + pgs = alloc_pages(GFP_DMA32, order); WARN(!pgs, "Could not allocate pages\n"); + + /* if (!pgs) { printk("PALACIOS BAD: SMALL PAGE ALLOCATION FAILED\n"); } */ - printk("%llu pages (order=%d) aquired from alloc_pages\n", - num_pages, order); + /* printk("%llu pages (order=%d) aquired from alloc_pages\n", + num_pages, order); */ addr = page_to_pfn(pgs) << PAGE_SHIFT; } else { - printk("Allocating %llu pages from bitmap allocator\n", num_pages); + //printk("Allocating %llu pages from bitmap allocator\n", num_pages); //addr = pool.base_addr; addr = alloc_contig_pgs(num_pages, alignment); } - printk("Returning from alloc addr=%p, vaddr=%p\n", (void *)addr, __va(addr)); + //printk("Returning from alloc addr=%p, vaddr=%p\n", (void *)addr, __va(addr)); return addr; } void free_palacios_pgs(uintptr_t pg_addr, int num_pages) { - printk("Freeing Memory page %p\n", (void *)pg_addr); + //printk("Freeing Memory page %p\n", (void *)pg_addr); if ((pg_addr >= pool.base_addr) && (pg_addr < pool.base_addr + (4096 * pool.num_pages))) {