kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Can we map a device address to two different memory locations?
Date: Sat, 28 May 2011 00:24:49 +0700	[thread overview]
Message-ID: <BANLkTimuYGkCEQ0nnKuivJS5uZO5WXq68g@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikcp1GeX=WeD4Eei2DMobNXCxVa8A@mail.gmail.com>

Hi...

On Fri, May 27, 2011 at 17:49, sandeep kumar <coolsandyforyou@gmail.com> wrote:
> Now the question is can we memory map a one device resource(say some
> iomemory) to two different memory locations?
> the other way of seeing at this question is,
> Will ioremap() gives different 'virtual addresses' when called multiple
> times?

I agree with Daniel, but I suggest you to think about it: in reading
operation, maybe it's ok, no concurrency issues need to be taken
care...but how about writing? unless we're sure they are atomically or
uninterruptible, i see a chance that race condition might happen here.

Actually it's similar when you map a file into two different VMA and
write into it, correct?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

  parent reply	other threads:[~2011-05-27 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 10:49 Can we map a device address to two different memory locations? sandeep kumar
2011-05-27 15:34 ` Daniel Baluta
2011-05-27 17:24 ` Mulyadi Santosa [this message]
2011-05-27 17:48   ` anish singh
2011-05-27 18:01     ` Mulyadi Santosa
2011-05-28 12:24 ` Peter Teoh

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=BANLkTimuYGkCEQ0nnKuivJS5uZO5WXq68g@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).