Re: RFC [PATCH] x86: try to remove arch_get_ram_range

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, Keshavamurthy, Anil S <anil.s.keshavamurthy@...>, Jan Engelhardt <jengelh@...>, linux-kernel@vger.kernel.org <linux-kernel@...>
Date: Wednesday, June 18, 2008 - 12:20 pm

On Wed, Jun 18, 2008 at 8:48 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:

i cut and paste from tip...

commit a6b01b5fe51a99ecc0844a9e646819941227fd25
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date:   Mon Jun 16 20:10:55 2008 -0700

    RFC x86: try to remove arch_get_ram_range

    want to remove arch_get_ram_range, and use early_node_map instead.

    Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 67f8f6a..017ac56 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2933,10 +2933,14 @@ void __init free_bootmem_with_active_regions(int nid,
 void __init work_with_active_regions(int nid, work_fn_t work_fn, void *data)
 {
        int i;
+       int ret;

-       for_each_active_range_index_in_nid(i, nid)
-               work_fn(early_node_map[i].start_pfn, early_node_map[i].end_pfn,
-                       data);
+       for_each_active_range_index_in_nid(i, nid) {
+               ret = work_fn(early_node_map[i].start_pfn,
+                             early_node_map[i].end_pfn, data);
+               if (ret)
+                       break;
+       }
 }
 /**
  * sparse_memory_present_with_active_regions - Call memory_present
for each active range

commit e827df2898d988698e5b829009255579638a0110
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date:   Sat Jun 14 18:32:52 2008 -0700

    x86, mm: use add_highpages_with_active_regions() for high pages init v2

    use early_node_map to init high pages, so we can remove page_is_ram() and
    page_is_reserved_early() in the big loop with add_one_highpage

    also remove page_is_reserved_early(), it is not needed anymore.

    v2: fix the build of other platforms

    Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 26a028c..8548eea 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2955,6 +2955,14 @@ void __init free_bootmem_with_active_regions(int nid,
        }
 }

+void __init work_with_active_regions(int nid, work_fn_t work_fn, void *data)
+{
+       int i;
+
+       for_each_active_range_index_in_nid(i, nid)
+               work_fn(early_node_map[i].start_pfn, early_node_map[i].end_pfn,
+                       data);
+}
 /**
  * sparse_memory_present_with_active_regions - Call memory_present
for each active range
  * @nid: The node to call memory_present for. If MAX_NUMNODES, all
nodes will be used.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RFC [PATCH] x86: try to remove arch_get_ram_range, Yinghai Lu, (Mon Jun 16, 11:10 pm)
Re: RFC [PATCH] x86: try to remove arch_get_ram_range, Ingo Molnar, (Wed Jun 18, 10:07 am)
Re: RFC [PATCH] x86: try to remove arch_get_ram_range, Andrew Morton, (Wed Jun 18, 11:48 am)
Re: RFC [PATCH] x86: try to remove arch_get_ram_range, Yinghai Lu, (Wed Jun 18, 12:20 pm)