2 * linux/arch/arm/mm/tlb-fa.S
4 * Copyright (C) 2005 Faraday Corp.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * ARM architecture version 4, Faraday variation.
11 * This assume an unified TLBs, with a write buffer, and branch target buffer (BTB)
13 * Processors: FA520 FA526 FA626
14 * 03/31/2005 : Created by Luke Lee, modified from tlb-v4wbi.S
15 * 05/06/2005 : Fixed buggy CPU versions that did not invalidate the associated
16 * data cache entries when invalidating TLB entries.
18 #include <linux/linkage.h>
19 #include <linux/init.h>
20 #include <asm/constants.h>
21 #include <asm/tlbflush.h>
22 #include "proc-macros.S"
26 * flush_user_tlb_range(start, end, mm)
28 * Invalidate a range of TLB entries in the specified address space.
30 * - start - range start address
31 * - end - range end address
32 * - mm - mm_struct describing address space
35 ENTRY(fa_flush_user_tlb_range)
38 act_mm r3 @ get current->active_mm
39 eors r3, ip, r3 @ == mm ?
40 movne pc, lr @ no, we dont do anything
43 #ifndef CONFIG_CPU_FA_WB_DISABLE
44 mcr p15, 0, r3, c7, c10, 4 @ drain WB
51 1: mcr p15, 0, r0, c8, c7, 1 @ invalidate UTLB entry
54 bls 1b @ Luke Lee 05/19/2005 blo -> bls
56 #ifdef CONFIG_CPU_FA_BTB
57 mcr p15, 0, r3, c7, c5, 6 @ invalidate BTB
64 ENTRY(fa_flush_kern_tlb_range)
67 mcr p15, 0, r3, c7, c10, 0 @ clean Dcache all 06/03/2005
69 #ifndef CONFIG_CPU_FA_WB_DISABLE
70 mcr p15, 0, r3, c7, c10, 4 @ drain WB
76 mcr p15, 0, r0, c8, c7, 1 @ invalidate UTLB entry
79 bls 1b @ Luke Lee 05/19/2005 blo -> bls
81 #ifdef CONFIG_CPU_FA_BTB
82 mcr p15, 0, r3, c7, c5, 6 @ invalidate BTB
91 .type fa_tlb_fns, #object
93 .long fa_flush_user_tlb_range
94 .long fa_flush_kern_tlb_range
96 .size fa_tlb_fns, . - fa_tlb_fns