diff options
author | Julien Beraud <julien.beraud@spectracom.orolia.com> | 2017-04-05 15:03:44 +0800 |
---|---|---|
committer | Ley Foon Tan <ley.foon.tan@intel.com> | 2017-05-08 16:59:19 +0800 |
commit | 4b40c1c092a932b5b5ab8154235080f02ae19a34 (patch) | |
tree | ad76a5b1939e5965f12e129dade15c1b8de477d7 | |
parent | 44a4ed42576da5f3387005a1667cb3e7aedfd687 (diff) | |
download | linux-4b40c1c092a932b5b5ab8154235080f02ae19a34.tar.bz2 |
nios2: implement flush_dcache_mmap_lock/unlock
Use spin_lock/unlock_irq instead of doing nothing. This fixes corruptions
of the vma_interval_tree causing the kernel to be stuck in an
infinite loop in vma_interval_tree_foreach.
Signed-off-by: Julien Beraud <julien.beraud@spectracom.orolia.com>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
-rw-r--r-- | arch/nios2/include/asm/cacheflush.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/nios2/include/asm/cacheflush.h b/arch/nios2/include/asm/cacheflush.h index 52abba973dc2..55e383c173f7 100644 --- a/arch/nios2/include/asm/cacheflush.h +++ b/arch/nios2/include/asm/cacheflush.h @@ -46,7 +46,9 @@ extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page, extern void flush_dcache_range(unsigned long start, unsigned long end); extern void invalidate_dcache_range(unsigned long start, unsigned long end); -#define flush_dcache_mmap_lock(mapping) do { } while (0) -#define flush_dcache_mmap_unlock(mapping) do { } while (0) +#define flush_dcache_mmap_lock(mapping) \ + spin_lock_irq(&(mapping)->tree_lock) +#define flush_dcache_mmap_unlock(mapping) \ + spin_unlock_irq(&(mapping)->tree_lock) #endif /* _ASM_NIOS2_CACHEFLUSH_H */ |