blob: dadf38622c5301066d7d745fb4fa892c8b8f6e2f [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 Cheng654325d2012-03-07 21:13:49 -080010 *** 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 Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ASM_GENERIC_PGTABLE_H
20#define _ASM_GENERIC_PGTABLE_H
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#ifndef __HAVE_ARCH_PTEP_ESTABLISH
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#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 Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080030#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#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 Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#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 Project1dc9e472009-03-03 19:28:35 -080037#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039#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 Project1dc9e472009-03-03 19:28:35 -080041#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 Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080045#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 Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049#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 Project1dc9e472009-03-03 19:28:35 -080052#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#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 Project1dc9e472009-03-03 19:28:35 -080056#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
57#define pte_clear_full(__mm, __address, __ptep, __full) do { pte_clear((__mm), (__address), (__ptep)); } while (0)
Ben Cheng654325d2012-03-07 21:13:49 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080059#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060#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 Cheng654325d2012-03-07 21:13:49 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080064#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
65struct mm_struct;
66#endif
67#ifndef __HAVE_ARCH_PTE_SAME
Ben Cheng654325d2012-03-07 21:13:49 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080069#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 Cheng654325d2012-03-07 21:13:49 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080074#define pte_maybe_dirty(pte) pte_dirty(pte)
75#else
76#define pte_maybe_dirty(pte) (1)
77#endif
Ben Cheng654325d2012-03-07 21:13:49 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080079#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 Cheng654325d2012-03-07 21:13:49 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080084#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 Cheng654325d2012-03-07 21:13:49 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080089#endif
90#ifndef __HAVE_ARCH_MOVE_PTE
91#define move_pte(pte, prot, old_addr, new_addr) (pte)
92#endif
Ben Cheng654325d2012-03-07 21:13:49 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080094#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 Cheng654325d2012-03-07 21:13:49 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080099#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 Cheng654325d2012-03-07 21:13:49 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800104#endif
105#endif