Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2826fa61c13716816c7ae658b8f1c5a4a505d8ac
Commit:     2826fa61c13716816c7ae658b8f1c5a4a505d8ac
Parent:     d22d9b3a1d129349518c807e7997922f869e1f48
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 1 17:04:36 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Fri Jun 8 02:43:45 2007 +0000

    sh: Mark sparsemem regions present earlier.
    
    We have to call in to sparse_memory_present_with_active_regions()
    earlier in order for sparsemem to be happy. This was being called
    too late, and was causing troubles with the platforms that needed
    to enable sparsemem.
    
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/kernel/setup.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 3241a62..c2c6bfd 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -116,7 +116,7 @@ static void __init register_bootmem_low_pages(void)
        free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages));
 }
 
-void __init setup_bootmem_allocator(unsigned long start_pfn)
+void __init setup_bootmem_allocator(unsigned long free_pfn)
 {
        unsigned long bootmap_size;
 
@@ -125,7 +125,7 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
         * bootstrap step all allocations (until the page allocator
         * is intact) must be done via bootmem_alloc().
         */
-       bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
+       bootmap_size = init_bootmem_node(NODE_DATA(0), free_pfn,
                                         min_low_pfn, max_low_pfn);
 
        add_active_range(0, min_low_pfn, max_low_pfn);
@@ -141,7 +141,7 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
         * an invalid RAM area.
         */
        reserve_bootmem(__MEMORY_START+PAGE_SIZE,
-               (PFN_PHYS(start_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START);
+               (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START);
 
        /*
         * reserve physical page 0 - it's a special BIOS page on many boxes,
@@ -149,6 +149,8 @@ void __init setup_bootmem_allocator(unsigned long start_pfn)
         */
        reserve_bootmem(__MEMORY_START, PAGE_SIZE);
 
+       sparse_memory_present_with_active_regions(0);
+
 #ifdef CONFIG_BLK_DEV_INITRD
        ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
        if (&__rd_start != &__rd_end) {
@@ -193,7 +195,6 @@ static void __init setup_memory(void)
         */
        start_pfn = PFN_UP(__pa(_end));
        setup_bootmem_allocator(start_pfn);
-       sparse_memory_present_with_active_regions(0);
 }
 #else
 extern void __init setup_memory(void);
-
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