Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: ralf@linux-mips.org
Cc: anemo@mba.ocn.ne.jp, ths@networkno.de, linux-mips@linux-mips.org,
	Franck Bui-Huu <fbuihuu@gmail.com>
Subject: [PATCH 3/7] setup.c: get ride of CPHYSADDR()
Date: Thu, 19 Oct 2006 13:20:01 +0200	[thread overview]
Message-ID: <11612568063333-git-send-email-fbuihuu@gmail.com> (raw)
In-Reply-To: <11612568052624-git-send-email-fbuihuu@gmail.com>

and use new __pa() implementation instead introduced by the previous
patch. Indeed this macro can be used now even by the 64 bit kernels
with CONFIG_BUILD_ELF64=n config.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/setup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 8f6e896..715451a 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -204,12 +204,12 @@ static void __init finalize_initrd(void)
 		printk(KERN_INFO "Initrd not found or empty");
 		goto disable;
 	}
-	if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {
+	if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
 		printk("Initrd extends beyond end of memory");
 		goto disable;
 	}
 
-	reserve_bootmem(CPHYSADDR(initrd_start), size);
+	reserve_bootmem(__pa(initrd_start), size);
 	initrd_below_start_ok = 1;
 
 	printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n",
@@ -260,7 +260,7 @@ static void __init bootmem_init(void)
 	 * of usable memory.
 	 */
 	reserved_end = init_initrd();
-	reserved_end = PFN_UP(CPHYSADDR(max(reserved_end, (unsigned long)&_end)));
+	reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
 
 	/*
 	 * Find the highest page frame number we have available.
-- 
1.4.2.3

  parent reply	other threads:[~2006-10-19 11:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19 11:19 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4] Franck Bui-Huu
2006-10-19 11:19 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
2006-10-19 11:20 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
2006-10-19 11:20 ` Franck Bui-Huu [this message]
2006-10-19 11:20 ` [PATCH 4/7] Introduce __pa_symbol() Franck Bui-Huu
2006-10-19 11:20 ` [PATCH 5/7] setup.c: use __pa_symbol() where needed Franck Bui-Huu
2006-10-19 11:20 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
2006-10-19 11:20 ` [PATCH 7/7] Make free_init_pages() arguments to be physical addresses Franck Bui-Huu
2006-10-20  3:19 ` [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4] Atsushi Nemoto
  -- strict thread matches above, loose matches on Subject: below --
2006-10-16 16:12 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #3] Franck Bui-Huu
2006-10-16 16:12 ` [PATCH 3/7] setup.c: get ride of CPHYSADDR() Franck Bui-Huu
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 3/7] setup.c: get ride of CPHYSADDR() Franck Bui-Huu

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=11612568063333-git-send-email-fbuihuu@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=fbuihuu@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=ths@networkno.de \
    /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