mirror of https://gitee.com/openkylin/linux.git
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Michal Simek <monstr@monstr.eu> Link: http://lkml.kernel.org/r/20200515143646.3857579-14-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
57b94ff597
commit
03518c82b4
|
@ -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 { \
|
||||||
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,
|
||||||
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 */
|
||||||
|
|
Loading…
Reference in New Issue