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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _ASM_GENERIC_PGTABLE_H |
| 20 | #define _ASM_GENERIC_PGTABLE_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #ifndef __HAVE_ARCH_PTEP_ESTABLISH |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 22 | #ifndef __HAVE_ARCH_SET_PTE_ATOMIC |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | #define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0) |
| 25 | #else |
| 26 | #define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_atomic(__ptep, __entry); flush_tlb_page(__vma, __address); } while (0) |
| 27 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 30 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0) |
| 32 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
| 35 | #define ptep_test_and_clear_young(__vma, __address, __ptep) ({ pte_t __pte = *(__ptep); int r = 1; if (!pte_young(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkold(__pte)); r; }) |
| 36 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 37 | #ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | #define ptep_clear_flush_young(__vma, __address, __ptep) ({ int __young; __young = ptep_test_and_clear_young(__vma, __address, __ptep); if (__young) flush_tlb_page(__vma, __address); __young; }) |
| 40 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 41 | #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
| 42 | #define ptep_test_and_clear_dirty(__vma, __address, __ptep) ({ pte_t __pte = *__ptep; int r = 1; if (!pte_dirty(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkclean(__pte)); r; }) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 45 | #ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH |
| 46 | #define ptep_clear_flush_dirty(__vma, __address, __ptep) ({ int __dirty; __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); if (__dirty) flush_tlb_page(__vma, __address); __dirty; }) |
| 47 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR |
| 50 | #define ptep_get_and_clear(__mm, __address, __ptep) ({ pte_t __pte = *(__ptep); pte_clear((__mm), (__address), (__ptep)); __pte; }) |
| 51 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | #define ptep_get_and_clear_full(__mm, __address, __ptep, __full) ({ pte_t __pte; __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); __pte; }) |
| 55 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | #ifndef __HAVE_ARCH_PTE_CLEAR_FULL |
| 57 | #define pte_clear_full(__mm, __address, __ptep, __full) do { pte_clear((__mm), (__address), (__ptep)); } while (0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH |
| 61 | #define ptep_clear_flush(__vma, __address, __ptep) ({ pte_t __pte; __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); flush_tlb_page(__vma, __address); __pte; }) |
| 62 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT |
| 65 | struct mm_struct; |
| 66 | #endif |
| 67 | #ifndef __HAVE_ARCH_PTE_SAME |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | #define pte_same(A,B) (pte_val(A) == pte_val(B)) |
| 70 | #endif |
| 71 | #ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY |
| 72 | #define page_test_and_clear_dirty(page) (0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | #define pte_maybe_dirty(pte) pte_dirty(pte) |
| 75 | #else |
| 76 | #define pte_maybe_dirty(pte) (1) |
| 77 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | #ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG |
| 80 | #define page_test_and_clear_young(page) (0) |
| 81 | #endif |
| 82 | #ifndef __HAVE_ARCH_PGD_OFFSET_GATE |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 84 | #define pgd_offset_gate(mm, addr) pgd_offset(mm, addr) |
| 85 | #endif |
| 86 | #ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE |
| 87 | #define lazy_mmu_prot_update(pte) do { } while (0) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 89 | #endif |
| 90 | #ifndef __HAVE_ARCH_MOVE_PTE |
| 91 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
| 92 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | #define pgd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); }) |
| 95 | #ifndef pud_addr_end |
| 96 | #define pud_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); }) |
| 97 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 99 | #ifndef pmd_addr_end |
| 100 | #define pmd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); }) |
| 101 | #endif |
| 102 | #ifndef __ASSEMBLY__ |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | #endif |
| 105 | #endif |