AW: PowerPC PCI DMA issues (prefetch/coherency?)
Heinz.Wrobel at freescale.com
Thu Sep 3 22:20:12 EST 2009
This doesn't seem right. If we are talking about a single CPU core chip,
i.e., just one data cache, then setting M is typically a) useless and
could even b) cause a performance penalty depending on a chip's
The M bit is required if *other* cores with caches need to see changes
for coherency of their caches. You wouldn't set it for one core only
because your own core knows about its own cache.
The possible performance penalty could happen because you need some way
to tell the others that they better intercept a transaction. And that
could, depending on the chip, by a clock extra or so per transaction.
Now, in theory, a DMA engine could have caches, read from cache content
first, and could snoop the bus on global transactions like another core,
but I have never heard of such a beast.
Hope this helps,
From: linuxppc-dev-bounces+heinz.wrobel=freescale.com at lists.ozlabs.org
[mailto:linuxppc-dev-bounces+heinz.wrobel=freescale.com at lists.ozlabs.org
] On Behalf Of Chris Pringle
Sent: Donnerstag, 3. September 2009 10:05
To: azilkie at datacast.com
Cc: Tom Burns; Andrea Zypchen; linuxppc-dev at lists.ozlabs.org
Subject: Re: AW: PowerPC PCI DMA issues (prefetch/coherency?)
If you have a look in include/asm-ppc/pgtable.h for the following
#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_GUARDED)
#define _PAGE_BASE (_PAGE_PRESENT | _PAGE_ACCESSED)
Try adding _PAGE_COHERENT to the appropriate line above and see if that
fixes your issue - this causes the 'M' bit to be set on the page which
sure enforce cache coherency. If it doesn't, you'll need to check the
'M' bit isn't being masked out in head_44x.S (it was originally masked
out on arch/powerpc, but was fixed in later kernels when the cache
coherency issues with non-SMP systems were resolved).
The patch I had fixed two problems on 2.6.26 for 'powerpc':
1) It stopped the 'M' bit being masked out (head_32.S)
2) It set the cache coherency ('M' bit) flag on each page table entry
Hope this helps!
Adam Zilkie wrote:
> Hi Chris,
> I am having a problem similar to what you described in this
> We are using the ppc arch with 2.6.24 with CONFIG_SEQUOIA with
> compiles arch/ppc/kernel/head_44x.c (quite different from
> /arch/powerpc/kernel/head_32.S). I would like to apply your
> backporting patch to this architecture. Any help would be appreciated.
Software Design Engineer
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
Linuxppc-dev mailing list
Linuxppc-dev at lists.ozlabs.org
More information about the Linuxppc-dev