The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _ASM_GENERIC__TLB_H |
| 13 | #define _ASM_GENERIC__TLB_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <linux/swap.h> |
| 16 | #include <asm/pgalloc.h> |
| 17 | #include <asm/tlbflush.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 18 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | #define FREE_PTE_NR 1 |
| 20 | #define tlb_fast_mode(tlb) 1 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 21 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 22 | struct mmu_gather { |
| 23 | struct mm_struct *mm; |
| 24 | unsigned int nr; |
| 25 | unsigned int need_flush; |
| 26 | unsigned int fullmm; |
| 27 | struct page * pages[FREE_PTE_NR]; |
| 28 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 29 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 30 | #define tlb_remove_tlb_entry(tlb, ptep, address) do { tlb->need_flush = 1; __tlb_remove_tlb_entry(tlb, ptep, address); } while (0) |
| 31 | #define pte_free_tlb(tlb, ptep) do { tlb->need_flush = 1; __pte_free_tlb(tlb, ptep); } while (0) |
| 32 | #ifndef __ARCH_HAS_4LEVEL_HACK |
| 33 | #define pud_free_tlb(tlb, pudp) do { tlb->need_flush = 1; __pud_free_tlb(tlb, pudp); } while (0) |
| 34 | #endif |
| 35 | #define pmd_free_tlb(tlb, pmdp) do { tlb->need_flush = 1; __pmd_free_tlb(tlb, pmdp); } while (0) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 36 | #define tlb_migrate_finish(mm) do {} while (0) |
| 37 | #endif |