10 #include <linux/module.h>
15 #include <asm/cacheflush.h>
16 #include <asm/cachetype.h>
17 #include <asm/highmem.h>
19 #include <asm/tlbflush.h>
23 #ifdef CONFIG_CPU_CACHE_VIPT
30 set_top_pte(to,
pfn_pte(pfn, PAGE_KERNEL));
32 asm(
"mcrr p15, 0, %1, %0, c14\n"
33 " mcr p15, 0, %2, c7, c10, 4"
39 static void flush_icache_alias(
unsigned long pfn,
unsigned long vaddr,
unsigned long len)
45 set_top_pte(va,
pfn_pte(pfn, PAGE_KERNEL));
53 vivt_flush_cache_mm(mm);
58 asm(
"mcr p15, 0, %0, c7, c14, 0\n"
59 " mcr p15, 0, %0, c7, c10, 4"
69 vivt_flush_cache_range(vma, start, end);
74 asm(
"mcr p15, 0, %0, c7, c14, 0\n"
75 " mcr p15, 0, %0, c7, c10, 4"
88 vivt_flush_cache_page(vma, user_addr, pfn);
102 #define flush_pfn_alias(pfn,vaddr) do { } while (0)
103 #define flush_icache_alias(pfn,vaddr,len) do { } while (0)
106 static void flush_ptrace_access_other(
void *args)
108 __flush_icache_all();
113 unsigned long uaddr,
void *kaddr,
unsigned long len)
117 unsigned long addr = (
unsigned long)kaddr;
125 __flush_icache_all();
131 unsigned long addr = (
unsigned long)kaddr;
150 unsigned long uaddr,
void *
dst,
const void *
src,
157 flush_ptrace_access(vma, page, uaddr, dst, len);
170 if (!PageHighMem(page)) {
210 vma_interval_tree_foreach(mpnt, &mapping->
i_mmap, pgoff, pgoff) {
216 if (mpnt->
vm_mm != mm)
218 if (!(mpnt->
vm_flags & VM_MAYSHARE))
226 #if __LINUX_ARM_ARCH__ >= 6
242 mapping = page_mapping(page);
250 __flush_icache_all();
284 mapping = page_mapping(page);
287 mapping && !mapping_mapped(mapping))
292 __flush_dcache_aliases(mapping, page);
294 __flush_icache_all();
329 __flush_icache_all();