]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
arm/highmem: flush tlb on unmap
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 11 Mar 2013 20:37:27 +0000 (21:37 +0100)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:36 +0000 (09:47 +0200)
The tlb should be flushed on unmap and thus make the mapping entry
invalid. This is only done in the non-debug case which does not look
right.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
arch/arm/mm/highmem.c

index ee8dfa793989785488a306a9edd8b7899f3f1f3b..8bc413e6db2ace481951ebff660765f583086df4 100644 (file)
@@ -112,10 +112,10 @@ void __kunmap_atomic(void *kvaddr)
                        __cpuc_flush_dcache_area((void *)vaddr, PAGE_SIZE);
 #ifdef CONFIG_DEBUG_HIGHMEM
                BUG_ON(vaddr != __fix_to_virt(idx));
-               set_fixmap_pte(idx, __pte(0));
 #else
                (void) idx;  /* to kill a warning */
 #endif
+               set_fixmap_pte(idx, __pte(0));
                kmap_atomic_idx_pop();
        } else if (vaddr >= PKMAP_ADDR(0) && vaddr < PKMAP_ADDR(LAST_PKMAP)) {
                /* this address was obtained through kmap_high_get() */