Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbYFCIIG (ORCPT ); Tue, 3 Jun 2008 04:08:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751697AbYFCIHu (ORCPT ); Tue, 3 Jun 2008 04:07:50 -0400 Received: from mtagate3.uk.ibm.com ([195.212.29.136]:37935 "EHLO mtagate3.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637AbYFCIHr (ORCPT ); Tue, 3 Jun 2008 04:07:47 -0400 From: Hannes Hering Organization: IBM To: Nathan Lynch Subject: Re: [PATCH 2/3] [2.6.26] ehea: Add dependency to Kconfig Date: Tue, 3 Jun 2008 10:07:39 +0200 User-Agent: KMail/1.9.9 Cc: jeff@garzik.org, tklein@de.ibm.com, themann@de.ibm.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, raisch@de.ibm.com, ossrosch@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org, ossthema@de.ibm.com References: <200805071443.20192.hannes.hering@linux.vnet.ibm.com> <20080528164405.GA4836@localdomain> In-Reply-To: <20080528164405.GA4836@localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806031007.40162.hannes.hering@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4876 Lines: 137 Hi Nathan, I agree that the ehea cannot be built without MEMORY_HOTPLUG. The problem is the fact that the ppc walk_memory_resource declaration is in the scope of MEMORY_HOTPLUG. At the moment I don't have complete overview if the move of the code as you propose in your patch has any side effects. We probably need to talk to Badari who provided the walk_memory_resource code. We can also just throw it onto one of our boxes to see what happens. ;) Regards Hannes On Wednesday 28 May 2008 18:44:05 Nathan Lynch wrote: > Hello, > > Hannes Hering wrote: > > The new ehea memory hot plug implementation depends on MEMORY_HOTPLUG. > > > > Signed-off-by: Hannes Hering > > --- > > > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > > index f90a86b..181cd86 100644 > > --- a/drivers/net/Kconfig > > +++ b/drivers/net/Kconfig > > @@ -2440,7 +2440,7 @@ config CHELSIO_T3 > > > > config EHEA > > tristate "eHEA Ethernet support" > > - depends on IBMEBUS && INET && SPARSEMEM > > + depends on IBMEBUS && INET && SPARSEMEM && MEMORY_HOTPLUG > > select INET_LRO > > ---help--- > > This driver supports the IBM pSeries eHEA ethernet adapter. > > I disagree with this change. > > It makes it impossible to build the ehea driver without memory hotplug > enabled. Presumably, this commit was intended to work around a build > break of this sort (with EHEA=m and MEMORY_HOTPLUG=n): > > drivers/net/ehea/ehea_qmr.c: In function 'ehea_create_busmap': > drivers/net/ehea/ehea_qmr.c:635: error: implicit declaration of function 'walk_memory_resource' > > (some indication of this should have been in the commit message, btw) > > I think this was the wrong way to fix the issue. EHEA=m and > MEMORY_HOTPLUG=n is a valid configuration for machines I test. > > Any thoughts on the following, which makes walk_memory_resource() > available regardless of MEMORY_HOTPLUG's setting? I've tested it on a > JS22 (Power6 blade). > > --- > > arch/powerpc/mm/mem.c | 3 +-- > drivers/net/Kconfig | 2 +- > include/linux/memory_hotplug.h | 16 ++++++++-------- > 3 files changed, 10 insertions(+), 11 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/drivers/net/Kconfig b/drivers/net/Kconfig > index dd0ec9e..f4182cf 100644 > --- a/drivers/net/Kconfig > +++ b/drivers/net/Kconfig > @@ -2426,7 +2426,7 @@ config CHELSIO_T3 > > config EHEA > tristate "eHEA Ethernet support" > - depends on IBMEBUS && INET && SPARSEMEM && MEMORY_HOTPLUG > + depends on IBMEBUS && INET && SPARSEMEM > select INET_LRO > ---help--- > This driver supports the IBM pSeries eHEA ethernet adapter. > 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); > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/