linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses
@ 2007-01-19  8:05 Stefan Roese
  2007-01-19 11:57 ` Josh Boyer
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2007-01-19  8:05 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: linuxppc-dev

[PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses

On systems that supply a real 64bit address (with
CONFIG_RESOURCES_64BIT enabled), don't use the fixup function. This
allows us to use the fixup function when no ERPN is specified and use
the 64 bit address when the ERPN is supplied.

Signed-off-by: Stefan Roese <sr@denx.de>

---
commit d615194752d1729211296a3afbf5adb94f2b8444
tree 11f5db07bce1cb3adc4d4be8b4d5b09076221656
parent c32ef45a856a08df6942c5efa1e8abc6e4b9ee0e
author Stefan Roese <sr@denx.de> Fri, 19 Jan 2007 09:02:28 +0100
committer Stefan Roese <sr@denx.de> Fri, 19 Jan 2007 09:02:28 +0100

 arch/ppc/mm/pgtable.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
index 354a940..1ef63da 100644
--- a/arch/ppc/mm/pgtable.c
+++ b/arch/ppc/mm/pgtable.c
@@ -156,9 +156,19 @@ ioremap64(unsigned long long addr, unsigned long size)
 void __iomem *
 ioremap(phys_addr_t addr, unsigned long size)
 {
-	phys_addr_t addr64 = fixup_bigphys_addr(addr, size);
-
-	return ioremap64(addr64, size);
+	/*
+	 * On systems that supply a real 64bit address
+	 * (with CONFIG_RESOURCES_64BIT enabled), don't use the
+	 * fixup function.
+	 * This allows us to use the fixup function when no ERPN
+	 * is specified and use the 64 bit address when the ERPN
+	 * is suppied.
+	 */
+	if ((unsigned long long)addr && 0xffffffff00000000ULL)
+		return ioremap64(addr, size);
+	else
+		return ioremap64(fixup_bigphys_addr(addr, size),
+				 size);
 }
 #endif /* CONFIG_PHYS_64BIT */
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-29 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-19  8:05 [PATCH] ppc: ioremap() on PPC44x platforms now accepts 64bit addresses Stefan Roese
2007-01-19 11:57 ` Josh Boyer
2007-01-28 21:00   ` Stefan Roese
2007-01-29  8:42   ` Stefan Roese
2007-01-29 12:45     ` Sergei Shtylyov
2007-01-29 13:26       ` Stefan Roese

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).