Changeset 89c57b6 in mainline for kernel/arch/amd64/include/mm/page.h
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/mm/page.h
rcefb126 r89c57b6 46 46 47 47 #include <arch/mm/frame.h> 48 #include <trace.h> 48 49 49 50 #define PAGE_WIDTH FRAME_WIDTH … … 54 55 #ifndef __ASM__ 55 56 56 #define KA2PA(x) (((uintptr_t) (x)) - 0xffff800000000000)57 #define PA2KA(x) (((uintptr_t) (x)) + 0xffff800000000000)57 #define KA2PA(x) (((uintptr_t) (x)) - UINT64_C(0xffff800000000000)) 58 #define PA2KA(x) (((uintptr_t) (x)) + UINT64_C(0xffff800000000000)) 58 59 59 60 #else /* __ASM__ */ … … 77 78 78 79 /* Macros calculating indices into page tables in each level. */ 79 #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 39) & 0x1ff )80 #define PTL1_INDEX_ARCH(vaddr) (((vaddr) >> 30) & 0x1ff )81 #define PTL2_INDEX_ARCH(vaddr) (((vaddr) >> 21) & 0x1ff )82 #define PTL3_INDEX_ARCH(vaddr) (((vaddr) >> 12) & 0x1ff )80 #define PTL0_INDEX_ARCH(vaddr) (((vaddr) >> 39) & 0x1ffU) 81 #define PTL1_INDEX_ARCH(vaddr) (((vaddr) >> 30) & 0x1ffU) 82 #define PTL2_INDEX_ARCH(vaddr) (((vaddr) >> 21) & 0x1ffU) 83 #define PTL3_INDEX_ARCH(vaddr) (((vaddr) >> 12) & 0x1ffU) 83 84 84 85 /* Get PTE address accessors for each level. */ … … 187 188 } __attribute__ ((packed)) pte_t; 188 189 189 static inline unsigned int get_pt_flags(pte_t *pt, size_t i)190 NO_TRACE static inline unsigned int get_pt_flags(pte_t *pt, size_t i) 190 191 { 191 192 pte_t *p = &pt[i]; … … 200 201 } 201 202 202 static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a)203 NO_TRACE static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a) 203 204 { 204 205 pte_t *p = &pt[i]; 205 206 206 p->addr_12_31 = (a >> 12) & 0xfffff;207 p->addr_12_31 = (a >> 12) & UINT32_C(0xfffff); 207 208 p->addr_32_51 = a >> 32; 208 209 } 209 210 210 static inline void set_pt_flags(pte_t *pt, size_t i, int flags)211 NO_TRACE static inline void set_pt_flags(pte_t *pt, size_t i, int flags) 211 212 { 212 213 pte_t *p = &pt[i];
Note:
See TracChangeset
for help on using the changeset viewer.