Changeset 89c57b6 in mainline for kernel/generic/include/mm/frame.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/generic/include/mm/frame.h
rcefb126 r89c57b6 38 38 39 39 #include <typedefs.h> 40 #include <trace.h> 40 41 #include <adt/list.h> 41 42 #include <mm/buddy.h> … … 115 116 extern zones_t zones; 116 117 117 static inline uintptr_t PFN2ADDR(pfn_t frame)118 NO_TRACE static inline uintptr_t PFN2ADDR(pfn_t frame) 118 119 { 119 120 return (uintptr_t) (frame << FRAME_WIDTH); 120 121 } 121 122 122 static inline pfn_t ADDR2PFN(uintptr_t addr)123 NO_TRACE static inline pfn_t ADDR2PFN(uintptr_t addr) 123 124 { 124 125 return (pfn_t) (addr >> FRAME_WIDTH); 125 126 } 126 127 127 static inline size_t SIZE2FRAMES(size_t size)128 NO_TRACE static inline size_t SIZE2FRAMES(size_t size) 128 129 { 129 130 if (!size) … … 132 133 } 133 134 134 static inline size_t FRAMES2SIZE(size_t frames)135 NO_TRACE static inline size_t FRAMES2SIZE(size_t frames) 135 136 { 136 137 return (size_t) (frames << FRAME_WIDTH); 137 138 } 138 139 139 static inline bool zone_flags_available(zone_flags_t flags)140 NO_TRACE static inline bool zone_flags_available(zone_flags_t flags) 140 141 { 141 142 return ((flags & (ZONE_RESERVED | ZONE_FIRMWARE)) == 0); … … 143 144 144 145 #define IS_BUDDY_ORDER_OK(index, order) \ 145 ((~((( unative_t) -1) << (order)) & (index)) == 0)146 ((~(((sysarg_t) -1) << (order)) & (index)) == 0) 146 147 #define IS_BUDDY_LEFT_BLOCK(zone, frame) \ 147 148 (((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x01) == 0) … … 166 167 extern void frame_set_parent(pfn_t, void *, size_t); 167 168 extern void frame_mark_unavailable(pfn_t, size_t); 168 extern uintptr_t zone_conf_size(size_t);169 extern size_t zone_conf_size(size_t); 169 170 extern bool zone_merge(size_t, size_t); 170 171 extern void zone_merge_all(void);
Note:
See TracChangeset
for help on using the changeset viewer.