Skip to contentSkip to conversation

x86: move free_initrd_mem() to common mm/init.c

PATCH In review Pekka Enberg 1 participant 2 messages Mar 4, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: move free_initrd_mem() to common mm/init.c

From: Pekka Enberg <[email protected]>

The function is identical on 32-bit and 64-bit configurations so move it to the common mm/init.c file.

---
 arch/x86/mm/init.c    |    7 +++++++
 arch/x86/mm/init_32.c |    7 -------
 arch/x86/mm/init_64.c |    7 -------
 3 files changed, 7 insertions(+), 14 deletions(-)
arch/x86/mm/init.c +7 -0
index ce6a722..201bf4a 100644
@@ -47,3 +47,10 @@ void free_initmem(void)
 			(unsigned long)(&__init_begin),
 			(unsigned long)(&__init_end));
 }
+
+#ifdef CONFIG_BLK_DEV_INITRD
+void free_initrd_mem(unsigned long start, unsigned long end)
+{
+	free_init_pages("initrd memory", start, end);
+}
+#endif
arch/x86/mm/init_32.c +0 -7
index 0b087dc..d6bd5c4 100644
@@ -1200,13 +1200,6 @@ void mark_rodata_ro(void)
 }
 #endif
 
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
-	free_init_pages("initrd memory", start, end);
-}
-#endif
-
 int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 				   int flags)
 {
arch/x86/mm/init_64.c +0 -7
index aae8745..8df5919 100644
@@ -983,13 +983,6 @@ void mark_rodata_ro(void)
 
 #endif
 
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
-	free_init_pages("initrd memory", start, end);
-}
-#endif
-
 int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 				   int flags)
 {
Signature · 1 line
1.5.4.3
#1 lore raw
Commit-ID:  731ddea63600c24ff01e6e5144cea88bf7266ac5
Gitweb:     http://git.kernel.org/tip/731ddea63600c24ff01e6e5144cea88bf7266ac5
Author:     "Pekka Enberg" <[email protected]>
AuthorDate: Wed, 4 Mar 2009 11:13:40 +0200
Commit:     Ingo Molnar <[email protected]>
CommitDate: Wed, 4 Mar 2009 20:59:26 +0100

x86: move free_initrd_mem() to common mm/init.c

Impact: cleanup

The function is identical on 32-bit and 64-bit configurations so move it to the common mm/init.c file.

LKML-Reference: <1236158020.29024.28.camel@penberg-laptop>

---
 arch/x86/mm/init.c    |    7 +++++++
 arch/x86/mm/init_32.c |    7 -------
 arch/x86/mm/init_64.c |    7 -------
 3 files changed, 7 insertions(+), 14 deletions(-)
arch/x86/mm/init.c +7 -0
index f89df52..cc7fe66 100644
@@ -71,3 +71,10 @@ void free_initmem(void)
 			(unsigned long)(&__init_begin),
 			(unsigned long)(&__init_end));
 }
+
+#ifdef CONFIG_BLK_DEV_INITRD
+void free_initrd_mem(unsigned long start, unsigned long end)
+{
+	free_init_pages("initrd memory", start, end);
+}
+#endif
arch/x86/mm/init_32.c +0 -7
index 37aeaf3..c69c6b1 100644
@@ -1275,13 +1275,6 @@ void mark_rodata_ro(void)
 }
 #endif
 
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
-	free_init_pages("initrd memory", start, end);
-}
-#endif
-
 int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 				   int flags)
 {
arch/x86/mm/init_64.c +0 -7
index 074435e..d325186 100644
@@ -963,13 +963,6 @@ void mark_rodata_ro(void)
 
 #endif
 
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
-	free_init_pages("initrd memory", start, end);
-}
-#endif
-
 int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
 				   int flags)
 {