tlbflush.h (e5451c8f8330e03ad3cfa16048b4daf961af434f) tlbflush.h (195568a10a264a733ec7151a657ab054a0af768f)
1/*
2 * 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 *

--- 12 unchanged lines hidden (view full) ---

21
22struct mm_struct;
23
24/*
25 * TLB flushing:
26 *
27 * - flush_tlb_all() flushes all processes TLB entries
28 * - flush_tlb_mm(mm) flushes the specified mm context TLB entries
1/*
2 * 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 *

--- 12 unchanged lines hidden (view full) ---

21
22struct mm_struct;
23
24/*
25 * TLB flushing:
26 *
27 * - flush_tlb_all() flushes all processes TLB entries
28 * - flush_tlb_mm(mm) flushes the specified mm context TLB entries
29 * - flush_tlb_page(vma, vmaddr) flushes one page
30 * - flush_tlb_range(vma, start, end) flushes a range of pages
29 * - flush_tlb_range(vma, start, end) flushes a range of pages
30 * - flush_tlb_page(vma, address) flushes a page
31 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
31 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
32 * - flush_tlb_kernel_page(address) flushes a kernel page
32 */
33extern void flush_tlb_all(void);
34extern void flush_tlb_mm(struct mm_struct *mm);
35extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
36 unsigned long end);
37extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
33 */
34extern void flush_tlb_all(void);
35extern void flush_tlb_mm(struct mm_struct *mm);
36extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
37 unsigned long end);
38extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
38extern void flush_tlb_one(unsigned long vaddr);
39
40static inline void flush_tlb_page(struct vm_area_struct *vma,
39
40static inline void flush_tlb_page(struct vm_area_struct *vma,
41 unsigned long addr)
41 unsigned long address)
42{
42{
43 flush_tlb_one(addr);
43 flush_tlb_range(vma, address, address + PAGE_SIZE);
44}
45
44}
45
46static inline void flush_tlb_kernel_page(unsigned long address)
47{
48 flush_tlb_kernel_range(address, address + PAGE_SIZE);
49}
50
46#endif /* _ASM_NIOS2_TLBFLUSH_H */
51#endif /* _ASM_NIOS2_TLBFLUSH_H */