Messages in this thread Patches in this message | | | Date | Wed, 18 Jun 2008 09:20:53 -0700 | From | "Yinghai Lu" <> | Subject | Re: RFC [PATCH] x86: try to remove arch_get_ram_range |
| |
On Wed, Jun 18, 2008 at 8:48 AM, Andrew Morton <akpm@linux-foundation.org> wrote: > On Wed, 18 Jun 2008 16:07:26 +0200 Ingo Molnar <mingo@elte.hu> wrote: > >> >> * Yinghai Lu <yhlu.kernel@gmail.com> wrote: >> >> > want to remove arch_get_ram_range, and use early_node_map instead. >> >> (small request: please include diffstat output in your patches in the >> future if possible: "quilt refresh --diffstat" will do that - this way >> people will know why they were Cc:-ed) >> >> this touches the MM: >> >> arch/x86/mm/init_32.c | 6 +++-- >> drivers/pci/intel-iommu.c | 51 +++++++++++++++++++++++++++++++++------------- >> include/linux/mm.h | 2 - >> mm/page_alloc.c | 10 ++++++--- >> 4 files changed, 49 insertions(+), 20 deletions(-) >> >> but has many dependencies on ongoing arch/x86 work. Andrew, is this >> change fine with with you? >> > > Beats me - I don't even have a mm/page_alloc.c:work_with_active_regions() > in my tree. >
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.
| |