Re: linux-2.6.17.1: undefined reference to `online_page'

From: Yasunori Goto
Date: Tue Jun 27 2006 - 07:55:20 EST


> On Mon, 2006-06-26 at 16:39 +0900, Yasunori Goto wrote:
> >
> > ===================================================================
> > --- linux-2.6.17.orig/mm/Kconfig 2006-06-26 14:19:11.000000000
> > +0900
> > +++ linux-2.6.17/mm/Kconfig 2006-06-26 14:19:53.000000000 +0900
> > @@ -115,7 +115,7 @@ config SPARSEMEM_EXTREME
> > # eventually, we can have this option just 'select SPARSEMEM'
> > config MEMORY_HOTPLUG
> > bool "Allow for memory hot-add"
> > - depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND
> > + depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND
> > && !(X86_32 && !HIGHMEM)
> >
> > comment "Memory hotplug is currently incompatible with Software
> > Suspend"
> > depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND
>
> I think it makes a lot more sense to just disable sparsemem when !
> HIGHMEM. Plus, we can do all of that in the arch-specific Kconfigs and
> not litter the generic ones with this stuff.

Ah, Ok.
I changed this patch as you said.

At first, I thought it might not be good that config memory hotplug was
disabled by config sparsemem. Because, they are not strictly the same.
But, this is reasonable way for 2.6.17.x. It is less impact, anyway.

Thanks.

------

Memory hotplug code of i386 adds memory to only highmem.
So, if CONFIG_HIGHMEM is not set, CONFIG_MEMORY_HOTPLUG shouldn't be
set. Otherwise, it causes compile error.

But, CONFIG_MEMORY_HOTPLUG is defined mm/Kconfig. So, if it is disabled
on its file when arch is i386 and highmem is not set,
it may be a bit intrusive.

When CONFIG_SPARSEMEM is not set, its config option is not set too.
CONFIG_ARCH_SPARSEMEM_ENABLE is defined in arch/i386/Kconfig.
Disabling it is not intrusive for other archtecture.

This is patch for it.


Signed-off-by: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>

---
arch/i386/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.17/arch/i386/Kconfig
===================================================================
--- linux-2.6.17.orig/arch/i386/Kconfig 2006-06-27 19:33:39.000000000 +0900
+++ linux-2.6.17/arch/i386/Kconfig 2006-06-27 19:38:53.000000000 +0900
@@ -562,7 +562,7 @@ config ARCH_DISCONTIGMEM_DEFAULT

config ARCH_SPARSEMEM_ENABLE
def_bool y
- depends on (NUMA || (X86_PC && EXPERIMENTAL))
+ depends on (NUMA || (X86_PC && EXPERIMENTAL)) && HIGHMEM
select SPARSEMEM_STATIC

config ARCH_SELECT_MEMORY_MODEL

--
Yasunori Goto


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/