Skip to contentSkip to conversation

typo in i386/init.c [BugMe #6538]

PATCH In review Nishanth Aravamudan 4 participants 7 messages May 16, 2006 – May 17, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 typo in i386/init.c [BugMe #6538]

Hi Andrew,

Resending, since I haven't heard anything back yet.

Description: Fix a small typo in arch/i386/mm/init.c. Confirmed to fix BugMe #6538.

arch/i386/mm/init.c +1 -1
diff -urpN 2.6.17-rc4/arch/i386/mm/init.c 2.6.17-rc4-dev/arch/i386/mm/init.c
@@ -651,7 +651,7 @@ void __init mem_init(void)
  * Specifically, in the case of x86, we will always add
  * memory to the highmem for now.
  */
-#ifdef CONFIG_HOTPLUG_MEMORY
+#ifdef CONFIG_MEMORY_HOTPLUG
 #ifndef CONFIG_NEED_MULTIPLE_NODES
 int add_memory(u64 start, u64 size)
 {
Signature · 2 lines
Nishanth Aravamudan <[email protected]>
IBM Linux Technology Center
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Nishanth Aravamudan

Hi Andrew,

Resending, since I haven't heard anything back yet.

Description: Fix a small typo in arch/i386/mm/init.c. Confirmed to fix BugMe #6538.

I had a hunk in a patch in my tree that fixed this as part of the hot-add for i386 debugging patches. I missed that the upstream patch had this junk in it. Thanks for finding it.

-- Dave

#2 lore raw
In reply to Nishanth Aravamudan
Quoted 15 lines · Nishanth Aravamudan

Hi Andrew,

Resending, since I haven't heard anything back yet.

Description: Fix a small typo in arch/i386/mm/init.c. Confirmed to fix BugMe #6538.

diff -urpN 2.6.17-rc4/arch/i386/mm/init.c 2.6.17-rc4-dev/arch/i386/mm/init.c

arch/i386/mm/init.c void __init mem_init(void) · line 657

Quoted 8 lines
arch/i386/mm/init.c +1 -1
@@ -651,7 +651,7 @@ void __init mem_init(void)
  * Specifically, in the case of x86, we will always add
  * memory to the highmem for now.
  */
-#ifdef CONFIG_HOTPLUG_MEMORY
+#ifdef CONFIG_MEMORY_HOTPLUG
 #ifndef CONFIG_NEED_MULTIPLE_NODES
 int add_memory(u64 start, u64 size)
 {

I already have this patch queued up but I was half-wondering whether to not send it in for 2.6.17. Partly because the kernel actually links and apparently works, which is a rarity when memory hotplug is concerned.

And partly because, well, just look at the patch. It will give the kernel new global symbols add_memory() and remove_memory(). So how come it links OK at present? And how do we know that it'll link correctly with all configs once those symbols are added? If it _does_ link OK with these symbols added then they're not needed anyway.

So there's something fishy going on here.

#3 lore raw
Quoted 30 lines · Andrew Morton
Quoted 15 lines · Nishanth Aravamudan

Hi Andrew,

Resending, since I haven't heard anything back yet.

Description: Fix a small typo in arch/i386/mm/init.c. Confirmed to fix BugMe #6538.

diff -urpN 2.6.17-rc4/arch/i386/mm/init.c 2.6.17-rc4-dev/arch/i386/mm/init.c

arch/i386/mm/init.c void __init mem_init(void) · line 657

Quoted 8 lines
arch/i386/mm/init.c +1 -1
@@ -651,7 +651,7 @@ void __init mem_init(void)
  * Specifically, in the case of x86, we will always add
  * memory to the highmem for now.
  */
-#ifdef CONFIG_HOTPLUG_MEMORY
+#ifdef CONFIG_MEMORY_HOTPLUG
 #ifndef CONFIG_NEED_MULTIPLE_NODES
 int add_memory(u64 start, u64 size)
 {

I already have this patch queued up but I was half-wondering whether to not send it in for 2.6.17. Partly because the kernel actually links and apparently works, which is a rarity when memory hotplug is concerned.

Quoted 3 lines

And partly because, well, just look at the patch. It will give the kernel new global symbols add_memory() and remove_memory(). So how come it links OK at present?

BugMe #6538 (http://bugzilla.kernel.org/show_bug.cgi?id=6538) indicates that we currently fail to link with at least 1 .config currently. Toralf indicated this patch fixes the build for that particular .config.

Quoted 5 lines

And how do we know that it'll link correctly with all configs once those symbols are added? If it _does_ link OK with these symbols added then they're not needed anyway.

So there's something fishy going on here.

I won't deny that :)

Thanks,
Nish

Signature · 2 lines
Nishanth Aravamudan <[email protected]>
IBM Linux Technology Center
#6 lore raw
In reply to Andrew Morton
Quoted 3 lines · Andrew Morton

And partly because, well, just look at the patch. It will give the kernel new global symbols add_memory() and remove_memory(). So how come it links OK at present?

It links OK now with normal configurations, because nobody references add/remove_memory() unless MEMORY_HOTPLUG is enabled. The user in the bug report

	http://bugme.osdl.org/show_bug.cgi?id=6538

managed to enable sparsemem and memory hotplug. The generic hotplug code referenced those symbols, and they got a link error.

-- Dave

#4 lore raw
In reply to Nishanth Aravamudan
Quoted 3 lines · Nishanth Aravamudan
Quoted 1 line

So there's something fishy going on here.

I won't deny that :)

I think the fishiness probably comes from the apparent fact that nobody besides me ever enabled sparsemem, then memory hotplug on x86. I never caught or hit it because I never tried that config without the other patches that make "fake hotplug" work on x86.

-- Dave

#5 lore raw
Quoted 7 lines · On Tue, 16 May 2006 10:40:16 -0700 Dave Hansen <[email protected]> wrote:
Quoted 3 lines · Nishanth Aravamudan
Quoted 1 line

So there's something fishy going on here.

I won't deny that :)

I think the fishiness probably comes from the apparent fact that nobody besides me ever enabled sparsemem, then memory hotplug on x86.

I usually enable CONFIG_MEMORY_HOTPLUG + CONFIG_SPARSEMEM and test it. Then I sent a patch in past ;)

But I wonder usual x86 men will never use memory hot-add until memory hot-remove is implemented.
-Kame