Re: [RFC][patch 0/2] mm: remove PageReserved

Hugh Dickins
2005-08-09T14:47:49Z

On Tue, 9 Aug 2005, Benjamin Herrenschmidt wrote:
>
> > ioremap is making a similar check to the one remap_pfn_range used
> > to make; but I see no good reason for it at all. ioremap should be
> > allowed to map whatever the caller asked, just as memset is allowed
> > to set whatever the caller asked.
>
> This is dodgy actually. memset can't be guaranteed to work on IOs or
> other non-cacheable memory (including real RAM that has been mapped
> non-cacheable, typically RAM that has been "set aside" for other uses as
> described above, wether it's for AGP, or for some weird processor DMA
> bounce buffers or whatever ..., that is RAM that is out of the normal
> kernel control).

That was my point: memset goes ahead without making funny little checks,
and works or not, so I don't see why ioremap needs to make these funny
little checks. If the driver doesn't know what it's doing (not impossible,
I accept), what's the likelihood that PageReserved or not will save it?

Hugh