• David Gibson's avatar
    [PATCH] powerpc: Add missing icache flushes for hugepages · cbf52afd
    David Gibson authored
    On most powerpc CPUs, the dcache and icache are not coherent so
    between writing and executing a page, the caches must be flushed.
    Userspace programs assume pages given to them by the kernel are icache
    clean, so we must do this flush between the kernel clearing a page and
    it being mapped into userspace for execute.  We were not doing this
    for hugepages, this patch corrects the situation.
    
    We use the same lazy mechanism as we use for normal pages, delaying
    the flush until userspace actually attempts to execute from the page
    in question.
    
    Tested on G5.
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    cbf52afd
mmu.h 12.2 KB