public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: Dmytro Bablinyuk <dmytro.bablinyuk@tait.co.nz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problem with remap_page_range
Date: Tue, 9 Sep 2003 10:02:35 -0700	[thread overview]
Message-ID: <20030909100235.A20267@home.com> (raw)
In-Reply-To: <3F5E7ACD.8040106@tait.co.nz>; from dmytro.bablinyuk@tait.co.nz on Tue, Sep 09, 2003 at 09:13:49PM -0400

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

  parent reply	other threads:[~2003-09-09 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10  1:13 Problem with remap_page_range Dmytro Bablinyuk
2003-09-09  9:59 ` Jamie Lokier
2003-09-09 17:03   ` Matt Porter
2003-09-10  2:19   ` Dmytro Bablinyuk
2003-09-09 17:02 ` Matt Porter [this message]
2003-09-09 21:54   ` Dmytro Bablinyuk
2003-09-09 22:06     ` Matt Porter

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=20030909100235.A20267@home.com \
    --to=mporter@kernel.crashing.org \
    --cc=dmytro.bablinyuk@tait.co.nz \
    --cc=linux-kernel@vger.kernel.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