[PATCH 1/2] Fix the I-cache invalidation on ARMv6 and later CPUs
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Nov 9 05:38:36 EST 2010
On Tue, Nov 09, 2010 at 07:34:45PM +0900, Minchan Kim wrote:
> On Tue, Nov 9, 2010 at 7:17 PM, Catalin Marinas <catalin.marinas at arm.com> wrote:
> > Note that these functions are changed slightly in 2.6.37-rc1, but we
> > still do the I-cache flushing.
> >
> > There reason is that the page being modified may already be mapped in
> > user space and may be a code page as well. The kernel may call this
>
> Yes. That's my point. We can't know code or not in that context(ie,
> flush_dcache_page).
And because we don't know, we have to assume that the page does contain
code, so we have to flush the I cache.
> In 2.6.37-rc1, we flushes icache without VM_EXEC check in set_pte_at
> which doesn't have VMA, either.
> Could we move the icache flush to update_mmu_cache again?
No. We moved it to fix a race on SMP - between the PTE being established
and the caches being coherent. Moving it later reintroduces that race
again.
More information about the linux-arm-kernel
mailing list