On Thu, 2011-01-27 at 18:59 +0000, Russell King - ARM Linux wrote: > On Thu, Jan 27, 2011 at 06:14:56PM +0000, Catalin Marinas wrote: > > On 17 January 2011 19:24, Russell King - ARM Linux > > <linux@xxxxxxxxxxxxxxxx> wrote: > > > Rather than turning off CPU domain switching when the build architecture > > > includes ARMv6K, thereby causing problems for ARMv6-supporting kernels, > > > turn it on when it's required to support a CPU architecture. > > > > (sorry, I'm well behind list messages, didn't reply earlier) > > > > Does it mean that we get domains enabled even for ARMv7 when ARMv6 is > > built in the same kernel? The side effect is that user read-only > > addresses are writable by the kernel and SWP emulation no longer > > works. > > It means that a kernel with ARMv6 through to ARMv7 will have CPU > domains enabled. So maybe we want: > > config CPU_32v6 > select CPU_USE_DOMAINS if !CPU_V6K && MMU > > instead? Does this mean that we could still configure a kernel to run on CPU_V6 with domains disabled? The vectors page becomes read-only and setting the TLS would fail. My point is that we may want SWP_EMULATE disabled (or depending on ! CPU_USE_DOMAINS). With domains enabled every read-only user page is writeable by the kernel. This has the side-effect that SWP emulation using LDREX/STREX breaks COW. We could change early_trap_init() to always use the vectors_page rather than the high mapping and determine at run-time (patch the code) whether set_pte_ext sets R/W kernel permissions for RO user pages. -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html