From: Adrian Cox <adrian@humboldt.co.uk>
To: okorpil@fh-landshut.de
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: MPC7455 DMA buffer strangeness
Date: Tue, 06 Jul 2004 09:34:04 +0100 [thread overview]
Message-ID: <1089102844.937.57.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.58.0407051018590.388@corpster2>
On Mon, 2004-07-05 at 09:31, Oliver Korpilla wrote:
> I'm mapping a DMA buffer allocated with pci_alloc_consistent() into user
> space with a mmap hook like this:
>
> int vme_mmap(struct file *file_ptr, struct vm_area_struct *vma)
> {
> DPRINTF("Attempting to map %#lx bytes of memory at "
> "physical address %#lx\n", vma->vm_end - vma->vm_start,
> vma->vm_pgoff << PAGE_SHIFT);
>
> vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
The memory allocated by pci_alloc_consistent will be cacheable memory,
as PowerPC 60x is a cache coherent architecture. You've set up a
non-cacheable userspace mapping to the same address by using
pgprot_noncached(). Two mappings of the same physical memory must have
the same cache settings.
> On the MPC7455, though, write accesses seem to be applied or not applied
> in a somewhat random fashion. Sometimes an offsetted write into the buffer
> is there, and sometimes not. Writing at the begin of the buffer seems to
> disapper always.
This probably only shows on the 7455 because the caches of the 7455 are
much larger.
- Adrian Cox
Humboldt Solutions Ltd.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-06 8:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-05 8:31 MPC7455 DMA buffer strangeness Oliver Korpilla
2004-07-06 8:34 ` Adrian Cox [this message]
2004-07-06 8:47 ` Oliver Korpilla
2004-07-06 9:34 ` Adrian Cox
2004-07-06 9:46 ` Oliver Korpilla
2004-07-06 10:09 ` Oliver Korpilla
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=1089102844.937.57.camel@localhost \
--to=adrian@humboldt.co.uk \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=okorpil@fh-landshut.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 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.