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 1/5] Make __pa() uses CPHYSADDR() if really needed
Date: Wed, 11 Oct 2006 14:08:41 +0200 [thread overview]
Message-ID: <11605685251014-git-send-email-fbuihuu@gmail.com> (raw)
In-Reply-To: <1160568525897-git-send-email-fbuihuu@gmail.com>
During early boot mem init, some configs can't use __pa() to
convert virtual into physical addresses. This patch make __pa()
uses CPHYSADDR() for these configs only, others don't need this
hack. This will allow to not use anymore CPHYSADDR() in generic
code.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
include/asm-mips/page.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 32e5625..b4851ac 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -131,7 +131,11 @@ #endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
+#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
+#define __pa(x) CPHYSADDR(x)
+#else
+#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
+#endif
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
--
1.4.2.3
next prev parent reply other threads:[~2006-10-11 12:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 12:08 [PATCH 0/5] Get ride of CPHYSADDR() in setup.c Franck Bui-Huu
2006-10-11 12:08 ` Franck Bui-Huu [this message]
2006-10-11 13:33 ` [PATCH 1/5] Make __pa() uses CPHYSADDR() if really needed Atsushi Nemoto
2006-10-11 14:15 ` Franck Bui-Huu
2006-10-11 15:30 ` Atsushi Nemoto
2006-10-11 16:01 ` Franck Bui-Huu
2006-10-11 17:07 ` Franck Bui-Huu
2006-10-12 10:05 ` Atsushi Nemoto
2006-10-12 11:49 ` Franck Bui-Huu
2006-10-12 12:37 ` Thiemo Seufer
2006-10-11 12:08 ` [PATCH 2/5] setup.c: get ride of CPHYSADDR() Franck Bui-Huu
2006-10-11 12:08 ` [PATCH 3/5] setup.c: clean up initrd related code Franck Bui-Huu
2006-10-13 8:23 ` Franck Bui-Huu
2006-10-11 12:08 ` [PATCH 4/5] Introduce __pa_symbol() Franck Bui-Huu
2006-10-11 15:34 ` Atsushi Nemoto
2006-10-11 16:13 ` Franck Bui-Huu
2006-10-12 9:48 ` Atsushi Nemoto
2006-10-12 11:57 ` Franck Bui-Huu
2006-10-12 14:27 ` Atsushi Nemoto
2006-10-11 12:08 ` [PATCH 5/5] setup.c: use __pa_symbol() where needed 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=11605685251014-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