| To: | ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH 5/7] setup.c: use __pa_symbol() where needed |
| From: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
| Date: | Thu, 19 Oct 2006 13:20:03 +0200 |
| Cc: | anemo@mba.ocn.ne.jp, ths@networkno.de, linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com> |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:cc:subject:date:message-id:x-mailer:in-reply-to:references:from; b=IA+t21Pg0ohDPH9njTyzhFyhpgA3fdpz6hKqwyBIqoYbXqMNidp1Oac4rKYX31oC7ygzd6+HlYgPhn30NhDNNJrNmjsNKUPUxf+S8MAW9HTHvXiTZN84drihF/c2bEN2gN6J9DPQXRBcZ/XEnvlhn5ctkTDteVH9tIYS4wiR4/I= |
| In-reply-to: | <11612568052624-git-send-email-fbuihuu@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <11612568052624-git-send-email-fbuihuu@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
It should fix the broken code in resource_init() too.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/kernel/setup.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 715451a..b52cc97 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -260,7 +260,7 @@ static void __init bootmem_init(void)
* of usable memory.
*/
reserved_end = init_initrd();
- reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
+ reserved_end = PFN_UP(max(__pa(reserved_end), __pa_symbol(&_end)));
/*
* Find the highest page frame number we have available.
@@ -432,10 +432,10 @@ static void __init resource_init(void)
if (UNCAC_BASE != IO_BASE)
return;
- code_resource.start = virt_to_phys(&_text);
- code_resource.end = virt_to_phys(&_etext) - 1;
- data_resource.start = virt_to_phys(&_etext);
- data_resource.end = virt_to_phys(&_edata) - 1;
+ code_resource.start = __pa_symbol(&_text);
+ code_resource.end = __pa_symbol(&_etext) - 1;
+ data_resource.start = __pa_symbol(&_etext);
+ data_resource.end = __pa_symbol(&_edata) - 1;
/*
* Request address space for all standard RAM.
--
1.4.2.3
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 7/7] Make free_init_pages() arguments to be physical addresses, Franck Bui-Huu |
|---|---|
| Next by Date: | Re: OOPS with JFFS2, MIPS, Ralf Baechle |
| Previous by Thread: | [PATCH 7/7] Make free_init_pages() arguments to be physical addresses, Franck Bui-Huu |
| Next by Thread: | Re: [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4], Atsushi Nemoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |