~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mn10300/include/asm/cacheflush.h

Version: ~ [ linux-5.18-rc6 ] ~ [ linux-5.17.6 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.38 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.114 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.192 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.241 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.277 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.312 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* MN10300 Cache flushing
  2  *
  3  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4  * Written by David Howells (dhowells@redhat.com)
  5  *
  6  * This program is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU General Public Licence
  8  * as published by the Free Software Foundation; either version
  9  * 2 of the Licence, or (at your option) any later version.
 10  */
 11 #ifndef _ASM_CACHEFLUSH_H
 12 #define _ASM_CACHEFLUSH_H
 13 
 14 #ifndef __ASSEMBLY__
 15 
 16 /* Keep includes the same across arches.  */
 17 #include <linux/mm.h>
 18 
 19 /*
 20  * Primitive routines
 21  */
 22 #ifdef CONFIG_MN10300_CACHE_ENABLED
 23 extern void mn10300_local_icache_inv(void);
 24 extern void mn10300_local_icache_inv_page(unsigned long start);
 25 extern void mn10300_local_icache_inv_range(unsigned long start, unsigned long end);
 26 extern void mn10300_local_icache_inv_range2(unsigned long start, unsigned long size);
 27 extern void mn10300_local_dcache_inv(void);
 28 extern void mn10300_local_dcache_inv_page(unsigned long start);
 29 extern void mn10300_local_dcache_inv_range(unsigned long start, unsigned long end);
 30 extern void mn10300_local_dcache_inv_range2(unsigned long start, unsigned long size);
 31 extern void mn10300_icache_inv(void);
 32 extern void mn10300_icache_inv_page(unsigned long start);
 33 extern void mn10300_icache_inv_range(unsigned long start, unsigned long end);
 34 extern void mn10300_icache_inv_range2(unsigned long start, unsigned long size);
 35 extern void mn10300_dcache_inv(void);
 36 extern void mn10300_dcache_inv_page(unsigned long start);
 37 extern void mn10300_dcache_inv_range(unsigned long start, unsigned long end);
 38 extern void mn10300_dcache_inv_range2(unsigned long start, unsigned long size);
 39 #ifdef CONFIG_MN10300_CACHE_WBACK
 40 extern void mn10300_local_dcache_flush(void);
 41 extern void mn10300_local_dcache_flush_page(unsigned long start);
 42 extern void mn10300_local_dcache_flush_range(unsigned long start, unsigned long end);
 43 extern void mn10300_local_dcache_flush_range2(unsigned long start, unsigned long size);
 44 extern void mn10300_local_dcache_flush_inv(void);
 45 extern void mn10300_local_dcache_flush_inv_page(unsigned long start);
 46 extern void mn10300_local_dcache_flush_inv_range(unsigned long start, unsigned long end);
 47 extern void mn10300_local_dcache_flush_inv_range2(unsigned long start, unsigned long size);
 48 extern void mn10300_dcache_flush(void);
 49 extern void mn10300_dcache_flush_page(unsigned long start);
 50 extern void mn10300_dcache_flush_range(unsigned long start, unsigned long end);
 51 extern void mn10300_dcache_flush_range2(unsigned long start, unsigned long size);
 52 extern void mn10300_dcache_flush_inv(void);
 53 extern void mn10300_dcache_flush_inv_page(unsigned long start);
 54 extern void mn10300_dcache_flush_inv_range(unsigned long start, unsigned long end);
 55 extern void mn10300_dcache_flush_inv_range2(unsigned long start, unsigned long size);
 56 #else
 57 #define mn10300_local_dcache_flush()                    do {} while (0)
 58 #define mn10300_local_dcache_flush_page(start)          do {} while (0)
 59 #define mn10300_local_dcache_flush_range(start, end)    do {} while (0)
 60 #define mn10300_local_dcache_flush_range2(start, size)  do {} while (0)
 61 #define mn10300_local_dcache_flush_inv() \
 62                 mn10300_local_dcache_inv()
 63 #define mn10300_local_dcache_flush_inv_page(start) \
 64                 mn10300_local_dcache_inv_page(start)
 65 #define mn10300_local_dcache_flush_inv_range(start, end) \
 66                 mn10300_local_dcache_inv_range(start, end)
 67 #define mn10300_local_dcache_flush_inv_range2(start, size) \
 68                 mn10300_local_dcache_inv_range2(start, size)
 69 #define mn10300_dcache_flush()                          do {} while (0)
 70 #define mn10300_dcache_flush_page(start)                do {} while (0)
 71 #define mn10300_dcache_flush_range(start, end)          do {} while (0)
 72 #define mn10300_dcache_flush_range2(start, size)        do {} while (0)
 73 #define mn10300_dcache_flush_inv()                      mn10300_dcache_inv()
 74 #define mn10300_dcache_flush_inv_page(start) \
 75         mn10300_dcache_inv_page((start))
 76 #define mn10300_dcache_flush_inv_range(start, end) \
 77         mn10300_dcache_inv_range((start), (end))
 78 #define mn10300_dcache_flush_inv_range2(start, size) \
 79         mn10300_dcache_inv_range2((start), (size))
 80 #endif /* CONFIG_MN10300_CACHE_WBACK */
 81 #else
 82 #define mn10300_local_icache_inv()                      do {} while (0)
 83 #define mn10300_local_icache_inv_page(start)            do {} while (0)
 84 #define mn10300_local_icache_inv_range(start, end)      do {} while (0)
 85 #define mn10300_local_icache_inv_range2(start, size)    do {} while (0)
 86 #define mn10300_local_dcache_inv()                      do {} while (0)
 87 #define mn10300_local_dcache_inv_page(start)            do {} while (0)
 88 #define mn10300_local_dcache_inv_range(start, end)      do {} while (0)
 89 #define mn10300_local_dcache_inv_range2(start, size)    do {} while (0)
 90 #define mn10300_local_dcache_flush()                    do {} while (0)
 91 #define mn10300_local_dcache_flush_inv_page(start)      do {} while (0)
 92 #define mn10300_local_dcache_flush_inv()                do {} while (0)
 93 #define mn10300_local_dcache_flush_inv_range(start, end)do {} while (0)
 94 #define mn10300_local_dcache_flush_inv_range2(start, size) do {} while (0)
 95 #define mn10300_local_dcache_flush_page(start)          do {} while (0)
 96 #define mn10300_local_dcache_flush_range(start, end)    do {} while (0)
 97 #define mn10300_local_dcache_flush_range2(start, size)  do {} while (0)
 98 #define mn10300_icache_inv()                            do {} while (0)
 99 #define mn10300_icache_inv_page(start)                  do {} while (0)
100 #define mn10300_icache_inv_range(start, end)            do {} while (0)
101 #define mn10300_icache_inv_range2(start, size)          do {} while (0)
102 #define mn10300_dcache_inv()                            do {} while (0)
103 #define mn10300_dcache_inv_page(start)                  do {} while (0)
104 #define mn10300_dcache_inv_range(start, end)            do {} while (0)
105 #define mn10300_dcache_inv_range2(start, size)          do {} while (0)
106 #define mn10300_dcache_flush()                          do {} while (0)
107 #define mn10300_dcache_flush_inv_page(start)            do {} while (0)
108 #define mn10300_dcache_flush_inv()                      do {} while (0)
109 #define mn10300_dcache_flush_inv_range(start, end)      do {} while (0)
110 #define mn10300_dcache_flush_inv_range2(start, size)    do {} while (0)
111 #define mn10300_dcache_flush_page(start)                do {} while (0)
112 #define mn10300_dcache_flush_range(start, end)          do {} while (0)
113 #define mn10300_dcache_flush_range2(start, size)        do {} while (0)
114 #endif /* CONFIG_MN10300_CACHE_ENABLED */
115 
116 /*
117  * Virtually-indexed cache management (our cache is physically indexed)
118  */
119 #define flush_cache_all()                       do {} while (0)
120 #define flush_cache_mm(mm)                      do {} while (0)
121 #define flush_cache_dup_mm(mm)                  do {} while (0)
122 #define flush_cache_range(mm, start, end)       do {} while (0)
123 #define flush_cache_page(vma, vmaddr, pfn)      do {} while (0)
124 #define flush_cache_vmap(start, end)            do {} while (0)
125 #define flush_cache_vunmap(start, end)          do {} while (0)
126 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
127 #define flush_dcache_page(page)                 do {} while (0)
128 #define flush_dcache_mmap_lock(mapping)         do {} while (0)
129 #define flush_dcache_mmap_unlock(mapping)       do {} while (0)
130 
131 /*
132  * Physically-indexed cache management
133  */
134 #if defined(CONFIG_MN10300_CACHE_FLUSH_ICACHE)
135 extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
136 extern void flush_icache_range(unsigned long start, unsigned long end);
137 #elif defined(CONFIG_MN10300_CACHE_INV_ICACHE)
138 static inline void flush_icache_page(struct vm_area_struct *vma,
139                                      struct page *page)
140 {
141         mn10300_icache_inv_page(page_to_phys(page));
142 }
143 extern void flush_icache_range(unsigned long start, unsigned long end);
144 #else
145 #define flush_icache_range(start, end)          do {} while (0)
146 #define flush_icache_page(vma, pg)              do {} while (0)
147 #endif
148 
149 
150 #define flush_icache_user_range(vma, pg, adr, len) \
151         flush_icache_range(adr, adr + len)
152 
153 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
154         do {                                    \
155                 memcpy(dst, src, len);          \
156                 flush_icache_page(vma, page);   \
157         } while (0)
158 
159 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
160         memcpy(dst, src, len)
161 
162 #endif /* __ASSEMBLY__ */
163 
164 #endif /* _ASM_CACHEFLUSH_H */
165 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp