17 #include <linux/signal.h>
18 #include <linux/sched.h>
19 #include <linux/kernel.h>
20 #include <linux/errno.h>
21 #include <linux/string.h>
22 #include <linux/types.h>
23 #include <linux/ptrace.h>
28 #include <asm/bootparam.h>
29 #include <asm/mmu_context.h>
31 #include <asm/tlbflush.h>
33 #include <asm/pgalloc.h>
34 #include <asm/pgtable.h>
37 #define printd(x...) do { } while(0)
62 #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
80 if (mapping && !mapping_mapped(mapping)) {
89 unsigned long alias = !(DCACHE_ALIAS_EQ(temp, phys));
99 if (!alias && !mapping)
102 __flush_invalidate_dcache_page((
long)
page_address(page));
107 __flush_invalidate_dcache_page_alias(virt, phys);
110 __invalidate_icache_page_alias(virt, phys);
122 unsigned long start,
unsigned long end)
124 __flush_invalidate_dcache_all();
125 __invalidate_icache_all();
141 unsigned long virt =
TLBTEMP_BASE_1 + (address & DCACHE_ALIAS_MASK);
143 __flush_invalidate_dcache_page_alias(virt, phys);
144 __invalidate_icache_page_alias(virt, phys);
152 unsigned long pfn =
pte_pfn(*ptep);
162 invalidate_itlb_mapping(addr);
163 invalidate_dtlb_mapping(addr);
165 #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
173 __flush_invalidate_dcache_page(paddr);
175 __flush_invalidate_dcache_page_alias(vaddr, phys);
176 __invalidate_icache_page_alias(vaddr, phys);
182 && (vma->
vm_flags & VM_EXEC) != 0) {
185 __invalidate_icache_page(paddr);
196 #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
203 unsigned long alias = !(DCACHE_ALIAS_EQ(vaddr, phys));
209 __flush_invalidate_dcache_page_alias(temp, phys);
224 __flush_invalidate_dcache_range((
unsigned long) dst, len);
225 if ((vma->
vm_flags & VM_EXEC) != 0) {
226 __invalidate_icache_page_alias(temp, phys);
229 }
else if ((vma->
vm_flags & VM_EXEC) != 0) {
231 __invalidate_icache_range((
unsigned long) dst, len);
236 unsigned long vaddr,
void *dst,
const void *src,
240 unsigned long alias = !(DCACHE_ALIAS_EQ(vaddr, phys));
248 unsigned long temp =
TLBTEMP_BASE_1 + (vaddr & DCACHE_ALIAS_MASK);
249 __flush_invalidate_dcache_page_alias(temp, phys);