Changeset 98000fb in mainline for kernel/arch/amd64/include/mm/page.h
- Timestamp:
- 2009-06-03T19:34:45Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/mm/page.h
r69e68e3 r98000fb 113 113 (write_cr3((uintptr_t) (ptl0))) 114 114 #define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ 115 set_pt_addr((pte_t *) (ptl0), ( index_t) (i), a)115 set_pt_addr((pte_t *) (ptl0), (size_t) (i), a) 116 116 #define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) \ 117 set_pt_addr((pte_t *) (ptl1), ( index_t) (i), a)117 set_pt_addr((pte_t *) (ptl1), (size_t) (i), a) 118 118 #define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) \ 119 set_pt_addr((pte_t *) (ptl2), ( index_t) (i), a)119 set_pt_addr((pte_t *) (ptl2), (size_t) (i), a) 120 120 #define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ 121 set_pt_addr((pte_t *) (ptl3), ( index_t) (i), a)121 set_pt_addr((pte_t *) (ptl3), (size_t) (i), a) 122 122 123 123 /* Get PTE flags accessors for each level. */ 124 124 #define GET_PTL1_FLAGS_ARCH(ptl0, i) \ 125 get_pt_flags((pte_t *) (ptl0), ( index_t) (i))125 get_pt_flags((pte_t *) (ptl0), (size_t) (i)) 126 126 #define GET_PTL2_FLAGS_ARCH(ptl1, i) \ 127 get_pt_flags((pte_t *) (ptl1), ( index_t) (i))127 get_pt_flags((pte_t *) (ptl1), (size_t) (i)) 128 128 #define GET_PTL3_FLAGS_ARCH(ptl2, i) \ 129 get_pt_flags((pte_t *) (ptl2), ( index_t) (i))129 get_pt_flags((pte_t *) (ptl2), (size_t) (i)) 130 130 #define GET_FRAME_FLAGS_ARCH(ptl3, i) \ 131 get_pt_flags((pte_t *) (ptl3), ( index_t) (i))131 get_pt_flags((pte_t *) (ptl3), (size_t) (i)) 132 132 133 133 /* Set PTE flags accessors for each level. */ 134 134 #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ 135 set_pt_flags((pte_t *) (ptl0), ( index_t) (i), (x))135 set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) 136 136 #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) \ 137 set_pt_flags((pte_t *) (ptl1), ( index_t) (i), (x))137 set_pt_flags((pte_t *) (ptl1), (size_t) (i), (x)) 138 138 #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) \ 139 set_pt_flags((pte_t *) (ptl2), ( index_t) (i), (x))139 set_pt_flags((pte_t *) (ptl2), (size_t) (i), (x)) 140 140 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ 141 set_pt_flags((pte_t *) (ptl3), ( index_t) (i), (x))141 set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) 142 142 143 143 /* Macros for querying the last-level PTE entries. */ … … 177 177 #define PFERR_CODE_ID (1 << 4) 178 178 179 static inline int get_pt_flags(pte_t *pt, index_t i)179 static inline int get_pt_flags(pte_t *pt, size_t i) 180 180 { 181 181 pte_t *p = &pt[i]; … … 190 190 } 191 191 192 static inline void set_pt_addr(pte_t *pt, index_t i, uintptr_t a)192 static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a) 193 193 { 194 194 pte_t *p = &pt[i]; … … 198 198 } 199 199 200 static inline void set_pt_flags(pte_t *pt, index_t i, int flags)200 static inline void set_pt_flags(pte_t *pt, size_t i, int flags) 201 201 { 202 202 pte_t *p = &pt[i];
Note:
See TracChangeset
for help on using the changeset viewer.