From mboxrd@z Thu Jan 1 00:00:00 1970 From: anish198519851985@gmail.com (anish singh) Date: Fri, 27 May 2011 23:18:05 +0530 Subject: Can we map a device address to two different memory locations? In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Fri, May 27, 2011 at 10:54 PM, Mulyadi Santosa wrote: > Hi... > > On Fri, May 27, 2011 at 17:49, sandeep kumar > 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? > Don't you think it would also be reducing the memory map space in RAM which is a critical resource and many other drivers would be denied the mapping of there IO resources? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110527/c2a691aa/attachment.html