[RFC] Prohibit ioremap() on kernel managed RAM
Shilimkar, Santosh
santosh.shilimkar at ti.com
Sat May 1 02:24:55 EDT 2010
> -----Original Message-----
> From: Catalin Marinas [mailto:catalin.marinas at arm.com]
> Sent: Friday, April 30, 2010 10:09 PM
> To: George G. Davis
> Cc: Russell King; Shilimkar, Santosh; linux-arm-kernel at lists.infradead.org
> Subject: Re: [RFC] Prohibit ioremap() on kernel managed RAM
>
> On Fri, 2010-04-30 at 17:33 +0100, George G. Davis wrote:
> > Hi,
> >
> > On Fri, Apr 23, 2010 at 03:40:58PM +0100, Russell King wrote:
> > > > Above change is necessary but what an alternative approach is for this.
> > > > There are many use case where ioremap* is needed.
> > >
> > > This is a very difficult issue to answer; the only way we can safely
> > > remap RAM with different attributes is if we disable the existing
> > > mappings - but since we create those with 1MB sections, that's far
> > > from easy to achieve.
> > >
> > > I think a viable safe solution is to set aside some RAM at boot (which
> > > the kernel doesn't manage at all) and then use ioremap on that; that
> > > approach will still work with this patch in place.
> >
> > So cases such as the omapfb driver which use reserve_bootmem() (in
> > arch/arm/plat-omap/fb.c) and then later use ioremap_wc() to remap
> > reserved memory (in drivers/video/omap2/omapfb/omapfb-main.c)
> > will no longer work with this change.
>
> Another solution would be to allow the unmapping of sections from the
> kernel linear mapping. I think x86 does this already for the AGP
> aperture.
This seems to be good solution if it's doable. Reserving memory in the boot
is not so flexible and might end up in waste of memory.
Regards,
Santosh
More information about the linux-arm-kernel
mailing list