Commit 4b40c1c0 authored by Julien Beraud's avatar Julien Beraud Committed by Ley Foon Tan

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: default avatarJulien Beraud <julien.beraud@spectracom.orolia.com>
Acked-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
parent 44a4ed42
...@@ -46,7 +46,9 @@ extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page, ...@@ -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 flush_dcache_range(unsigned long start, unsigned long end);
extern void invalidate_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_lock(mapping) \
#define flush_dcache_mmap_unlock(mapping) do { } while (0) spin_lock_irq(&(mapping)->tree_lock)
#define flush_dcache_mmap_unlock(mapping) \
spin_unlock_irq(&(mapping)->tree_lock)
#endif /* _ASM_NIOS2_CACHEFLUSH_H */ #endif /* _ASM_NIOS2_CACHEFLUSH_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment