From: Scott Wood <scottwood@freescale.com>
To: Chris Pringle <chris.pringle@oxtel.com>
Cc: "linuxppc-dev@ozlabs.org list" <linuxppc-dev@lists.ozlabs.org>,
linux-kernel@vger.kernel.org
Subject: Re: PowerPC PCI DMA issues (prefetch/coherency?)
Date: Tue, 16 Jun 2009 11:46:42 -0500 [thread overview]
Message-ID: <4A37CC72.3060709@freescale.com> (raw)
In-Reply-To: <4A37C97A.5050508@oxtel.com>
Chris Pringle wrote:
> The kernel version is 2.6.26. Firmware is custom on a custom board.
>> Cache coherency on PCI DMA requires that the memory be mapped with the M
>> attribute on this chip, but that should be happening based on
>> detection of
>> the core.
>>
> I'm not sure where to look to verify this?
Check asm/cputable.h for CPU_FTR_NEED_COHERENT. Make sure that
CONFIG_8260 is one of the #ifdefs that turns that on. It looks like
that was in place by 2.6.26 in arch/powerpc. I'm not sure what to look
for in arch/ppc.
>> Also make sure that you park the bus on PCI and raise its arbitration
>> priority, as done at the end of fixup_pci in
>> arch/powerpc/boot/cuboot-pq2.c.
>>
> Since this is a reasonably recent kernel,
Not really, there was a fair amount of 82xx work in the mid-2.6.20s.
The addition of CPU_FTR_NEED_COHERENT to 82xx was somewhere in that time.
Can you try 2.6.30?
> I'd guess that both of these
> things are correct. I've had a quick look in that file and there is code
> in there raising arbitartion priority and parking the bus.
Just because the code is there doesn't mean you're using it -- are you
using cuImage? Are you using arch/ppc or arch/powerpc?
Typically this would be done by firmware; it's only in cuboot because
u-boot wasn't doing it.
>> BTW, you may want to post to linuxppc-dev@lists.ozlabs.org for
>> powerpc-specific issues, especially this kind of hardware issue.
>>
>>
> I've just posted there :-)
Doh, sorry. :-)
> Interestingly, I've just turned off cache snooping and the problem has
> got much worse. This has surprised me as I thought that part of the job
> done by pci_map_sg was to flush the CPU cache
It only flushes the cache on hardware that doesn't do coherent DMA.
-Scott
next parent reply other threads:[~2009-06-16 16:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4A37A503.3030209@oxtel.com>
[not found] ` <20090616162114.GA5051@loki.buserror.net>
[not found] ` <4A37C97A.5050508@oxtel.com>
2009-06-16 16:46 ` Scott Wood [this message]
2009-06-16 16:57 ` PowerPC PCI DMA issues (prefetch/coherency?) Chris Pringle
2009-06-16 17:03 ` Scott Wood
2009-06-16 17:43 ` Arnd Bergmann
2009-06-16 17:49 ` Scott Wood
2009-06-16 18:02 ` Arnd Bergmann
2009-06-17 0:18 ` Benjamin Herrenschmidt
2009-06-17 0:37 ` FUJITA Tomonori
2009-06-17 0:56 ` Leon Woestenberg
2009-06-17 1:08 ` Benjamin Herrenschmidt
2009-06-17 1:13 ` Leon Woestenberg
2009-06-17 1:07 ` Benjamin Herrenschmidt
2009-06-17 7:58 ` Chris Pringle
2009-06-17 13:18 ` Chris Pringle
2009-06-18 11:24 ` Chris Pringle
2009-06-22 14:31 ` AW: " Sergej.Stepanov
2009-06-29 8:11 ` Chris Pringle
2009-06-16 14:08 Chris Pringle
2009-06-16 15:48 ` Roderick Colenbrander
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=4A37CC72.3060709@freescale.com \
--to=scottwood@freescale.com \
--cc=chris.pringle@oxtel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.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 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).