Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540502

Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap.

From arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap.
Date 2016-12-12 19:20 +0100
Message-ID <sNDmF-7Fp-5@gated-at.bofh.it> (permalink)
References <sNpa1-7mg-9@gated-at.bofh.it> <sNut4-25U-9@gated-at.bofh.it> <sNBkR-6tz-25@gated-at.bofh.it> <sNCgW-72u-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-12-12 04:10 +0100
  Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Marek Vasut <marek.vasut@gmail.com> - 2016-12-12 05:20 +0100
  Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-12-12 09:50 +0100
    Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-12-12 17:10 +0100
      Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Robert Jarzmik <robert.jarzmik@free.fr> - 2016-12-12 17:40 +0100
        Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-12-12 18:10 +0100
      Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-12-12 18:10 +0100
        Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-12-12 19:20 +0100

csiph-web