[PATCH] Allow drivers to map individual 4k pages to userspace

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Apr 4 13:23:45 EST 2007


> The problem with this approach is that remap_4k_pfn is
> powerpc-specific, right?  For example, I don't believe that an ia64
> kernel running with 16K pages could implement this.  Which means that
> any driver that calls remap_4k_pfn is now powerpc-specific (or has an
> #ifdef to work around this).
> 
> In fact my impression was that the powerpc MMU is not part of the
> architecture, in the sense that a new implementation could come along
> that supported 64K pages without the ability to do this 4K aliasing
> trick.  Which would make multiplatform kernels very painful, since
> remap_4k_pfn might work for some platforms the kernel could boot on.
> Or is this not a problem?

It's somewhat architected. I doubt there will ever be a processor that
can have an eHCA and doesn't support that trick. The thing is, eHCA is
platform specific, so the remap_4k_pfn would have to be called by driver
specific code, but that's not a problem since that driver will only ever
be used on those platforms that support that call.

Ben.





More information about the Linuxppc-dev mailing list