From: Lin Feng <linfeng@cn.fujitsu.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tang Chen <tangchen@cn.fujitsu.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Jianguo Wu <wujianguo@huawei.com>,
Wen Congyang <wency@cn.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Jiang Liu <jiang.liu@huawei.com>,
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: mmots: memory-hotplug-remove-memmap-of-sparse-vmemmap.patch compile fix
Date: Fri, 11 Jan 2013 20:06:41 +0800 [thread overview]
Message-ID: <50F00051.4070509@cn.fujitsu.com> (raw)
In-Reply-To: <20130111095348.GB7286@dhcp22.suse.cz>
It looks fine to me.
Tested-by: Lin Feng <linfeng@cn.fujitsu.com>
On 01/11/2013 05:53 PM, Michal Hocko wrote:
> Defconfig for x86_64 complains:
> arch/x86/mm/init_64.c: In function ‘vmemmap_free’:
> arch/x86/mm/init_64.c:1317: error: implicit declaration of function ‘remove_pagetable’
>
> vmemmap_free is only used for CONFIG_MEMORY_HOTPLUG so let's move it
> inside ifdef
>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
> ---
> arch/x86/mm/init_64.c | 16 ++++++++--------
> include/linux/mm.h | 2 ++
> 2 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 9920ffc..ddd3b58 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -981,6 +981,14 @@ remove_pagetable(unsigned long start, unsigned long end, bool direct)
> flush_tlb_all();
> }
>
> +void __ref vmemmap_free(struct page *memmap, unsigned long nr_pages)
> +{
> + unsigned long start = (unsigned long)memmap;
> + unsigned long end = (unsigned long)(memmap + nr_pages);
> +
> + remove_pagetable(start, end, false);
> +}
> +
> static void __meminit
> kernel_physical_mapping_remove(unsigned long start, unsigned long end)
> {
> @@ -1309,14 +1317,6 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node)
> return 0;
> }
>
> -void __ref vmemmap_free(struct page *memmap, unsigned long nr_pages)
> -{
> - unsigned long start = (unsigned long)memmap;
> - unsigned long end = (unsigned long)(memmap + nr_pages);
> -
> - remove_pagetable(start, end, false);
> -}
> -
> void register_page_bootmem_memmap(unsigned long section_nr,
> struct page *start_page, unsigned long size)
> {
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 0d880df..7c57bd0 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1721,7 +1721,9 @@ int vmemmap_populate_basepages(struct page *start_page,
> unsigned long pages, int node);
> int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
> void vmemmap_populate_print_last(void);
> +#ifdef CONFIG_MEMORY_HOTPLUG
> void vmemmap_free(struct page *memmap, unsigned long nr_pages);
> +#endif
> void register_page_bootmem_memmap(unsigned long section_nr, struct page *map,
> unsigned long size);
>
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2013-01-11 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 9:53 Michal Hocko
2013-01-11 12:06 ` Lin Feng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F00051.4070509@cn.fujitsu.com \
--to=linfeng@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=mingo@elte.hu \
--cc=tangchen@cn.fujitsu.com \
--cc=tglx@linutronix.de \
--cc=wency@cn.fujitsu.com \
--cc=wujianguo@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox