From: Jochen Friedrich <jochen@scram.de>
To: linuxppc-embedded@ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH#2 2/4] [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
Date: Mon, 24 Sep 2007 19:14:57 +0200 [thread overview]
Message-ID: <46F7F091.7000406@scram.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]
cpm_dpram_addr returns physical memory of the DP RAM instead of
iomapped virtual memory. As there usually is a 1:1 MMU map of
the IMMR area, this is often not noticed. However, cpm_dpram_phys
assumes this iomapped virtual memory and returns garbage on the
1:1 mapped memory causing CPM1 uart console to fail.
This patch fixes the problem (copied from the powerpc tree).
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/ppc/8xx_io/commproc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Attachment #2: e99a679ff14fb0073efd9220f5aa933e47516202.diff --]
[-- Type: text/x-patch, Size: 399 bytes --]
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 7088428..9da880b 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);
void *cpm_dpram_addr(unsigned long offset)
{
- return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
+ return (void *)(dpram_vbase + offset);
}
EXPORT_SYMBOL(cpm_dpram_addr);
WARNING: multiple messages have this Message-ID (diff)
From: Jochen Friedrich <jochen@scram.de>
To: linuxppc-embedded@ozlabs.org
Cc: linux-kernel@vger.kernel.org, Marcelo Tosatti <marcelo@kvack.org>
Subject: [PATCH#2 2/4] [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
Date: Mon, 24 Sep 2007 19:14:57 +0200 [thread overview]
Message-ID: <46F7F091.7000406@scram.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]
cpm_dpram_addr returns physical memory of the DP RAM instead of
iomapped virtual memory. As there usually is a 1:1 MMU map of
the IMMR area, this is often not noticed. However, cpm_dpram_phys
assumes this iomapped virtual memory and returns garbage on the
1:1 mapped memory causing CPM1 uart console to fail.
This patch fixes the problem (copied from the powerpc tree).
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
arch/ppc/8xx_io/commproc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
[-- Attachment #2: e99a679ff14fb0073efd9220f5aa933e47516202.diff --]
[-- Type: text/x-patch, Size: 399 bytes --]
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 7088428..9da880b 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -459,7 +459,7 @@ EXPORT_SYMBOL(cpm_dpdump);
void *cpm_dpram_addr(unsigned long offset)
{
- return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset;
+ return (void *)(dpram_vbase + offset);
}
EXPORT_SYMBOL(cpm_dpram_addr);
next reply other threads:[~2007-09-24 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 17:14 Jochen Friedrich [this message]
2007-09-24 17:14 ` [PATCH#2 2/4] [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem Jochen Friedrich
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=46F7F091.7000406@scram.de \
--to=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-embedded@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.