From: Magnus Damm <magnus@valinux.co.jp>
From: Magnus Damm <magnus@valinux.co.jp>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Magnus Damm <magnus@valinux.co.jp>
Subject: [PATCH 06/07] i386: discontigmem on pc
Date: Fri, 30 Sep 2005 16:33:46 +0900 (JST) [thread overview]
Message-ID: <20050930073303.10631.81661.sendpatchset@cherry.local> (raw)
In-Reply-To: <20050930073232.10631.63786.sendpatchset@cherry.local>
This patch enables and fixes discontigmem support for i386.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---
arch/i386/Kconfig | 8 ++++++--
include/asm-i386/mmzone.h | 3 ++-
include/linux/mmzone.h | 5 +++++
include/linux/numa.h | 2 +-
mm/Kconfig | 2 +-
5 files changed, 15 insertions(+), 5 deletions(-)
--- from-0008/arch/i386/Kconfig
+++ to-work/arch/i386/Kconfig 2005-09-28 16:33:21.000000000 +0900
@@ -790,9 +790,13 @@ config HAVE_ARCH_ALLOC_REMAP
depends on NUMA
default y
+config ARCH_FLATMEM_ENABLE
+ def_bool y
+ depends on X86_PC
+
config ARCH_DISCONTIGMEM_ENABLE
def_bool y
- depends on NUMA
+ depends on NUMA || (X86_PC && EXPERIMENTAL)
config ARCH_DISCONTIGMEM_DEFAULT
def_bool y
@@ -812,7 +816,7 @@ source "mm/Kconfig"
config HAVE_ARCH_EARLY_PFN_TO_NID
bool
default y
- depends on NUMA
+ depends on NUMA || DISCONTIGMEM
config HIGHPTE
bool "Allocate 3rd-level pagetables from highmem"
--- from-0006/include/asm-i386/mmzone.h
+++ to-work/include/asm-i386/mmzone.h 2005-09-28 16:33:21.000000000 +0900
@@ -75,7 +75,7 @@ static inline int pfn_to_nid(unsigned lo
#endif
}
-#define node_localnr(pfn, nid) ((pfn) - node_data[nid]->node_start_pfn)
+#define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)
/*
* Following are macros that each numa implmentation must define.
@@ -106,6 +106,7 @@ static inline int pfn_to_nid(unsigned lo
({ \
unsigned long __pfn = pfn; \
int __node = pfn_to_nid(__pfn); \
+ int foo = (&foo == &__node); /* disable unused warning */ \
&NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \
})
--- from-0002/include/linux/mmzone.h
+++ to-work/include/linux/mmzone.h 2005-09-28 16:33:21.000000000 +0900
@@ -414,7 +414,12 @@ extern struct pglist_data contig_page_da
#define NODE_DATA(nid) (&contig_page_data)
#define NODE_MEM_MAP(nid) mem_map
#define MAX_NODES_SHIFT 1
+
+#ifdef CONFIG_DISCONTIGMEM
+#include <asm/mmzone.h>
+#else
#define pfn_to_nid(pfn) (0)
+#endif
#else /* CONFIG_NEED_MULTIPLE_NODES */
--- from-0001/include/linux/numa.h
+++ to-work/include/linux/numa.h 2005-09-28 16:33:21.000000000 +0900
@@ -3,7 +3,7 @@
#include <linux/config.h>
-#ifndef CONFIG_FLATMEM
+#ifdef CONFIG_NUMA
#include <asm/numnodes.h>
#endif
--- from-0002/mm/Kconfig
+++ to-work/mm/Kconfig 2005-09-28 16:33:21.000000000 +0900
@@ -84,7 +84,7 @@ config FLAT_NODE_MEM_MAP
#
config NEED_MULTIPLE_NODES
def_bool y
- depends on DISCONTIGMEM || NUMA
+ depends on NUMA
config HAVE_MEMORY_PRESENT
def_bool y
--
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>
next prev parent reply other threads:[~2005-09-30 7:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 7:33 [PATCH 00/07][RFC] i386: NUMA emulation Magnus Damm
2005-09-30 7:33 ` [PATCH 01/07] i386: srat non acpi Magnus Damm, Magnus Damm
2005-09-30 7:33 ` [PATCH 02/07] i386: numa on non-smp Magnus Damm, Magnus Damm
2005-09-30 7:33 ` [PATCH 03/07] cpuset: smp or numa Magnus Damm, Magnus Damm
2005-09-30 7:33 ` [PATCH 04/07] i386: numa warning fix Magnus Damm, Isaku Yamahata
2005-09-30 7:33 ` [PATCH 05/07] i386: sparsemem on pc Magnus Damm, Magnus Damm
2005-09-30 15:25 ` Dave Hansen
2005-10-01 0:32 ` Magnus Damm
2005-09-30 7:33 ` Magnus Damm, Magnus Damm [this message]
2005-09-30 7:33 ` [PATCH 07/07] i386: numa emulation " Magnus Damm, Isaku Yamahata
2005-09-30 18:55 ` Dave Hansen
2005-10-03 9:59 ` Magnus Damm
2005-10-03 16:16 ` Dave Hansen
2005-10-04 5:06 ` Magnus Damm
2005-10-04 7:52 ` Hirokazu Takahashi
2005-10-04 9:49 ` Magnus Damm
2005-09-30 15:23 ` [PATCH 00/07][RFC] i386: NUMA emulation Dave Hansen
2005-10-03 2:08 ` Magnus Damm
2005-10-03 7:34 ` David Lang
2005-10-03 10:02 ` Magnus Damm
2005-10-03 13:33 ` David Lang
2005-10-03 14:59 ` Martin J. Bligh
2005-10-03 15:03 ` David Lang
2005-10-03 15:08 ` Martin J. Bligh
2005-10-03 15:13 ` David Lang
2005-10-03 15:25 ` Martin J. Bligh
2005-10-03 15:32 ` David Lang
2005-10-03 15:54 ` Martin J. Bligh
2005-10-03 16:44 ` David Lang
2005-10-03 14:45 ` Martin J. Bligh
2005-10-03 14:49 ` David Lang
2005-10-03 3:21 ` Paul Jackson
2005-10-03 5:05 ` Magnus Damm
2005-10-03 5:26 ` Hirokazu Takahashi
2005-10-03 5:33 ` Paul Jackson
2005-10-03 5:59 ` Magnus Damm
2005-10-03 7:26 ` Paul Jackson
2005-10-03 5:34 ` Paul Jackson
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=20050930073303.10631.81661.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox