From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <20060819065247.10235.qmail@web36608.mail.mud.yahoo.com> Date: Fri, 18 Aug 2006 23:52:47 -0700 (PDT) From: Parav Pandit Subject: ioremap() twice on same memory mapped area? To: Linuxppc-embedded@ozlabs.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2039895730-1155970367=:9676" List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0-2039895730-1155970367=:9676 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I have memory mapped device and two device drivers wants to use the same area for different external device. To access the same space there is a global spin lock to avoid any race condition. Question is: Can both the driver call the ioremap() on the same space and get the different virtual address? or ioremap() should fail? Regards, Parav Pandit --------------------------------- Get your email and more, right on the new Yahoo.com --0-2039895730-1155970367=:9676 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
 
I have memory mapped device and two device drivers wants to use the same area for different external device.
To access the same space there is a global spin lock to avoid any race condition.
 
Question is:
Can both the driver call the ioremap() on the same space and get the different virtual address? or ioremap() should fail?
 
Regards,
Parav Pandit
 


Get your email and more, right on the new Yahoo.com --0-2039895730-1155970367=:9676-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: In-Reply-To: <20060819065247.10235.qmail@web36608.mail.mud.yahoo.com> References: <20060819065247.10235.qmail@web36608.mail.mud.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <04CDF080-8BF2-4381-969B-32D4B64A32A7@embeddedalley.com> From: Dan Malek Subject: Re: ioremap() twice on same memory mapped area? Date: Sat, 19 Aug 2006 10:13:18 -0400 To: Parav Pandit Cc: Linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Aug 19, 2006, at 2:52 AM, Parav Pandit wrote: > Question is: > Can both the driver call the ioremap() on the same space and get > the different virtual address? Yes, and depending upon the implementation and optimizations, they may also get the same virtual address. It will work as you intend. -- Dan