Re: [PATCH 2/4] x86: set_memory_xx enhancement

From: Andi Kleen
Date: Fri Feb 01 2008 - 06:07:48 EST


On Friday 01 February 2008 10:34:52 Huang, Ying wrote:
> This patch makes set_memory_xx can be used on arbitrary memory mapping
> (besides identity mapping), such as memory mapped with ioremap. The
> physical address is added to the set_memory_xx functions as another
> parameter.

Well as you can see it's incredible complicated. And it's not even
needed because there is no need to change the direct mapping and
add more TLB misses for all users who happen to share the same 2MB area
just to get an executable mapping somewhere. All this effort is only
really needed for uncacheable mappings where the architecture requires
coherency. Or for mappings where cache coherency is not ensured.

It would be much simpler to just fix ioremap to allow executable
mappings again. And remove set_memory_x() again because it is much
less efficient than ioremap for this.


-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/