[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1181077908.9503.48.camel@dyn9047017100.beaverton.ibm.com>
Date: Tue, 05 Jun 2007 14:11:48 -0700
From: Badari Pulavarty <pbadari@...ibm.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.22-rc4
On Mon, 2007-06-04 at 20:50 -0700, Linus Torvalds wrote:
> So -rc4 is out there now, hopefully shrinking the regression list further.
>
Nothing serious, compile warnings ..
mm/sparse.c:244: warning: `__kmalloc_section_memmap' defined but not used
mm/sparse.c:274: warning: `__kfree_section_memmap' defined but not used
Here is the patch.
Thanks,
Badari
__kmalloc_section_memmap(), vaddr_in_vmalloc_area() and
__kfree_section_memmap() are used only for MEMORY_HOTPLUG.
Moved them under CONFIG_MEMORY_HOTPLUG.
Signed-off-by: Badari Pulavarty <pbadari@...ibm.com>
Index: linux-2.6.22-rc4/mm/sparse.c
===================================================================
--- linux-2.6.22-rc4.orig/mm/sparse.c 2007-06-04 17:57:25.000000000 -0700
+++ linux-2.6.22-rc4/mm/sparse.c 2007-06-05 13:56:29.000000000 -0700
@@ -240,6 +240,27 @@ static struct page __init *sparse_early_
return NULL;
}
+/*
+ * Allocate the accumulated non-linear sections, allocate a mem_map
+ * for each and record the physical to section mapping.
+ */
+void __init sparse_init(void)
+{
+ unsigned long pnum;
+ struct page *map;
+
+ for (pnum = 0; pnum < NR_MEM_SECTIONS; pnum++) {
+ if (!valid_section_nr(pnum))
+ continue;
+
+ map = sparse_early_mem_map_alloc(pnum);
+ if (!map)
+ continue;
+ sparse_init_one_section(__nr_to_section(pnum), pnum, map);
+ }
+}
+
+#ifdef CONFIG_MEMORY_HOTPLUG
static struct page *__kmalloc_section_memmap(unsigned long nr_pages)
{
struct page *page, *ret;
@@ -280,27 +301,6 @@ static void __kfree_section_memmap(struc
}
/*
- * Allocate the accumulated non-linear sections, allocate a mem_map
- * for each and record the physical to section mapping.
- */
-void __init sparse_init(void)
-{
- unsigned long pnum;
- struct page *map;
-
- for (pnum = 0; pnum < NR_MEM_SECTIONS; pnum++) {
- if (!valid_section_nr(pnum))
- continue;
-
- map = sparse_early_mem_map_alloc(pnum);
- if (!map)
- continue;
- sparse_init_one_section(__nr_to_section(pnum), pnum, map);
- }
-}
-
-#ifdef CONFIG_MEMORY_HOTPLUG
-/*
* returns the number of sections whose mem_maps were properly
* set. If this is <=0, then that means that the passed-in
* map was not consumed and must be freed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists