[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/7] xen/mm: Static memory: Widen assign_pages(nr) to unsigned long



Static memory assignment is currently limited UINT_MAX pages.
To normalize on unsigned long, widen assign_pages() for unsigned long.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@xxxxxxxxxx>
---
 xen/common/page_alloc.c | 8 ++++----
 xen/include/xen/mm.h    | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 3f8b300d8c29..8670233c550d 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2851,12 +2851,12 @@ void init_domheap_pages(paddr_t ps, paddr_t pe)
 
 int assign_pages(
     struct page_info *pg,
-    unsigned int nr,
+    unsigned long nr,
     struct domain *d,
     unsigned int memflags)
 {
     int rc = 0;
-    unsigned int i;
+    unsigned long i;
 
     nrspin_lock(&d->page_alloc_lock);
 
@@ -2870,7 +2870,7 @@ int assign_pages(
 
 #ifndef NDEBUG
     {
-        unsigned int extra_pages = 0;
+        unsigned long extra_pages = 0;
 
         for ( i = 0; i < nr; i++ )
         {
@@ -2947,7 +2947,7 @@ int assign_pages(
 int assign_page(struct page_info *pg, unsigned int order, struct domain *d,
                 unsigned int memflags)
 {
-    return assign_pages(pg, 1U << order, d, memflags);
+    return assign_pages(pg, 1UL << order, d, memflags);
 }
 
 struct page_info *alloc_domheap_pages(
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h
index b3a35c4bc8d6..b4330269418d 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -168,7 +168,7 @@ void heap_init_late(void);
 
 int assign_pages(
     struct page_info *pg,
-    unsigned int nr,
+    unsigned long nr,
     struct domain *d,
     unsigned int memflags);
 
-- 
2.39.5




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.