linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] vmemmap updates to V7
@ 2007-08-10 14:40 Andy Whitcroft
  2007-08-10 14:40 ` [PATCH 1/5] vmemmap: generify initialisation via helpers Andy Whitcroft
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:40 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft

Following this email are a five patches which represent the second
batch of feedback on version V5.  These represent a significant
simplification in the configuration options.  There is still the
issue of the contents of memory_model.h to deal with, will look at
that next.

The thrust of this set of changes is to standardise the architecture
interface to vmemmap at the vmemmap_populate() function.  All
architectures implementing this sparsemem variant must implement
this function.  As part of this sparsemem offers several vmemmap
related helper functions to help initialise PUD, PGD, PMD and
PTE pages.  It also offers a standard basepage initialiser.

vmemmap-generify-initialisation-via-helpers
  conversion of the main infrastructure over to a helper based
  system.  General helpers for initialising pte pages are supplied,
  plus a general helper for architectures using base pages.

vmemmap-x86_64-convert-to-new-helper-based-initialisation
vmemmap-ppc64-convert-to-new-config-options
vmemmap-sparc64-convert-to-new-config-options
vmemmap-ia64-convert-to-new-helper-based-initialisation
  conversion of each of the supported architectures to the new helper
  system.  These remain broken out in the expectation that they would
  merge with the main architecture implementations in -mm.

All against 2.6.23-rc2-mm2, in addition to the patches already there.
Again, they are split by architecture as I am assuming they will
slot into the current vmemmap stack before merging up.  They are
not bisectable otherwise.

Andrew please consider for -mm.

-apw

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/5] vmemmap: generify initialisation via helpers
  2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
@ 2007-08-10 14:40 ` Andy Whitcroft
  2007-08-10 17:56   ` Christoph Lameter
  2007-08-10 14:40 ` [PATCH 2/5] vmemmap x86_64: convert to new helper based initialisation Andy Whitcroft
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:40 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft


Convert the common vmemmap population into initialisation helpers
for use by architecture vmemmap populators.  All architecture
implementing the SPARSEMEM_VMEMMAP variant supply an architecture
specific vmemmap_populate() initialiser, which may make use of
the helpers.

This allows us to clean up and remove the initialisation Kconfig
entries.  With this patch there is a single SPARSEMEM_VMEMMAP_ENABLE
Kconfig option to indicate use of that variant.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 include/linux/mm.h  |    9 ++-
 mm/Kconfig          |   13 ++++
 mm/sparse-vmemmap.c |  159 ++++++++++++++++++++-------------------------------
 3 files changed, 83 insertions(+), 98 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bcc7daf..8a8af5a 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1147,10 +1147,15 @@ extern int randomize_va_space;
 const char * arch_vma_name(struct vm_area_struct *vma);
 
 struct page *sparse_early_mem_map_populate(unsigned long pnum, int nid);
-int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
-int vmemmap_populate_pmd(pud_t *, unsigned long, unsigned long, int);
+pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
+pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node);
+pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node);
+pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node);
 void *vmemmap_alloc_block(unsigned long size, int node);
 void vmemmap_verify(pte_t *, int, unsigned long, unsigned long);
+int vmemmap_populate_basepages(struct page *start_page,
+						unsigned long pages, int node);
+int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff --git a/mm/Kconfig b/mm/Kconfig
index 362c7a3..1f52528 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -112,6 +112,19 @@ config SPARSEMEM_EXTREME
 	def_bool y
 	depends on SPARSEMEM && !SPARSEMEM_STATIC
 
+#
+# SPARSEMEM_VMEMMAP uses a virtually mapped mem_map to optimise pfn_to_page
+# and page_to_pfn.  The most efficient option where kernel virtual space is
+# not under pressure.
+#
+config SPARSEMEM_VMEMMAP_ENABLE
+	def_bool n
+
+config SPARSEMEM_VMEMMAP
+	bool
+	depends on SPARSEMEM
+	default y if (SPARSEMEM_VMEMMAP_ENABLE)
+
 # eventually, we can have this option just 'select SPARSEMEM'
 config MEMORY_HOTPLUG
 	bool "Allow for memory hot-add"
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 7bb7a4b..4f2d485 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -14,21 +14,8 @@
  * case the overhead consists of a few additional pages that are
  * allocated to create a view of memory for vmemmap.
  *
- * Special Kconfig settings:
- *
- * CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP
- *
- * 	The architecture has its own functions to populate the memory
- * 	map and provides a vmemmap_populate function.
- *
- * CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD
- *
- * 	The architecture provides functions to populate the pmd level
- * 	of the vmemmap mappings.  Allowing mappings using large pages
- * 	where available.
- *
- * 	If neither are set then PAGE_SIZE mappings are generated which
- * 	require one PTE/TLB per PAGE_SIZE chunk of the virtual memory map.
+ * The architecture is expected to provide a vmemmap_populate() function
+ * to instantiate the mapping.
  */
 #include <linux/mm.h>
 #include <linux/mmzone.h>
@@ -60,7 +47,6 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node)
 				__pa(MAX_DMA_ADDRESS));
 }
 
-#ifndef CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP
 void __meminit vmemmap_verify(pte_t *pte, int node,
 				unsigned long start, unsigned long end)
 {
@@ -72,103 +58,84 @@ void __meminit vmemmap_verify(pte_t *pte, int node,
 			"page_structs\n", start, end - 1);
 }
 
-#ifndef CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD
-static int __meminit vmemmap_populate_pte(pmd_t *pmd, unsigned long addr,
-					unsigned long end, int node)
+pte_t * __meminit vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node)
 {
-	pte_t *pte;
-
-	for (pte = pte_offset_kernel(pmd, addr); addr < end;
-						pte++, addr += PAGE_SIZE)
-		if (pte_none(*pte)) {
-			pte_t entry;
-			void *p = vmemmap_alloc_block(PAGE_SIZE, node);
-			if (!p)
-				return -ENOMEM;
-
-			entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
-			set_pte(pte, entry);
-
-		} else
-			vmemmap_verify(pte, node, addr + PAGE_SIZE, end);
-
-	return 0;
+	pte_t *pte = pte_offset_kernel(pmd, addr);
+	if (pte_none(*pte)) {
+		pte_t entry;
+		void *p = vmemmap_alloc_block(PAGE_SIZE, node);
+		if (!p)
+			return 0;
+		entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
+		set_pte_at(&init_mm, addr, pte, entry);
+	}
+	return pte;
 }
 
-int __meminit vmemmap_populate_pmd(pud_t *pud, unsigned long addr,
-						unsigned long end, int node)
+pmd_t * __meminit vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node)
 {
-	pmd_t *pmd;
-	int error = 0;
-	unsigned long next;
-
-	for (pmd = pmd_offset(pud, addr); addr < end && !error;
-						pmd++, addr = next) {
-		if (pmd_none(*pmd)) {
-			void *p = vmemmap_alloc_block(PAGE_SIZE, node);
-			if (!p)
-				return -ENOMEM;
-
-			pmd_populate_kernel(&init_mm, pmd, p);
-		} else
-			vmemmap_verify((pte_t *)pmd, node,
-					pmd_addr_end(addr, end), end);
-		next = pmd_addr_end(addr, end);
-		error = vmemmap_populate_pte(pmd, addr, next, node);
+	pmd_t *pmd = pmd_offset(pud, addr);
+	if (pmd_none(*pmd)) {
+		void *p = vmemmap_alloc_block(PAGE_SIZE, node);
+		if (!p)
+			return 0;
+		pmd_populate_kernel(&init_mm, pmd, p);
 	}
-	return error;
+	return pmd;
 }
-#endif /* CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD */
 
-static int __meminit vmemmap_populate_pud(pgd_t *pgd, unsigned long addr,
-						unsigned long end, int node)
+pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
 {
-	pud_t *pud;
-	int error = 0;
-	unsigned long next;
-
-	for (pud = pud_offset(pgd, addr); addr < end && !error;
-						pud++, addr = next) {
-		if (pud_none(*pud)) {
-			void *p = vmemmap_alloc_block(PAGE_SIZE, node);
-			if (!p)
-				return -ENOMEM;
+	pud_t *pud = pud_offset(pgd, addr);
+	if (pud_none(*pud)) {
+		void *p = vmemmap_alloc_block(PAGE_SIZE, node);
+		if (!p)
+			return 0;
+		pud_populate(&init_mm, pud, p);
+	}
+	return pud;
+}
 
-			pud_populate(&init_mm, pud, p);
-		}
-		next = pud_addr_end(addr, end);
-		error = vmemmap_populate_pmd(pud, addr, next, node);
+pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
+{
+	pgd_t *pgd = pgd_offset_k(addr);
+	if (pgd_none(*pgd)) {
+		void *p = vmemmap_alloc_block(PAGE_SIZE, node);
+		if (!p)
+			return 0;
+		pgd_populate(&init_mm, pgd, p);
 	}
-	return error;
+	return pgd;
 }
 
-int __meminit vmemmap_populate(struct page *start_page,
-						unsigned long nr, int node)
+int __meminit vmemmap_populate_basepages(struct page *start_page,
+						unsigned long size, int node)
 {
-	pgd_t *pgd;
 	unsigned long addr = (unsigned long)start_page;
-	unsigned long end = (unsigned long)(start_page + nr);
-	unsigned long next;
-	int error = 0;
-
-	printk(KERN_DEBUG "[%lx-%lx] Virtual memory section"
-		" (%ld pages) node %d\n", addr, end - 1, nr, node);
-
-	for (pgd = pgd_offset_k(addr); addr < end && !error;
-					pgd++, addr = next) {
-		if (pgd_none(*pgd)) {
-			void *p = vmemmap_alloc_block(PAGE_SIZE, node);
-			if (!p)
-				return -ENOMEM;
+	unsigned long end = (unsigned long)(start_page + size);
+	pgd_t *pgd;
+	pud_t *pud;
+	pmd_t *pmd;
+	pte_t *pte;
 
-			pgd_populate(&init_mm, pgd, p);
-		}
-		next = pgd_addr_end(addr,end);
-		error = vmemmap_populate_pud(pgd, addr, next, node);
+	for (; addr < end; addr += PAGE_SIZE) {
+		pgd = vmemmap_pgd_populate(addr, node);
+		if (!pgd)
+			return -ENOMEM;
+		pud = vmemmap_pud_populate(pgd, addr, node);
+		if (!pud)
+			return -ENOMEM;
+		pmd = vmemmap_pmd_populate(pud, addr, node);
+		if (!pmd)
+			return -ENOMEM;
+		pte = vmemmap_pte_populate(pmd, addr, node);
+		if (!pte)
+			return -ENOMEM;
+		vmemmap_verify(pte, node, addr, addr + PAGE_SIZE);
 	}
-	return error;
+
+	return 0;
 }
-#endif /* !CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP */
 
 struct page __init *sparse_early_mem_map_populate(unsigned long pnum, int nid)
 {

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/5] vmemmap x86_64: convert to new helper based initialisation
  2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
  2007-08-10 14:40 ` [PATCH 1/5] vmemmap: generify initialisation via helpers Andy Whitcroft
@ 2007-08-10 14:40 ` Andy Whitcroft
  2007-08-10 14:41 ` [PATCH 3/5] vmemmap ppc64: convert to new config options Andy Whitcroft
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:40 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft


Convert over to the new helper initialialisation and Kconfig options.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/x86_64/Kconfig   |    9 +--------
 arch/x86_64/mm/init.c |   26 ++++++++++++++++++++------
 2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 9ad7ab4..79a3e3c 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -405,14 +405,7 @@ config ARCH_DISCONTIGMEM_DEFAULT
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
 	depends on (NUMA || EXPERIMENTAL)
-
-config SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM
-
-config ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD
-	def_bool y
-	depends on SPARSEMEM_VMEMMAP
+	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_MEMORY_PROBE
 	def_bool y
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 5d1ed03..5ac3d76 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -784,18 +784,31 @@ const char *arch_vma_name(struct vm_area_struct *vma)
 	return NULL;
 }
 
-#ifdef CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP_PMD
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 /*
  * Initialise the sparsemem vmemmap using huge-pages at the PMD level.
  */
-int __meminit vmemmap_populate_pmd(pud_t *pud, unsigned long addr,
-						unsigned long end, int node)
+int __meminit vmemmap_populate(struct page *start_page,
+						unsigned long size, int node)
 {
-	pmd_t *pmd;
+	unsigned long addr = (unsigned long)start_page;
+	unsigned long end = (unsigned long)(start_page + size);
 	unsigned long next;
+	pgd_t *pgd;
+	pud_t *pud;
+	pmd_t *pmd;
 
-	for (pmd = pmd_offset(pud, addr); addr < end; pmd++, addr = next) {
+	for (; addr < end; addr = next) {
 		next = pmd_addr_end(addr, end);
+
+		pgd = vmemmap_pgd_populate(addr, node);
+		if (!pgd)
+			return -ENOMEM;
+		pud = vmemmap_pud_populate(pgd, addr, node);
+		if (!pud)
+			return -ENOMEM;
+
+		pmd = pmd_offset(pud, addr);
 		if (pmd_none(*pmd)) {
 			pte_t entry;
 			void *p = vmemmap_alloc_block(PMD_SIZE, node);
@@ -809,8 +822,9 @@ int __meminit vmemmap_populate_pmd(pud_t *pud, unsigned long addr,
 			printk(KERN_DEBUG " [%lx-%lx] PMD ->%p on node %d\n",
 				addr, addr + PMD_SIZE - 1, p, node);
 		} else
-			vmemmap_verify((pte_t *)pmd, node, next, end);
+			vmemmap_verify((pte_t *)pmd, node, addr, next);
 	}
+
 	return 0;
 }
 #endif

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/5] vmemmap ppc64: convert to new config options
  2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
  2007-08-10 14:40 ` [PATCH 1/5] vmemmap: generify initialisation via helpers Andy Whitcroft
  2007-08-10 14:40 ` [PATCH 2/5] vmemmap x86_64: convert to new helper based initialisation Andy Whitcroft
@ 2007-08-10 14:41 ` Andy Whitcroft
  2007-08-10 14:41 ` [PATCH 4/5] vmemmap sparc64: " Andy Whitcroft
  2007-08-10 14:41 ` [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation Andy Whitcroft
  4 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:41 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft


Convert over to the new Kconfig options.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/powerpc/Kconfig      |    9 +--------
 arch/powerpc/mm/init_64.c |    3 +--
 2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index f5124cf..111bc25 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -265,6 +265,7 @@ config ARCH_FLATMEM_ENABLE
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
 	depends on PPC64
+	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_SPARSEMEM_DEFAULT
 	def_bool y
@@ -275,14 +276,6 @@ config ARCH_POPULATES_NODE_MAP
 
 source "mm/Kconfig"
 
-config SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM
-
-config ARCH_POPULATES_SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM_VMEMMAP
-
 config ARCH_MEMORY_PROBE
 	def_bool y
 	depends on MEMORY_HOTPLUG
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 05c7e93..4f543f8 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -182,8 +182,7 @@ void pgtable_cache_init(void)
 	}
 }
 
-#ifdef CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP
-
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 /*
  * Given an address within the vmemmap, determine the pfn of the page that
  * represents the start of the section it is within.  Note that we have to

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/5] vmemmap sparc64: convert to new config options
  2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
                   ` (2 preceding siblings ...)
  2007-08-10 14:41 ` [PATCH 3/5] vmemmap ppc64: convert to new config options Andy Whitcroft
@ 2007-08-10 14:41 ` Andy Whitcroft
  2007-08-10 14:41 ` [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation Andy Whitcroft
  4 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:41 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft


Convert over to the new Kconfig options.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/sparc64/Kconfig   |    9 +--------
 arch/sparc64/mm/init.c |    4 ++--
 2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 9953b4e..59c4d75 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -240,20 +240,13 @@ config ARCH_SELECT_MEMORY_MODEL
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
+	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_SPARSEMEM_DEFAULT
 	def_bool y
 
 source "mm/Kconfig"
 
-config SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM
-
-config ARCH_POPULATES_SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM_VMEMMAP
-
 config ISA
 	bool
 	help
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 19cac53..4e1df9a 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1655,7 +1655,7 @@ EXPORT_SYMBOL(_PAGE_E);
 unsigned long _PAGE_CACHE __read_mostly;
 EXPORT_SYMBOL(_PAGE_CACHE);
 
-#ifdef CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
 
 #define VMEMMAP_CHUNK_SHIFT	22
 #define VMEMMAP_CHUNK		(1UL << VMEMMAP_CHUNK_SHIFT)
@@ -1705,7 +1705,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
 	}
 	return 0;
 }
-#endif /* CONFIG_ARCH_POPULATES_SPARSEMEM_VMEMMAP */
+#endif /* CONFIG_SPARSEMEM_VMEMMAP */
 
 static void prot_init_common(unsigned long page_none,
 			     unsigned long page_shared,

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation
  2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
                   ` (3 preceding siblings ...)
  2007-08-10 14:41 ` [PATCH 4/5] vmemmap sparc64: " Andy Whitcroft
@ 2007-08-10 14:41 ` Andy Whitcroft
  2007-08-10 18:01   ` Christoph Lameter
  4 siblings, 1 reply; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-10 14:41 UTC (permalink / raw)
  To: Andrew Morton, Christoph Hellwig
  Cc: linux-mm, linux-arch, Nick Piggin, Christoph Lameter, Mel Gorman,
	Andy Whitcroft


Convert over to the new helper initialialisation and Kconfig options.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
 arch/ia64/Kconfig        |    5 +----
 arch/ia64/mm/discontig.c |    8 ++++++++
 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 92d2c2d..66fafbd 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -363,10 +363,7 @@ config ARCH_FLATMEM_ENABLE
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
 	depends on ARCH_DISCONTIGMEM_ENABLE
-
-config SPARSEMEM_VMEMMAP
-	def_bool y
-	depends on SPARSEMEM
+	select SPARSEMEM_VMEMMAP_ENABLE
 
 config ARCH_DISCONTIGMEM_DEFAULT
 	def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 8a5c1c9..05b374c 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -715,3 +715,11 @@ void arch_refresh_nodedata(int update_node, pg_data_t *update_pgdat)
 	scatter_node_data();
 }
 #endif
+
+#ifdef CONFIG_SPARSEMEM_VMEMMAP
+int __meminit vmemmap_populate(struct page *start_page,
+						unsigned long size, int node)
+{
+	return vmemmap_populate_basepages(start_page, size, node);
+}
+#endif

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/5] vmemmap: generify initialisation via helpers
  2007-08-10 14:40 ` [PATCH 1/5] vmemmap: generify initialisation via helpers Andy Whitcroft
@ 2007-08-10 17:56   ` Christoph Lameter
  2007-08-15 14:54     ` Andy Whitcroft
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Lameter @ 2007-08-10 17:56 UTC (permalink / raw)
  To: Andy Whitcroft
  Cc: Andrew Morton, Christoph Hellwig, linux-mm, linux-arch,
	Nick Piggin, Mel Gorman

That exports a series of new function. The function are always compiled in 
even if not needed right?

Acked-by: Christoph Lameter <clameter@sgi.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation
  2007-08-10 14:41 ` [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation Andy Whitcroft
@ 2007-08-10 18:01   ` Christoph Lameter
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Lameter @ 2007-08-10 18:01 UTC (permalink / raw)
  To: Andy Whitcroft
  Cc: Andrew Morton, Christoph Hellwig, linux-mm, linux-arch,
	Nick Piggin, Mel Gorman

Acked-by: Christoph Lameter <clameter@sgi.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/5] vmemmap: generify initialisation via helpers
  2007-08-10 17:56   ` Christoph Lameter
@ 2007-08-15 14:54     ` Andy Whitcroft
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2007-08-15 14:54 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Andrew Morton, Christoph Hellwig, linux-mm, linux-arch,
	Nick Piggin, Mel Gorman

Christoph Lameter wrote:
> That exports a series of new function. The function are always compiled in 
> even if not needed right?
> 
> Acked-by: Christoph Lameter <clameter@sgi.com>

Yes.  We are assuming the compiler is going to help us out.  They are
mostly trivial and all __meminit.

-apw

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-08-15 14:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 14:40 [PATCH 0/5] vmemmap updates to V7 Andy Whitcroft
2007-08-10 14:40 ` [PATCH 1/5] vmemmap: generify initialisation via helpers Andy Whitcroft
2007-08-10 17:56   ` Christoph Lameter
2007-08-15 14:54     ` Andy Whitcroft
2007-08-10 14:40 ` [PATCH 2/5] vmemmap x86_64: convert to new helper based initialisation Andy Whitcroft
2007-08-10 14:41 ` [PATCH 3/5] vmemmap ppc64: convert to new config options Andy Whitcroft
2007-08-10 14:41 ` [PATCH 4/5] vmemmap sparc64: " Andy Whitcroft
2007-08-10 14:41 ` [PATCH 5/5] vmemmap ia64: convert to new helper based initialisation Andy Whitcroft
2007-08-10 18:01   ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).