From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: linux-mips@linux-mips.org
Subject: [RFC] setup.c: get ride of CPHYSADDR()
Date: Tue, 03 Oct 2006 16:44:50 +0200 [thread overview]
Message-ID: <45227762.8090207@innova-card.com> (raw)
Hi,
The following patch is an attempt to remove this macro in setup.c.
I'm not sure about why sometimes it is used and sometimes it is
not. By sending this RFC, I hope to get some feedbacks that will shed
some light on this obscure macro...
The reason why I'm trying to kick out this macro is that we should
rely on __pa() for address convertions instead of having several
helpers that do the same thing but differently. Futermore if some
tricks are needed for these conversions, they should be done in
one place.
Thanks
Franck
-- >8 --
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index fdbb508..00d62bd 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",
@@ -256,7 +256,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.
next reply other threads:[~2006-10-03 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 14:44 Franck Bui-Huu [this message]
2006-10-03 15:16 ` [RFC] setup.c: get ride of CPHYSADDR() Maciej W. Rozycki
2006-10-03 15:34 ` 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=45227762.8090207@innova-card.com \
--to=vagabon.xyz@gmail.com \
--cc=linux-mips@linux-mips.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