From: Oliver Korpilla <okorpil@fh-landshut.de>
To: Adrian Cox <adrian@humboldt.co.uk>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: MPC7455 DMA buffer strangeness
Date: Tue, 06 Jul 2004 11:46:34 +0200 [thread overview]
Message-ID: <40EA74FA.5070608@fh-landshut.de> (raw)
In-Reply-To: <1089106451.937.85.camel@localhost>
Hello, Adrian!
Perhaps it is easier, if I explain what I want to do, why and perhaps to find a
solution to that:
I have two kinds to access data on the VME bus via the Tundra Universe 2 PCI-VME
bridge:
1) Master Windows:
I want to access VME bus locations via memory pointer. The memory pointer is
dereferenced, translated by the MMU to a physical address, a cycle is generated
on the PCI (the physical address is from a I/O resource), the cycle is answered
by the Universe device (which is programmed to answer for the range of PCI
addresses defining the Master Window with a range of VME bus addresses). This
does only work since the pgprot_noncached() stuff is in my mmap() hook - and it
does work correctly.
2.) DMA:
A DMA buffer gets allocated with pci_alloc_consistent(), mapped to user space
via the mmap() hook, written to (only the write goes wrong on the 7455) and the
actual transfer (involving writing to the bridge registers) is triggered by an
ioctl().
> It's certainly possible that part of the page has ended up in cache.
>
> Why are you trying to turn off cache coherency? This should all work if
> your userspace mapping is cache coherent.
So - after your explanations - it seems like I do have a conflict of interest
there: using pgprot_noncached() kills coherency in my mmap() hook, so this maybe
a reason for DMA failing. pgprot_noncached is needed for Master Windows, so I
need it there.
First I will try out removing the pgprot_noncached() and try to test DMA again.
I'll let you know the results. If DMA works fine then, I need to devise a way to
differentiate between Master Window and DMA mmap() calls and treat them different.
If not, I'm really stumped... :(
Thanks,
Oliver Korpilla
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-06 9:46 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
2004-07-06 8:47 ` Oliver Korpilla
2004-07-06 9:34 ` Adrian Cox
2004-07-06 9:46 ` Oliver Korpilla [this message]
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=40EA74FA.5070608@fh-landshut.de \
--to=okorpil@fh-landshut.de \
--cc=adrian@humboldt.co.uk \
--cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).