[Question] flush_dcache_page() need to flush icache?

Ming Lei tom.leiming at gmail.com
Tue Apr 30 06:02:36 EDT 2013


On Tue, Apr 30, 2013 at 5:05 PM, Catalin Marinas
<catalin.marinas at arm.com> wrote:
> On Tue, Apr 30, 2013 at 09:16:16AM +0100, Ming Lei wrote:
>> Looks flush_dcache_page() need to deal with both dcache alias and I/D
>> cache coherency, but set_pte_at() has already run __sync_icache_dcache()
>> to make I/D cache coherency in the path of executable page fault.
>>
>> So could the flushing icache be removed in flush_dcache_page()?
>
> That's the case for (mapping && mapping_mapped(mapping)) where the
> kernel modifies a page cache page which is already mapped in user space
> and we won't get a subsequent set_pte_at() call.

OK, I got it, so looks it is only needed in self-modifying-code case, but I am
wondering why it is always done for all cases of (mapping &&
mapping_mapped(mapping))......

Thanks,
-- 
Ming Lei



More information about the linux-arm-kernel mailing list