2 * linux/arch/unicore32/mm/tlb-ucv2.S
4 * Code specific to PKUnity SoC and UniCore ISA
6 * Copyright (C) 2001-2010 GUAN Xue-tao
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/linkage.h>
14 #include <asm/assembler.h>
16 #include <asm/tlbflush.h>
17 #include "proc-macros.S"
20 * __cpu_flush_user_tlb_range(start, end, vma)
22 * Invalidate a range of TLB entries in the specified address space.
24 * - start - start address (may not be aligned)
25 * - end - end address (exclusive, may not be aligned)
26 * - vma - vma_struct describing address range
28 ENTRY(__cpu_flush_user_tlb_range)
29 #ifndef CONFIG_CPU_TLB_SINGLE_ENTRY_DISABLE
30 mov r0, r0 >> #PAGE_SHIFT @ align address
31 mov r0, r0 << #PAGE_SHIFT
32 vma_vm_flags r2, r2 @ get vma->vm_flags
37 cand.a r2, #VM_EXEC @ Executable area ?
50 cand.a r2, #VM_EXEC @ Executable area ?
60 * __cpu_flush_kern_tlb_range(start,end)
62 * Invalidate a range of kernel TLB entries
64 * - start - start address (may not be aligned)
65 * - end - end address (exclusive, may not be aligned)
67 ENTRY(__cpu_flush_kern_tlb_range)
68 #ifndef CONFIG_CPU_TLB_SINGLE_ENTRY_DISABLE
69 mov r0, r0 >> #PAGE_SHIFT @ align address
70 mov r0, r0 << #PAGE_SHIFT