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


Groups > linux.kernel > #1617938

Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap interface

From "Luis R. Rodriguez" <mcgrof@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap interface
Date 2017-04-06 14:30 +0200
Message-ID <tteI3-8tl-35@gated-at.bofh.it> (permalink)
References (4 earlier) <tsQZ4-1SD-15@gated-at.bofh.it> <tsSxP-2F7-5@gated-at.bofh.it> <ttcPU-7fO-21@gated-at.bofh.it> <ttdiV-7pf-9@gated-at.bofh.it> <tteyl-8ob-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 06, 2017 at 01:11:57PM +0100, Russell King - ARM Linux wrote:
> On Thu, Apr 06, 2017 at 12:53:12PM +0200, Luis R. Rodriguez wrote:
> > On Thu, Apr 06, 2017 at 11:26:36AM +0100, Lorenzo Pieralisi wrote:
> > > Indeed, the static inline ioremap_nocache() fallback does not work
> > > on all arches (whether I add the fallback in linux/io.h or
> > > asm-generic/io.h is irrelevant), I bump into issues such as the one
> > > reported above.
> > 
> > Its also not *safe* to assume on behalf of all architectures a new ioremap
> > call is both a good idea and proper.
> 
> You may be right in general, but not in this case.
> 
> Currently, many drivers use plain ioremap() to map this resource.  We
> are replacing that existing call - which is known to work in the majority
> of cases - with a new call to cater for different semantics required by
> an architecture.
> 
> Doing a replace of these ioremap() calls with ioremap_nopost() in this
> situation, and then having ioremap_nopost() fail is a recipe for causing
> lots and lots of regressions.
> 
> The only sane approach is to have ioremap_post() default to modelling the
> _existing_ behaviour everywhere that it is used.
> 
> Requiring it to fail until architecture folk trip over the failure is
> totally insane, and I very strongly disagree with you on this.

Ah yes, what if with this modulo rule of thumb:

The litmus test then is if an existing set of calls are changed to
use a new ioremap then all archs that support those drivers where the new
call is being added must be modified to also have a correct corresponding
API call ?

This is more work on the new person introducing the new API, and should require
review still on arch maintainers but it seems like a fair compromise.

Then if an API is *new* though then things can move forward without requiring
all archs to add the respective call.

  Luis

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


Thread

Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Bjorn Helgaas <helgaas@kernel.org> - 2017-03-28 03:50 +0200
  Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-03-28 16:50 +0200
    Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Bjorn Helgaas <helgaas@kernel.org> - 2017-03-30 18:50 +0200
    Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-05 13:10 +0200
      Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-05 14:50 +0200
        Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-06 12:30 +0200
          Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-06 12:50 +0200
            Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-10 16:40 +0200
          Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-04-06 13:00 +0200
            Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-06 13:40 +0200
              Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-04-06 14:00 +0200
                Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-06 15:10 +0200
                Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-06 18:30 +0200
                Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-06 18:50 +0200
                Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-04-06 19:20 +0200
                Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-06 19:30 +0200
            Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-06 14:20 +0200
              Re: [PATCH v2 02/22] asm-generic/io.h: add ioremap_nopost remap  interface "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-04-06 14:30 +0200

csiph-web