[PATCH v3 04/32] asm-generic: add ioremap_nopost() remap interface
Lorenzo Pieralisi
lorenzo.pieralisi at arm.com
Wed Apr 12 06:00:28 EDT 2017
On Wed, Apr 12, 2017 at 09:14:07AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2017-04-11 at 15:31 +0100, Lorenzo Pieralisi wrote:
> > > This is a semantic that simply *cannot* be generically provided accross
> > > architectures as a mapping attribute.
> >
> > I agree that a default implementation does not make much sense. The
> > only solution to this, if we want the ioremap_nopost to be made available
> > to generic code (and drivers - ie DT PCI host bridge drivers on ARM/ARM64
> > are not arch code), is to make the ioremap_nopost() call return NULL
> > unless overriden by arch code that can provide its semantics.
>
> That would be a better option.
I think that's what I will implement which basically means I will
replace the default:
static inline void __iomem *ioremap_nopost(phys_addr_t offset, size_t size)
{
return ioremap_nocache(offset, size);
}
with
static inline void __iomem *ioremap_nopost(phys_addr_t offset, size_t size)
{
return NULL;
}
If an arch can override ioremap_nopost() with sensible mapping
attributes (or whatever make it enforceable) it does, if it can't
any ioremap_nopost() usage will result in a mapping failure, if you
see any other viable solution please shout.
Thanks,
Lorenzo
More information about the linux-arm-kernel
mailing list