Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=204ecae4e10c235e6987cb7b2809a665511ab174
Commit:     204ecae4e10c235e6987cb7b2809a665511ab174
Parent:     30f0e0f4153918a22d802b415980974514139389
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 16 14:01:47 2007 +0000
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Wed Jan 24 11:59:56 2007 +0000

    [ARM] Fix show_mem() for discontigmem
    
    show_mem() was assuming incorrectly that the mem_map for any
    node started at PFN 0.  This is obviously wrong; fix it to
    take account of node_start_pfn.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mm/init.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b5814b4..7760193 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -52,15 +52,18 @@ void show_mem(void)
        printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
        for_each_online_node(node) {
+               pg_data_t *n = NODE_DATA(node);
+               struct page *map = n->node_mem_map - n->node_start_pfn;
+
                for_each_nodebank (i,mi,node) {
                        unsigned int pfn1, pfn2;
                        struct page *page, *end;
 
-                       pfn1 = mi->bank[i].start >> PAGE_SHIFT;
-                       pfn2 = (mi->bank[i].size + mi->bank[i].start) >> 
PAGE_SHIFT;
+                       pfn1 = __phys_to_pfn(mi->bank[i].start);
+                       pfn2 = __phys_to_pfn(mi->bank[i].size + 
mi->bank[i].start);
 
-                       page = NODE_MEM_MAP(node) + pfn1;
-                       end  = NODE_MEM_MAP(node) + pfn2;
+                       page = map + pfn1;
+                       end  = map + pfn2;
 
                        do {
                                total++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to