All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus@valinux.co.jp>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, Magnus Damm <magnus@valinux.co.jp>
Subject: [PATCH] i386: single node SPARSEMEM fix
Date: Tue,  6 Sep 2005 12:56:34 +0900 (JST)	[thread overview]
Message-ID: <20050906035531.31603.46449.sendpatchset@cherry.local> (raw)

This patch for 2.6.13-git5 fixes single node sparsemem support. In the case
when multiple nodes are used, setup_memory() in arch/i386/mm/discontig.c calls
get_memcfg_numa() which calls memory_present(). The single node case with
setup_memory() in arch/i386/kernel/setup.c does not call memory_present()
without this patch, which breaks single node support.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
----

--- from-0006/arch/i386/Kconfig
+++ to-0007/arch/i386/Kconfig	2005-09-06 12:01:45.000000000 +0900
@@ -758,7 +758,6 @@ config NUMA
 	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
 	default n if X86_PC
 	default y if (X86_NUMAQ || X86_SUMMIT)
-	select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -797,7 +796,8 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
-	depends on NUMA
+	depends on NUMA || (X86_PC && EXPERIMENTAL)
+	select SPARSEMEM_STATIC
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
--- from-0006/arch/i386/kernel/setup.c
+++ to-0007/arch/i386/kernel/setup.c	2005-09-06 11:34:07.000000000 +0900
@@ -1127,6 +1127,9 @@ static unsigned long __init setup_memory
 	printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
 			pages_to_mb(max_low_pfn));
 
+#ifdef CONFIG_SPARSEMEM
+	memory_present(0, 0, max_pfn);
+#endif
 	setup_bootmem_allocator();
 
 	return max_low_pfn;

WARNING: multiple messages have this Message-ID (diff)
From: Magnus Damm <magnus@valinux.co.jp>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, Magnus Damm <magnus@valinux.co.jp>
Subject: [PATCH] i386: single node SPARSEMEM fix
Date: Tue,  6 Sep 2005 12:56:34 +0900 (JST)	[thread overview]
Message-ID: <20050906035531.31603.46449.sendpatchset@cherry.local> (raw)

This patch for 2.6.13-git5 fixes single node sparsemem support. In the case
when multiple nodes are used, setup_memory() in arch/i386/mm/discontig.c calls
get_memcfg_numa() which calls memory_present(). The single node case with
setup_memory() in arch/i386/kernel/setup.c does not call memory_present()
without this patch, which breaks single node support.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
----

--- from-0006/arch/i386/Kconfig
+++ to-0007/arch/i386/Kconfig	2005-09-06 12:01:45.000000000 +0900
@@ -758,7 +758,6 @@ config NUMA
 	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
 	default n if X86_PC
 	default y if (X86_NUMAQ || X86_SUMMIT)
-	select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -797,7 +796,8 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
-	depends on NUMA
+	depends on NUMA || (X86_PC && EXPERIMENTAL)
+	select SPARSEMEM_STATIC
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
--- from-0006/arch/i386/kernel/setup.c
+++ to-0007/arch/i386/kernel/setup.c	2005-09-06 11:34:07.000000000 +0900
@@ -1127,6 +1127,9 @@ static unsigned long __init setup_memory
 	printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
 			pages_to_mb(max_low_pfn));
 
+#ifdef CONFIG_SPARSEMEM
+	memory_present(0, 0, max_pfn);
+#endif
 	setup_bootmem_allocator();
 
 	return max_low_pfn;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2005-09-06  3:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06  3:56 Magnus Damm [this message]
2005-09-06  3:56 ` [PATCH] i386: single node SPARSEMEM fix Magnus Damm
2005-09-07 17:28 ` Dave Hansen
2005-09-07 17:28   ` Dave Hansen
2005-09-07 18:22   ` Martin J. Bligh
2005-09-07 18:22     ` Martin J. Bligh
2005-09-07 18:27     ` Dave Hansen
2005-09-07 18:27       ` Dave Hansen
2005-09-07 18:34       ` Martin J. Bligh
2005-09-07 18:34         ` Martin J. Bligh
2005-09-07 23:49         ` Andrew Morton
2005-09-07 23:49           ` Andrew Morton
2005-09-08  0:46           ` Dave Hansen
2005-09-08  0:46             ` Dave Hansen
2005-09-08  1:54           ` Magnus Damm
2005-09-08  1:54             ` Magnus Damm
2005-09-08  6:11           ` Martin J. Bligh
2005-09-08  6:11             ` Martin J. Bligh
2005-09-08  6:36             ` Magnus Damm
2005-09-08  6:36               ` Magnus Damm
2005-09-08  1:51       ` Magnus Damm
2005-09-08  1:51         ` Magnus Damm
2005-09-08  1:45     ` Magnus Damm
2005-09-08  1:45       ` Magnus Damm
2005-09-08  1:40   ` Magnus Damm
2005-09-08  1:40     ` Magnus Damm

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=20050906035531.31603.46449.sendpatchset@cherry.local \
    --to=magnus@valinux.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.