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

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Apr 4 14:43:50 EST 2007


On Tue, 2007-04-03 at 21:07 -0700, Roland Dreier wrote:
> > 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.
> 
> If I'm going off on something irrelevant, just tell me.  But is there
> a chance that you would want to build a kernel that can boot on both a
> platform that has eHCA, and also on some other platform that cannot
> support remap_4k_pfn?  If so does this approach cause problems?

As long as remap_4k_pfn() is only called on the platform that supports
it, it's fine... and if we ever end up having such platforms (we don't
at the moment, remap_4k_pfn() is basically a forced 4K fallback which is
always possible in a machine running a 64K base page kernel), we'll make
it fail at runtime. Again, as long as it's called only by the eHCA
driver, we are pretty certain it will only ever be called on plaforms
where it makes sense.

Ben.





More information about the Linuxppc-dev mailing list