Messages in this thread | | | Date | Tue, 9 Sep 2003 10:02:35 -0700 | From | Matt Porter <> | Subject | Re: Problem with remap_page_range |
| |
On Tue, Sep 09, 2003 at 09:13:49PM -0400, Dmytro Bablinyuk wrote: > > We have a DSP shared memory which we should access (from PowerPC). > The problem is when I do ioremap I can see the memory correctly from the > driver (see below) but when I do remap_page_range to the user space > application then data appears to be wrong, I can recognize some values > there, but they are in the wrong places and other values around from > everywhere else (see below).
<snip>
> if (remap_page_range(vma->vm_start, > DSP_ADDR, > size, > vma->vm_page_prot > ))
Your remap call isn't adding _PAGE_NO_CACHE and _PAGE_GUARDED flags like ioremap_nocache()/ioremap() do on PPC. You'll get bad results because of the ordering and cache issues resulting from not using these PTE flags. In 2.6, these can be added using pgprot_noncached() that is defined per-arch.
BTW, ioremap_nocache() and ioremap() are identical on PPC.
-Matt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |