.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch> |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License as published by |
---|
6 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | | - * |
---|
14 | | - * You should have received a copy of the GNU General Public License |
---|
15 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | | - * |
---|
17 | 4 | */ |
---|
18 | 5 | |
---|
19 | 6 | #ifndef _ASM_NIOS2_TLBFLUSH_H |
---|
.. | .. |
---|
26 | 13 | * |
---|
27 | 14 | * - flush_tlb_all() flushes all processes TLB entries |
---|
28 | 15 | * - flush_tlb_mm(mm) flushes the specified mm context TLB entries |
---|
29 | | - * - flush_tlb_page(vma, vmaddr) flushes one page |
---|
30 | 16 | * - flush_tlb_range(vma, start, end) flushes a range of pages |
---|
| 17 | + * - flush_tlb_page(vma, address) flushes a page |
---|
31 | 18 | * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages |
---|
| 19 | + * - flush_tlb_kernel_page(address) flushes a kernel page |
---|
| 20 | + * |
---|
| 21 | + * - reload_tlb_page(vma, address, pte) flushes the TLB for address like |
---|
| 22 | + * flush_tlb_page, then replaces it with a TLB for pte. |
---|
32 | 23 | */ |
---|
33 | 24 | extern void flush_tlb_all(void); |
---|
34 | 25 | extern void flush_tlb_mm(struct mm_struct *mm); |
---|
35 | 26 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, |
---|
36 | 27 | unsigned long end); |
---|
37 | 28 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); |
---|
38 | | -extern void flush_tlb_one(unsigned long vaddr); |
---|
39 | 29 | |
---|
40 | 30 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
---|
41 | | - unsigned long addr) |
---|
| 31 | + unsigned long address) |
---|
42 | 32 | { |
---|
43 | | - flush_tlb_one(addr); |
---|
| 33 | + flush_tlb_range(vma, address, address + PAGE_SIZE); |
---|
44 | 34 | } |
---|
45 | 35 | |
---|
| 36 | +static inline void flush_tlb_kernel_page(unsigned long address) |
---|
| 37 | +{ |
---|
| 38 | + flush_tlb_kernel_range(address, address + PAGE_SIZE); |
---|
| 39 | +} |
---|
| 40 | + |
---|
| 41 | +extern void reload_tlb_page(struct vm_area_struct *vma, unsigned long addr, |
---|
| 42 | + pte_t pte); |
---|
| 43 | + |
---|
46 | 44 | #endif /* _ASM_NIOS2_TLBFLUSH_H */ |
---|