2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
8 #include "asm/pgalloc.h"
9 #include "asm/tlbflush.h"
10 #include "choose-mode.h"
11 #include "mode_kern.h"
13 void flush_tlb_page(struct vm_area_struct
*vma
, unsigned long address
)
16 flush_tlb_range(vma
, address
, address
+ PAGE_SIZE
);
19 void flush_tlb_all(void)
21 flush_tlb_mm(current
->mm
);
24 void flush_tlb_kernel_range(unsigned long start
, unsigned long end
)
26 CHOOSE_MODE_PROC(flush_tlb_kernel_range_tt
,
27 flush_tlb_kernel_range_skas
, start
, end
);
30 void flush_tlb_kernel_vm(void)
32 CHOOSE_MODE(flush_tlb_kernel_vm_tt(), flush_tlb_kernel_vm_skas());
35 void __flush_tlb_one(unsigned long addr
)
37 CHOOSE_MODE_PROC(__flush_tlb_one_tt
, __flush_tlb_one_skas
, addr
);
40 void flush_tlb_range(struct vm_area_struct
*vma
, unsigned long start
,
43 CHOOSE_MODE_PROC(flush_tlb_range_tt
, flush_tlb_range_skas
, vma
, start
,
47 void flush_tlb_mm(struct mm_struct
*mm
)
49 CHOOSE_MODE_PROC(flush_tlb_mm_tt
, flush_tlb_mm_skas
, mm
);
52 void force_flush_all(void)
54 CHOOSE_MODE(force_flush_all_tt(), force_flush_all_skas());
57 pgd_t
*pgd_offset_proc(struct mm_struct
*mm
, unsigned long address
)
59 return(pgd_offset(mm
, address
));
62 pmd_t
*pmd_offset_proc(pgd_t
*pgd
, unsigned long address
)
64 return(pmd_offset(pgd
, address
));
67 pte_t
*pte_offset_proc(pmd_t
*pmd
, unsigned long address
)
69 return(pte_offset_kernel(pmd
, address
));
72 pte_t
*addr_pte(struct task_struct
*task
, unsigned long addr
)
74 return(pte_offset_kernel(pmd_offset(pgd_offset(task
->mm
, addr
), addr
),
79 * Overrides for Emacs so that we follow Linus's tabbing style.
80 * Emacs will notice this stuff at the end of the file and automatically
81 * adjust the settings for this buffer only. This must remain at the end
83 * ---------------------------------------------------------------------------
85 * c-file-style: "linux"