Re: PowerPC PCI DMA issues (prefetch/coherency?)
From: Chris Pringle
Date: Tue Jun 16 2009 - 12:34:22 EST
Scott Wood wrote:
On Tue, Jun 16, 2009 at 02:58:27PM +0100, Chris Pringle wrote:The kernel version is 2.6.26. Firmware is custom on a custom board.
We're developing on a Freescale MPC8272 and are having some nasty
problems with PCI bus mastering and data corruption.
What kernel version? What firmware? Custom board, or one in upstream
Cache coherency on PCI DMA requires that the memory be mapped with the MI'm not sure where to look to verify this?
attribute on this chip, but that should be happening based on detection of
Also make sure that you park the bus on PCI and raise its arbitrationSince this is a reasonably recent kernel, 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.
priority, as done at the end of fixup_pci in arch/powerpc/boot/cuboot-pq2.c.
BTW, you may want to post to linuxppc-dev@xxxxxxxxxxxxxxxx forI've just posted there :-)
powerpc-specific issues, especially this kind of hardware issue.
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 - so I wasn't expecting
this to make any difference. The memory corruption with the cache
snooping turned off is almost identical to that which I'm seeing with it
turned on, only much, much worse.
Miranda Technologies Ltd.
Oxfordshire OX10 9DG
Tel. +44 1491 820206
Fax. +44 1491 820001
Miranda Technologies Limited
Registered in England and Wales CN 02017053
Registered Office: James House, Mere Park, Dedmere Road, Marlow, Bucks, SL7 1FJ
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/