]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/ppc_mmu_32.c
powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / ppc_mmu_32.c
index 45d925360b89aa3a2b17f71daa2a823f6b11c7ef..fe65c405412c55018f9d71e0f6a437e292a1dcf5 100644 (file)
@@ -123,9 +123,9 @@ void __init setbat(int index, unsigned long virt, phys_addr_t phys,
        int wimgxpp;
        struct ppc_bat *bat = BATS[index];
 
-       if (((flags & _PAGE_NO_CACHE) == 0) &&
-           cpu_has_feature(CPU_FTR_NEED_COHERENT))
-               flags |= _PAGE_COHERENT;
+       if ((flags & _PAGE_NO_CACHE) ||
+           (cpu_has_feature(CPU_FTR_NEED_COHERENT) == 0))
+               flags &= ~_PAGE_COHERENT;
 
        bl = (size >> 17) - 1;
        if (PVR_VER(mfspr(SPRN_PVR)) != 1) {