Commit 03518c82 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

microblaze: use asm-generic/cacheflush.h

Microblaze needs almost no cache flushing routines of its own.  Rely on
asm-generic/cacheflush.h for the defaults.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Michal Simek <monstr@monstr.eu>
Link: http://lkml.kernel.org/r/20200515143646.3857579-14-hch@lst.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 57b94ff5
...@@ -57,9 +57,6 @@ void microblaze_cache_init(void); ...@@ -57,9 +57,6 @@ void microblaze_cache_init(void);
#define invalidate_icache() mbc->iin(); #define invalidate_icache() mbc->iin();
#define invalidate_icache_range(start, end) mbc->iinr(start, end); #define invalidate_icache_range(start, end) mbc->iinr(start, end);
#define flush_icache_user_range(vma, pg, adr, len) flush_icache();
#define flush_icache_page(vma, pg) do { } while (0)
#define enable_dcache() mbc->de(); #define enable_dcache() mbc->de();
#define disable_dcache() mbc->dd(); #define disable_dcache() mbc->dd();
/* FIXME for LL-temac driver */ /* FIXME for LL-temac driver */
...@@ -77,27 +74,9 @@ do { \ ...@@ -77,27 +74,9 @@ do { \
flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \ flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \
} while (0); } while (0);
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
#define flush_cache_dup_mm(mm) do { } while (0)
#define flush_cache_vmap(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_page(vma, vmaddr, pfn) \ #define flush_cache_page(vma, vmaddr, pfn) \
flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE); flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE);
/* MS: kgdb code use this macro, wrong len with FLASH */
#if 0
#define flush_cache_range(vma, start, len) { \
flush_icache_range((unsigned) (start), (unsigned) (start) + (len)); \
flush_dcache_range((unsigned) (start), (unsigned) (start) + (len)); \
}
#endif
#define flush_cache_range(vma, start, len) do { } while (0)
static inline void copy_to_user_page(struct vm_area_struct *vma, static inline void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, struct page *page, unsigned long vaddr,
void *dst, void *src, int len) void *dst, void *src, int len)
...@@ -109,12 +88,8 @@ static inline void copy_to_user_page(struct vm_area_struct *vma, ...@@ -109,12 +88,8 @@ static inline void copy_to_user_page(struct vm_area_struct *vma,
flush_dcache_range(addr, addr + PAGE_SIZE); flush_dcache_range(addr, addr + PAGE_SIZE);
} }
} }
#define copy_to_user_page copy_to_user_page
static inline void copy_from_user_page(struct vm_area_struct *vma, #include <asm-generic/cacheflush.h>
struct page *page, unsigned long vaddr,
void *dst, void *src, int len)
{
memcpy(dst, src, len);
}
#endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */ #endif /* _ASM_MICROBLAZE_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