From 6722f35ffcc25d475dc83294462affb33f232918 Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Thu, 31 Oct 2013 17:23:00 +0900 Subject: [PATCH] calculate a physical address in 64 bit width When physical page of address 0x1_0000_0000 is allocated, it becomes false ENOMEM error. --- lib/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/page_alloc.c b/lib/page_alloc.c index e1fdffd0..8fec9cba 100644 --- a/lib/page_alloc.c +++ b/lib/page_alloc.c @@ -17,7 +17,7 @@ void free_pages(void *, int npages); #define MAP_INDEX(n) ((n) >> 6) #define MAP_BIT(n) ((n) & 0x3f) #define ADDRESS(desc, index, bit) \ - ((desc)->start + (((index) * 64 + (bit)) << ((desc)->shift))) + ((desc)->start + (((uintptr_t)(index) * 64 + (bit)) << ((desc)->shift))) void *__ihk_pagealloc_init(unsigned long start, unsigned long size, unsigned long unit, void *initial,