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

[Xen-changelog] [xen-unstable] [LINUX] Use pfn_to_page instead of relying in memory assumptions



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 8f552314e45a33fc2430a63b69d1d657ae423a89
# Parent  f95c943adbeb11126d12d2955188c1d04867d154
[LINUX] Use pfn_to_page instead of relying in memory assumptions

This makes usage agnostic wrt the memory model being used.

Signed-off-by: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/mm/init-xen.c   |    4 ++--
 linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r f95c943adbeb -r 8f552314e45a 
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Tue Nov 07 00:02:52 
2006 +0000
+++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Tue Nov 07 09:28:18 
2006 +0000
@@ -663,8 +663,8 @@ void __init mem_init(void)
        totalram_pages += free_all_bootmem();
        /* XEN: init and count low-mem pages outside initial allocation. */
        for (pfn = xen_start_info->nr_pages; pfn < max_low_pfn; pfn++) {
-               ClearPageReserved(&mem_map[pfn]);
-               set_page_count(&mem_map[pfn], 1);
+               ClearPageReserved(pfn_to_page(pfn));
+               set_page_count(pfn_to_page(pfn), 1);
                totalram_pages++;
        }
 
diff -r f95c943adbeb -r 8f552314e45a 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Tue Nov 07 00:02:52 
2006 +0000
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Tue Nov 07 09:28:18 
2006 +0000
@@ -913,8 +913,8 @@ void __init mem_init(void)
 #endif
        /* XEN: init and count pages outside initial allocation. */
        for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
-               ClearPageReserved(&mem_map[pfn]);
-               set_page_count(&mem_map[pfn], 1);
+               ClearPageReserved(pfn_to_page(pfn));
+               set_page_count(pfn_to_page(pfn), 1);
                totalram_pages++;
        }
        reservedpages = end_pfn - totalram_pages - e820_hole_size(0, end_pfn);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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