linux-mips
[Top] [All Lists]

[PATCH 6/6] TXx9: Implement prom_free_prom_memory

To: linux-mips@linux-mips.org
Subject: [PATCH 6/6] TXx9: Implement prom_free_prom_memory
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Mon, 1 Sep 2008 22:22:41 +0900
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/txx9/generic/setup.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 8731e16..419f574 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -28,6 +28,7 @@
 #include <asm/time.h>
 #include <asm/reboot.h>
 #include <asm/r4kcache.h>
+#include <asm/sections.h>
 #include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
 #include <asm/txx9tmr.h>
@@ -393,6 +394,11 @@ void __init prom_init(void)
 
 void __init prom_free_prom_memory(void)
 {
+       unsigned long saddr = PAGE_SIZE;
+       unsigned long eaddr = __pa_symbol(&_text);
+
+       if (saddr < eaddr)
+               free_init_pages("prom memory", saddr, eaddr);
 }
 
 const char *get_system_type(void)
-- 
1.5.6.3


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 6/6] TXx9: Implement prom_free_prom_memory, Atsushi Nemoto <=