lkml.org 
[lkml]   [2012]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH V6 14/19] memory-hotplug: move register_page_bootmem_info_node and put_page_bootmem for sparse-vmemmap
    Date
    From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>

    For implementing register_page_bootmem_info_node of sparse-vmemmap,
    register_page_bootmem_info_node and put_page_bootmem are moved to
    memory_hotplug.c

    CC: David Rientjes <rientjes@google.com>
    CC: Jiang Liu <liuj97@gmail.com>
    CC: Len Brown <len.brown@intel.com>
    CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    CC: Paul Mackerras <paulus@samba.org>
    CC: Christoph Lameter <cl@linux.com>
    Cc: Minchan Kim <minchan.kim@gmail.com>
    CC: Andrew Morton <akpm@linux-foundation.org>
    CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    CC: Wen Congyang <wency@cn.fujitsu.com>
    Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
    ---
    include/linux/memory_hotplug.h | 9 ---------
    mm/memory_hotplug.c | 8 ++++++--
    2 files changed, 6 insertions(+), 11 deletions(-)

    diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
    index cdbbd79..1133e63 100644
    --- a/include/linux/memory_hotplug.h
    +++ b/include/linux/memory_hotplug.h
    @@ -162,17 +162,8 @@ static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
    #endif /* CONFIG_NUMA */
    #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */

    -#ifdef CONFIG_SPARSEMEM_VMEMMAP
    -static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
    -{
    -}
    -static inline void put_page_bootmem(struct page *page)
    -{
    -}
    -#else
    extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
    extern void put_page_bootmem(struct page *page);
    -#endif

    /*
    * Lock for memory hotplug guarantees 1) all callbacks for memory hotplug
    diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
    index 710e593..3a264a5 100644
    --- a/mm/memory_hotplug.c
    +++ b/mm/memory_hotplug.c
    @@ -91,7 +91,6 @@ static void release_memory_resource(struct resource *res)
    }

    #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
    -#ifndef CONFIG_SPARSEMEM_VMEMMAP
    static void get_page_bootmem(unsigned long info, struct page *page,
    unsigned long type)
    {
    @@ -127,6 +126,7 @@ void __ref put_page_bootmem(struct page *page)

    }

    +#ifndef CONFIG_SPARSEMEM_VMEMMAP
    static void register_page_bootmem_info_section(unsigned long start_pfn)
    {
    unsigned long *usemap, mapsize, section_nr, i;
    @@ -163,6 +163,11 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
    get_page_bootmem(section_nr, page, MIX_SECTION_INFO);

    }
    +#else
    +static inline void register_page_bootmem_info_section(unsigned long start_pfn)
    +{
    +}
    +#endif

    void register_page_bootmem_info_node(struct pglist_data *pgdat)
    {
    @@ -198,7 +203,6 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
    register_page_bootmem_info_section(pfn);

    }
    -#endif /* !CONFIG_SPARSEMEM_VMEMMAP */

    static void grow_zone_span(struct zone *zone, unsigned long start_pfn,
    unsigned long end_pfn)
    --
    1.7.1


    \
     
     \ /
      Last update: 2012-08-03 10:41    [W:4.149 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site