linux-2.6.17.1: undefined reference to `online_page'
Subsystems (3)
In-Reply-To: <[email protected]>
Quoted 15 lines · Toralf Foerster
I got the compile error :
...
UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
mm/built-in.o: In function `online_pages':
: undefined reference to `online_page'
make: *** [.tmp_vmlinux1] Error 1with this config:
CONFIG_X86_32=y
Quoted 7 lines
CONFIG_NOHIGHMEM=y
CONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_STATIC=yCONFIG_MEMORY_HOTPLUG=y
Yes, that config is broken. mm/memory_hotplug.c::online_pages() calls online_page() but without HIGHMEM that doesn't get built and no dummy function gets defined.
Signature · 2 lines
Chuck "You can't read a newspaper if you can't read." --George W. Bush
Quoted 27 lines · On Sun, 25 Jun 2006 17:01:22 -0400 Chuck Ebbert wrote:
In-Reply-To: <[email protected]>
Quoted 15 lines · Toralf Foerster
I got the compile error :
...
UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
mm/built-in.o: In function `online_pages':
: undefined reference to `online_page'
make: *** [.tmp_vmlinux1] Error 1with this config:
CONFIG_X86_32=yQuoted 7 lines
CONFIG_NOHIGHMEM=y
CONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_STATIC=yCONFIG_MEMORY_HOTPLUG=y
Quoted 3 lines
Yes, that config is broken. mm/memory_hotplug.c::online_pages() calls
online_page()but without HIGHMEM that doesn't get built and no dummy function gets defined.
Toralf, was this from a random config file? (make randconfig)
It's certainly not just a 2.6.17.1 problem. .1 didn't change this.
---
~Randy
Quoted 27 lines
In-Reply-To: <[email protected]>
Quoted 15 lines · Toralf Foerster
I got the compile error :
...
UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
mm/built-in.o: In function `online_pages':
: undefined reference to `online_page'
make: *** [.tmp_vmlinux1] Error 1with this config:
CONFIG_X86_32=yQuoted 7 lines
CONFIG_NOHIGHMEM=y
CONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_STATIC=yCONFIG_MEMORY_HOTPLUG=y
Quoted 3 lines
Yes, that config is broken. mm/memory_hotplug.c::online_pages() calls
online_page()but without HIGHMEM that doesn't get built and no dummy function gets defined.
Toralf-san. How is this patch?
Or do you want to use memory hotplug without highmem?
Bye.
---
add_memory() for i386 add memory to highmem. So, if CONFIG_HIGHMEM is not set, CONFIG_MEMORY_HOTPLUG shouldn't be set.
--- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/Kconfig +1 -1
@@ -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
Signature · 1 line
Yasunori Goto
Quoted 15 lines · Yasunori Goto
===================================================================
--- 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 +0900mm/Kconfig +1
-1@@ -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 SoftwareSuspend"
Quoted 1 line
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.
-- Dave
Quoted 14 lines · Yasunori Goto
Quoted 13 lines
===================================================================
--- 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(quoted diff) +1
-1@@ -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)
Quoted 7 lines
Quoted 3 lines
(quoted diff) +0
-0comment "Memory hotplug is currently incompatible with SoftwareSuspend"
depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPENDI 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.
--- arch/i386/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/i386/Kconfig +1 -1
@@ -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
Signature · 1 line
Yasunori Goto
Quoted 14 lines · Dave Hansen
Quoted 12 lines · Yasunori Goto
===================================================================
--- 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 +0900mm/Kconfig +0
-0@@ -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"(quoted diff) +1
-1- depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND + depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND&& !(X86_32 && !HIGHMEM)
Quoted 8 lines
Quoted 3 lines
comment "Memory hotplug is currently incompatible with Software Suspend"
depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPENDI 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.
SPARSEMEM cirtainly isn't going to offer you anything much with this little memory. If you were going to do this I'd say it makes more sense to introduce an ARCH_DISABLE_MEMORY_HOTPLUG sort of thing and add that in the x86 Kconfig.
-apw
Quoted 24 lines
Quoted 14 lines · Dave Hansen
Quoted 12 lines · Yasunori Goto
===================================================================
--- 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(quoted diff) +0
-0@@ -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"(quoted diff) +1
-1- depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND + depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND&& !(X86_32 && !HIGHMEM)
Quoted 8 lines
Quoted 3 lines
comment "Memory hotplug is currently incompatible with Software Suspend"
depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPENDI 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.
Quoted 4 lines
SPARSEMEM cirtainly isn't going to offer you anything much with this little memory. If you were going to do this I'd say it makes more sense to introduce an
ARCH_DISABLE_MEMORY_HOTPLUGsort of thing and add that in the x86Kconfig.
Then, I think ARCH_ENABLE_MEMORY_HOTPLUG is a bit better than it. Because many architecture can't use memory hotplug yet. ARCH_ENABLE_MEMORY_HOTPLUG can say which architecture can use it and which config can use it too.
Bye.
-----
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.
In addition, many architecture can't use memory hotplug feature yet. So, I introduce CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG.
--- arch/i386/Kconfig | 3 +++ arch/ia64/Kconfig | 3 +++ arch/powerpc/Kconfig | 3 +++ arch/x86_64/Kconfig | 2 ++ mm/Kconfig | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-)
mm/Kconfig +1 -1
@@ -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 && ARCH_ENABLE_MEMORY_HOTPLUG comment "Memory hotplug is currently incompatible with Software Suspend" depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND
arch/i386/Kconfig +3 -0
@@ -762,6 +762,9 @@ config HOTPLUG_CPU enable suspend on SMP systems. CPUs can be controlled through /sys/devices/system/cpu. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + depends on HIGHMEM endmenu
arch/ia64/Kconfig +3 -0
@@ -270,6 +270,9 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config SCHED_SMT bool "SMT scheduler support" depends on SMP
arch/powerpc/Kconfig +3 -0
@@ -599,6 +599,9 @@ config HOTPLUG_CPU Say N if you are unsure. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on PPC_MULTIPLATFORM && EXPERIMENTAL
arch/x86_64/Kconfig +2 -0
@@ -369,6 +369,8 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y config HPET_TIMER bool
Signature · 1 line
Yasunori Goto
PATCH 1/1 solve config broken: undefined reference to `online_page'
Hi Andrew-san.
I made a small patch for compile error of 2.6.17(.1).
If CONFIG_HIGHMEM is not set and CONFIG_MEMORY_HOTPLUG is set on i386 box, the trouble occurs. Its trouble report is here.
http://marc.theaimsgroup.com/?t=115104987100003&r=1&w=2
At first, I wanted to send stable kernel which is 2.6.17.x. But, Documentation/stable_kernel_rules.txt says that config broken trouble is not acceptable for it. So, I would like to send this to 2.6.18-rcX.
Please apply.
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.
In addition, many architecture can't use memory hotplug feature yet. So, I introduce CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG.
--- arch/i386/Kconfig | 3 +++ arch/ia64/Kconfig | 3 +++ arch/powerpc/Kconfig | 3 +++ arch/x86_64/Kconfig | 2 ++ mm/Kconfig | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-)
mm/Kconfig +1 -1
@@ -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 && ARCH_ENABLE_MEMORY_HOTPLUG comment "Memory hotplug is currently incompatible with Software Suspend" depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND
arch/i386/Kconfig +3 -0
@@ -762,6 +762,9 @@ config HOTPLUG_CPU enable suspend on SMP systems. CPUs can be controlled through /sys/devices/system/cpu. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + depends on HIGHMEM endmenu
arch/ia64/Kconfig +3 -0
@@ -270,6 +270,9 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config SCHED_SMT bool "SMT scheduler support" depends on SMP
arch/powerpc/Kconfig +3 -0
@@ -599,6 +599,9 @@ config HOTPLUG_CPU Say N if you are unsure. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on PPC_MULTIPLATFORM && EXPERIMENTAL
arch/x86_64/Kconfig +2 -0
@@ -369,6 +369,8 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y config HPET_TIMER bool
Signature · 1 line
Yasunori Goto
Re: [PATCH] solve config broken: undefined reference to `online_page'
Quoted 7 lines · Yasunori Goto
Hi Andrew-san.
I made a small patch for compile error of 2.6.17(.1).
IfCONFIG_HIGHMEMis not set andCONFIG_MEMORY_HOTPLUGis set on i386 box, the trouble occurs. Its trouble report is here.
http://marc.theaimsgroup.com/?t=115104987100003&r=1&w=2
Quoted 6 lines
At first, I wanted to send stable kernel which is 2.6.17.x. But,
Documentation/stable_kernel_rules.txtsays that config broken trouble is not acceptable for it. So, I would like to send this to 2.6.18-rcX.Please apply.
-- Dave
Re: [PATCH] solve config broken: undefined reference to `online_page'
In reply to Yasunori GotoQuoted 9 lines · * Yasunori Goto ([email protected]) wrote:
I made a small patch for compile error of 2.6.17(.1).
IfCONFIG_HIGHMEMis not set andCONFIG_MEMORY_HOTPLUGis set on i386 box, the trouble occurs. Its trouble report is here.
http://marc.theaimsgroup.com/?t=115104987100003&r=1&w=2At first, I wanted to send stable kernel which is 2.6.17.x. But,
Documentation/stable_kernel_rules.txtsays that config broken trouble is not acceptable for it. So, I would like to send this to 2.6.18-rcX.
This is fine for stable. It fixes a compile bug. The stable kernel rules are referring to features that are marked broken (meaning 'depends on BROKEN') in Kconfig. This patch didn't quite apply to 2.6.17.2, so I fixed it up, could you double check please?
thanks,
-chris
---
Quoted 1 line
From
cc57637b0b015fb5d70dbbec740de516d33af07dMon Sep 17 00:00:00 2001
From: Yasunori Goto <[email protected]>
Subject: solve config broken: undefined reference to `online_page'
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.
In addition, many architecture can't use memory hotplug feature yet. So, I introduce CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG.
--- arch/i386/Kconfig | 3 +++ arch/ia64/Kconfig | 3 +++ arch/powerpc/Kconfig | 3 +++ arch/x86_64/Kconfig | 2 ++ mm/Kconfig | 2 +- 5 files changed, 12 insertions(+), 1 deletions(-)
arch/i386/Kconfig +3 -0
@@ -794,6 +794,9 @@ config COMPAT_VDSO endmenu +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + depends on HIGHMEM menu "Power management options (ACPI, APM)" depends on !X86_VOYAGER
arch/ia64/Kconfig +3 -0
@@ -271,6 +271,9 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config SCHED_SMT bool "SMT scheduler support" depends on SMP
arch/powerpc/Kconfig +3 -0
@@ -618,6 +618,9 @@ config HOTPLUG_CPU Say N if you are unsure. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on PPC_MULTIPLATFORM && EXPERIMENTAL
arch/x86_64/Kconfig +2 -0
@@ -370,6 +370,8 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y config HPET_TIMER bool
mm/Kconfig +1 -1
@@ -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 && ARCH_ENABLE_MEMORY_HOTPLUG depends on (IA64 || X86 || PPC64) comment "Memory hotplug is currently incompatible with Software Suspend"
Re: [PATCH] solve config broken: undefined reference to `online_page'
Quoted 3 lines · * Chris Wright ([email protected]) wrote:
This patch didn't
quite apply to 2.6.17.2, so I fixed it up, could you double check please?
Bah, the refreshed patch attached. Sorry about the noise.
thanks,
-chris
--
Quoted 1 line
From
cc57637b0b015fb5d70dbbec740de516d33af07dMon Sep 17 00:00:00 2001
From: Yasunori Goto <[email protected]>
Subject: solve config broken: undefined reference to `online_page'
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.
In addition, many architecture can't use memory hotplug feature yet. So, I introduce CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG.
--- arch/i386/Kconfig | 3 +++ arch/ia64/Kconfig | 3 +++ arch/powerpc/Kconfig | 3 +++ arch/x86_64/Kconfig | 2 ++ mm/Kconfig | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-)
arch/i386/Kconfig +3 -0
@@ -765,6 +765,9 @@ config HOTPLUG_CPU endmenu +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + depends on HIGHMEM menu "Power management options (ACPI, APM)" depends on !X86_VOYAGER
arch/ia64/Kconfig +3 -0
@@ -270,6 +270,9 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config SCHED_SMT bool "SMT scheduler support" depends on SMP
arch/powerpc/Kconfig +3 -0
@@ -599,6 +599,9 @@ config HOTPLUG_CPU Say N if you are unsure. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on PPC_MULTIPLATFORM && EXPERIMENTAL
arch/x86_64/Kconfig +2 -0
@@ -369,6 +369,8 @@ config HOTPLUG_CPU can be controlled through /sys/devices/system/cpu/cpu#. Say N if you want to disable CPU hotplug. +config ARCH_ENABLE_MEMORY_HOTPLUG + def_bool y config HPET_TIMER bool
mm/Kconfig +1 -1
@@ -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 && ARCH_ENABLE_MEMORY_HOTPLUG comment "Memory hotplug is currently incompatible with Software Suspend" depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND