public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: arvind Yadav <arvind.yadav.cs@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: robert.jarzmik@free.fr, dwmw2@infradead.org,
	computersforpeace@gmail.com, marek.vasut@gmail.com,
	richard@nod.at, cyrille.pitchen@atmel.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap.
Date: Mon, 12 Dec 2016 23:45:55 +0530	[thread overview]
Message-ID: <b09baca0-29b6-2cf1-1dfd-5381ee734284@gmail.com> (raw)
In-Reply-To: <20161212180444.22a1f4ff@bbrezillon>

Hi Boris,

Yes, It's possible that two driver can use same iomem region.
For example you can check
commit id - : 33cf75656923ff11d67a937a4f8e9344f58cea77

Here, It's not required.

Thanks
-Arvind

On Monday 12 December 2016 10:34 PM, Boris Brezillon wrote:
> Hi Arvind,
>
> On Mon, 12 Dec 2016 21:33:05 +0530
> arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
>
>> There is problem, if you will use devm_ioremap_resource instead of
>> devm_ioremap,
>> than devm_ioremap_resource will call request_mem_region().
>> request_mem_region() allows to tell the kernel that this driver is going
>> to use
>> this range of I/O addresses, which will prevent other drivers to make an
>> overlapping call to request_mem_region If other driver want to use same
>> address
>> space to access then it will not allow. Means we can not share same
>> address space
>> between two driver.
> The question is, is it required here? In general, allowing 2 different
> drivers from touching the same iomem region is a bad idea, so, if
> there's a reason to allow that here, I'd like to know more about it.
>
> Thanks,
>
> Boris

      reply	other threads:[~2016-12-12 18:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  3:00 [V2] mtd: devices: docg3:- Handle return value of devm_ioremap Arvind Yadav
2016-12-12  4:10 ` Marek Vasut
2016-12-12  8:42 ` Boris Brezillon
2016-12-12 16:03   ` arvind Yadav
2016-12-12 16:32     ` Robert Jarzmik
2016-12-12 17:00       ` Boris Brezillon
2016-12-12 17:04     ` Boris Brezillon
2016-12-12 18:15       ` arvind Yadav [this message]

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=b09baca0-29b6-2cf1-1dfd-5381ee734284@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=robert.jarzmik@free.fr \
    /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