From: Badari Pulavarty <pbadari@us.ibm.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: tklein@de.ibm.com, Jeff Garzik <jeff@garzik.org>,
themann@de.ibm.com,
Hannes Hering <hannes.hering@linux.vnet.ibm.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
ossrosch@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org,
raisch@de.ibm.com, Paul Mackerras <paulus@samba.org>,
ossthema@de.ibm.com
Subject: Re: [PATCH 1/2] make walk_memory_resource available with MEMORY_HOTPLUG=n
Date: Fri, 06 Jun 2008 12:43:22 -0700 [thread overview]
Message-ID: <1212781402.23656.45.camel@badari-desktop> (raw)
In-Reply-To: <20080603223054.GC7475@localdomain>
On Tue, 2008-06-03 at 17:30 -0500, Nathan Lynch wrote:
> The ehea driver was recently changed[1] to use walk_memory_resource() to
> detect the system's memory layout. However, walk_memory_resource() is
> available only when memory hotplug is enabled. So CONFIG_EHEA was
> made to depend on MEMORY_HOTPLUG [2], but it is inappropriate for a
> network driver to have such a dependency.
>
> Make the declaration of walk_memory_resource() and its powerpc
> implementation (ehea is powerpc-specific) unconditionally available.
>
> [1] 48cfb14f8b89d4d5b3df6c16f08b258686fb12ad
> "ehea: Add DLPAR memory remove support"
>
> [2] fb7b6ca2b6b7c23b52be143bdd5f55a23b9780c8
> "ehea: Add dependency to Kconfig"
>
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
> ---
> arch/powerpc/mm/mem.c | 3 +--
> include/linux/memory_hotplug.h | 16 ++++++++--------
> 2 files changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index f67e118..51f82d8 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -151,6 +151,7 @@ out:
> return ret;
> }
> #endif /* CONFIG_MEMORY_HOTREMOVE */
> +#endif /* CONFIG_MEMORY_HOTPLUG */
>
> /*
> * walk_memory_resource() needs to make sure there is no holes in a given
> @@ -184,8 +185,6 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg,
> }
> EXPORT_SYMBOL_GPL(walk_memory_resource);
>
> -#endif /* CONFIG_MEMORY_HOTPLUG */
> -
> void show_mem(void)
> {
> unsigned long total = 0, reserved = 0;
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index 73e3586..ea9f5ad 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn,
> extern int __remove_pages(struct zone *zone, unsigned long start_pfn,
> unsigned long nr_pages);
>
> -/*
> - * Walk through all memory which is registered as resource.
> - * arg is (start_pfn, nr_pages, private_arg_pointer)
> - */
> -extern int walk_memory_resource(unsigned long start_pfn,
> - unsigned long nr_pages, void *arg,
> - int (*func)(unsigned long, unsigned long, void *));
> -
> #ifdef CONFIG_NUMA
> extern int memory_add_physaddr_to_nid(u64 start);
> #else
> @@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
>
> #endif /* ! CONFIG_MEMORY_HOTPLUG */
>
> +/*
> + * Walk through all memory which is registered as resource.
> + * arg is (start_pfn, nr_pages, private_arg_pointer)
> + */
> +extern int walk_memory_resource(unsigned long start_pfn,
> + unsigned long nr_pages, void *arg,
> + int (*func)(unsigned long, unsigned long, void *));
> +
> extern int add_memory(int nid, u64 start, u64 size);
> extern int arch_add_memory(int nid, u64 start, u64 size);
> extern int remove_memory(u64 start, u64 size);
Sorry. I couldn't get back earlier.
Acked-by: Badari Pulavarty <pbadari@us.ibm.com>
next prev parent reply other threads:[~2008-06-06 19:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 12:43 [PATCH 2/3] [2.6.26] ehea: Add dependency to Kconfig Hannes Hering
2008-05-28 16:44 ` Nathan Lynch
2008-06-03 8:07 ` Hannes Hering
2008-06-03 20:49 ` Nathan Lynch
2008-06-03 21:08 ` Badari Pulavarty
2008-06-03 21:11 ` Jeff Garzik
2008-06-03 22:30 ` [PATCH 1/2] make walk_memory_resource available with MEMORY_HOTPLUG=n Nathan Lynch
2008-06-06 19:43 ` Badari Pulavarty [this message]
2008-06-06 23:06 ` Nathan Lynch
2008-06-07 5:48 ` Paul Mackerras
2008-06-03 22:31 ` [PATCH 2/2] ehea: remove dependency on MEMORY_HOTPLUG Nathan Lynch
2008-06-03 22:42 ` Jeff Garzik
2008-06-04 5:27 ` Yasunori Goto
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=1212781402.23656.45.camel@badari-desktop \
--to=pbadari@us.ibm.com \
--cc=hannes.hering@linux.vnet.ibm.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=ntl@pobox.com \
--cc=ossrosch@linux.vnet.ibm.com \
--cc=ossthema@de.ibm.com \
--cc=paulus@samba.org \
--cc=raisch@de.ibm.com \
--cc=themann@de.ibm.com \
--cc=tklein@de.ibm.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;
as well as URLs for NNTP newsgroup(s).