linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rabin@rab.in (Rabin Vincent)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] Initial attempt to make ARM use LMB
Date: Thu, 8 Apr 2010 21:02:56 +0530	[thread overview]
Message-ID: <20100408153111.GA2598@debian> (raw)
In-Reply-To: <20100325233248.GM24984@n2100.arm.linux.org.uk>

On Thu, Mar 25, 2010 at 11:32:48PM +0000, Russell King - ARM Linux wrote:
> The patch below is the combined patch; individual patches can be found
> in the arm:lmb patches on the website or the lmb branch of my git tree;
> this should be considered unstable.

Something like the following is needed to make initrds work after this
patch:

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 8b2853a..8c12214 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -11,6 +11,7 @@
 #include <linux/errno.h>
 #include <linux/swap.h>
 #include <linux/init.h>
+#include <linux/initrd.h>
 #include <linux/bootmem.h>
 #include <linux/mman.h>
 #include <linux/nodemask.h>
@@ -32,9 +33,6 @@
 
 #include "mm.h"
 
-static unsigned long phys_initrd_start __initdata = 0;
-static unsigned long phys_initrd_size __initdata = 0;
-
 static int __init early_initrd(char *p)
 {
 	unsigned long start, size;
@@ -44,8 +42,8 @@ static int __init early_initrd(char *p)
 	if (*endp == ',') {
 		size = memparse(endp + 1, NULL);
 
-		phys_initrd_start = start;
-		phys_initrd_size = size;
+		initrd_start = __phys_to_virt(start);
+		initrd_end = initrd_start + size;
 	}
 	return 0;
 }
@@ -55,8 +53,8 @@ static int __init parse_tag_initrd(const struct tag *tag)
 {
 	printk(KERN_WARNING "ATAG_INITRD is deprecated; "
 		"please update your bootloader.\n");
-	phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
-	phys_initrd_size = tag->u.initrd.size;
+	initrd_start = tag->u.initrd.start;
+	initrd_end = initrd_start + tag->u.initrd.size;
 	return 0;
 }
 
@@ -64,8 +62,8 @@ __tagtable(ATAG_INITRD, parse_tag_initrd);
 
 static int __init parse_tag_initrd2(const struct tag *tag)
 {
-	phys_initrd_start = tag->u.initrd.start;
-	phys_initrd_size = tag->u.initrd.size;
+	initrd_start = __phys_to_virt(tag->u.initrd.start);
+	initrd_end = initrd_start + tag->u.initrd.size;
 	return 0;
 }
 
@@ -284,7 +282,7 @@ void __init arm_lmb_reserve(void)
 #else
 	lmb_reserve(__pa(_stext), _end - _stext);
 #endif
-	lmb_reserve(phys_initrd_start, phys_initrd_size);
+	lmb_reserve(__pa(initrd_start), initrd_end - initrd_start);
 	arm_mm_lmb_reserve();
 }
 

  parent reply	other threads:[~2010-04-08 15:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 23:32 [RFC] Initial attempt to make ARM use LMB Russell King - ARM Linux
2010-03-31  6:43 ` Jeremy Kerr
2010-04-01  9:47   ` Tony Lindgren
2010-04-09 11:13   ` Russell King - ARM Linux
2010-04-08 15:32 ` Rabin Vincent [this message]
2010-04-08 18:27   ` Russell King - ARM Linux
2010-04-09 11:11     ` Russell King - ARM Linux
2010-04-10  3:42       ` Rabin Vincent
2010-04-10  7:03         ` Russell King - ARM Linux
2010-04-10 11:56           ` Rabin Vincent
2010-04-14  7:34       ` Benjamin Herrenschmidt
2010-05-05 15:02 ` Russell King - ARM Linux
2010-05-13 17:40   ` Russell King - ARM Linux
2010-05-13 21:19     ` Tony Lindgren
2010-05-13 21:58       ` Russell King - ARM Linux
2010-05-13 22:01         ` Tony Lindgren
2010-05-13 22:12           ` Russell King - ARM Linux
2010-05-14  7:24             ` Shilimkar, Santosh
2010-05-14 10:11               ` Grazvydas Ignotas
2010-05-14 10:16                 ` Russell King - ARM Linux
2010-05-17  9:38                   ` Grazvydas Ignotas
2010-05-17  9:44                     ` Russell King - ARM Linux
2010-05-17 10:26                       ` Tomi Valkeinen
2010-05-17 17:37                         ` Tony Lindgren
2010-05-18  7:47                           ` Tomi Valkeinen
2010-05-18  8:40                             ` Russell King - ARM Linux
2010-05-18  8:58                               ` Tomi Valkeinen
2010-05-14 15:22             ` Tony Lindgren
2010-05-14 15:32               ` Shilimkar, Santosh
2010-05-14 15:43                 ` Tony Lindgren
2010-05-22 21:58 ` Russell King - ARM Linux
2010-05-26  0:44   ` Tony Lindgren
2010-05-26  7:50     ` Russell King - ARM Linux
2010-05-26 13:51       ` Tony Lindgren
2010-05-26 21:40         ` Russell King - ARM Linux
2010-05-27  8:52           ` Tomi Valkeinen
2010-05-27  9:25             ` Russell King - ARM Linux
2010-05-27  9:47               ` Tomi Valkeinen
2010-05-28 14:32     ` Russell King - ARM Linux
2010-05-31  8:04       ` Tony Lindgren

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=20100408153111.GA2598@debian \
    --to=rabin@rab.in \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).