.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu> |
---|
3 | 4 | * Copyright (C) 2007-2009 PetaLogix |
---|
.. | .. |
---|
5 | 6 | * based on v850 version which was |
---|
6 | 7 | * Copyright (C) 2001,02,03 NEC Electronics Corporation |
---|
7 | 8 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> |
---|
8 | | - * |
---|
9 | | - * This file is subject to the terms and conditions of the GNU General |
---|
10 | | - * Public License. See the file COPYING in the main directory of this |
---|
11 | | - * archive for more details. |
---|
12 | | - * |
---|
13 | 9 | */ |
---|
14 | 10 | |
---|
15 | 11 | #ifndef _ASM_MICROBLAZE_CACHEFLUSH_H |
---|
.. | .. |
---|
61 | 57 | #define invalidate_icache() mbc->iin(); |
---|
62 | 58 | #define invalidate_icache_range(start, end) mbc->iinr(start, end); |
---|
63 | 59 | |
---|
64 | | -#define flush_icache_user_range(vma, pg, adr, len) flush_icache(); |
---|
65 | | -#define flush_icache_page(vma, pg) do { } while (0) |
---|
66 | | - |
---|
67 | 60 | #define enable_dcache() mbc->de(); |
---|
68 | 61 | #define disable_dcache() mbc->dd(); |
---|
69 | 62 | /* FIXME for LL-temac driver */ |
---|
.. | .. |
---|
81 | 74 | flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \ |
---|
82 | 75 | } while (0); |
---|
83 | 76 | |
---|
84 | | -#define flush_dcache_mmap_lock(mapping) do { } while (0) |
---|
85 | | -#define flush_dcache_mmap_unlock(mapping) do { } while (0) |
---|
86 | | - |
---|
87 | | -#define flush_cache_dup_mm(mm) do { } while (0) |
---|
88 | | -#define flush_cache_vmap(start, end) do { } while (0) |
---|
89 | | -#define flush_cache_vunmap(start, end) do { } while (0) |
---|
90 | | -#define flush_cache_mm(mm) do { } while (0) |
---|
91 | | - |
---|
92 | 77 | #define flush_cache_page(vma, vmaddr, pfn) \ |
---|
93 | 78 | flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE); |
---|
94 | | - |
---|
95 | | -/* MS: kgdb code use this macro, wrong len with FLASH */ |
---|
96 | | -#if 0 |
---|
97 | | -#define flush_cache_range(vma, start, len) { \ |
---|
98 | | - flush_icache_range((unsigned) (start), (unsigned) (start) + (len)); \ |
---|
99 | | - flush_dcache_range((unsigned) (start), (unsigned) (start) + (len)); \ |
---|
100 | | -} |
---|
101 | | -#endif |
---|
102 | | - |
---|
103 | | -#define flush_cache_range(vma, start, len) do { } while (0) |
---|
104 | 79 | |
---|
105 | 80 | static inline void copy_to_user_page(struct vm_area_struct *vma, |
---|
106 | 81 | struct page *page, unsigned long vaddr, |
---|
.. | .. |
---|
113 | 88 | flush_dcache_range(addr, addr + PAGE_SIZE); |
---|
114 | 89 | } |
---|
115 | 90 | } |
---|
| 91 | +#define copy_to_user_page copy_to_user_page |
---|
116 | 92 | |
---|
117 | | -static inline void copy_from_user_page(struct vm_area_struct *vma, |
---|
118 | | - struct page *page, unsigned long vaddr, |
---|
119 | | - void *dst, void *src, int len) |
---|
120 | | -{ |
---|
121 | | - memcpy(dst, src, len); |
---|
122 | | -} |
---|
| 93 | +#include <asm-generic/cacheflush.h> |
---|
123 | 94 | |
---|
124 | 95 | #endif /* _ASM_MICROBLAZE_CACHEFLUSH_H */ |
---|