Changeset 98000fb in mainline for kernel/generic/include/mm
- Timestamp:
- 2009-06-03T19:34:45Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- Location:
- kernel/generic/include/mm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
r69e68e3 r98000fb 95 95 * Protected by asidlock. 96 96 */ 97 count_t cpu_refcount;97 size_t cpu_refcount; 98 98 /** 99 99 * Address space identifier. … … 133 133 mutex_t lock; 134 134 /** This structure can be deallocated if refcount drops to 0. */ 135 count_t refcount;135 size_t refcount; 136 136 /** 137 137 * B+tree containing complete map of anonymous pages of the shared area. … … 157 157 struct { /**< phys_backend members */ 158 158 uintptr_t base; 159 count_t frames;159 size_t frames; 160 160 }; 161 161 } mem_backend_data_t; … … 176 176 int attributes; 177 177 /** Size of this area in multiples of PAGE_SIZE. */ 178 count_t pages;178 size_t pages; 179 179 /** Base address of this area. */ 180 180 uintptr_t base; … … 226 226 extern bool as_area_check_access(as_area_t *area, pf_access_t access); 227 227 extern size_t as_area_get_size(uintptr_t base); 228 extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count);229 extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count);228 extern int used_space_insert(as_area_t *a, uintptr_t page, size_t count); 229 extern int used_space_remove(as_area_t *a, uintptr_t page, size_t count); 230 230 231 231 -
kernel/generic/include/mm/frame.h
r69e68e3 r98000fb 81 81 82 82 typedef struct { 83 count_t refcount; /**< Tracking of shared frames */83 size_t refcount; /**< Tracking of shared frames */ 84 84 uint8_t buddy_order; /**< Buddy system block order */ 85 85 link_t buddy_link; /**< Link to the next free block inside … … 91 91 pfn_t base; /**< Frame_no of the first frame 92 92 in the frames array */ 93 count_t count; /**< Size of zone */94 count_t free_count; /**< Number of free frame_t93 size_t count; /**< Size of zone */ 94 size_t free_count; /**< Number of free frame_t 95 95 structures */ 96 count_t busy_count; /**< Number of busy frame_t96 size_t busy_count; /**< Number of busy frame_t 97 97 structures */ 98 98 zone_flags_t flags; /**< Type of the zone */ … … 109 109 typedef struct { 110 110 SPINLOCK_DECLARE(lock); 111 count_t count;111 size_t count; 112 112 zone_t info[ZONES_MAX]; 113 113 } zones_t; … … 125 125 } 126 126 127 static inline count_t SIZE2FRAMES(size_t size)127 static inline size_t SIZE2FRAMES(size_t size) 128 128 { 129 129 if (!size) 130 130 return 0; 131 return ( count_t) ((size - 1) >> FRAME_WIDTH) + 1;131 return (size_t) ((size - 1) >> FRAME_WIDTH) + 1; 132 132 } 133 133 134 static inline size_t FRAMES2SIZE( count_t frames)134 static inline size_t FRAMES2SIZE(size_t frames) 135 135 { 136 136 return (size_t) (frames << FRAME_WIDTH); … … 157 157 158 158 extern void frame_init(void); 159 extern void *frame_alloc_generic(uint8_t, frame_flags_t, count_t *);159 extern void *frame_alloc_generic(uint8_t, frame_flags_t, size_t *); 160 160 extern void frame_free(uintptr_t); 161 161 extern void frame_reference_add(pfn_t); 162 162 163 extern count_t find_zone(pfn_t frame, count_t count, count_t hint);164 extern count_t zone_create(pfn_t, count_t, pfn_t, zone_flags_t);165 extern void *frame_get_parent(pfn_t, count_t);166 extern void frame_set_parent(pfn_t, void *, count_t);167 extern void frame_mark_unavailable(pfn_t, count_t);168 extern uintptr_t zone_conf_size( count_t);169 extern bool zone_merge( count_t, count_t);163 extern size_t find_zone(pfn_t frame, size_t count, size_t hint); 164 extern size_t zone_create(pfn_t, size_t, pfn_t, zone_flags_t); 165 extern void *frame_get_parent(pfn_t, size_t); 166 extern void frame_set_parent(pfn_t, void *, size_t); 167 extern void frame_mark_unavailable(pfn_t, size_t); 168 extern uintptr_t zone_conf_size(size_t); 169 extern bool zone_merge(size_t, size_t); 170 170 extern void zone_merge_all(void); 171 171 extern uint64_t zone_total_size(void); … … 175 175 */ 176 176 extern void zone_print_list(void); 177 extern void zone_print_one( count_t);177 extern void zone_print_one(size_t); 178 178 179 179 #endif -
kernel/generic/include/mm/slab.h
r69e68e3 r98000fb 73 73 typedef struct { 74 74 link_t link; 75 count_t busy; /**< Count of full slots in magazine */76 count_t size; /**< Number of slots in magazine */75 size_t busy; /**< Count of full slots in magazine */ 76 size_t size; /**< Number of slots in magazine */ 77 77 void *objs[]; /**< Slots in magazine */ 78 78 } slab_magazine_t; … … 129 129 extern void * slab_alloc(slab_cache_t *, int); 130 130 extern void slab_free(slab_cache_t *, void *); 131 extern count_t slab_reclaim(int);131 extern size_t slab_reclaim(int); 132 132 133 133 /* slab subsytem initialization */ -
kernel/generic/include/mm/tlb.h
r69e68e3 r98000fb 62 62 asid_t asid; /**< Address space identifier. */ 63 63 uintptr_t page; /**< Page address. */ 64 count_t count; /**< Number of pages to invalidate. */64 size_t count; /**< Number of pages to invalidate. */ 65 65 } tlb_shootdown_msg_t; 66 66 … … 69 69 #ifdef CONFIG_SMP 70 70 extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, 71 uintptr_t page, count_t count);71 uintptr_t page, size_t count); 72 72 extern void tlb_shootdown_finalize(void); 73 73 extern void tlb_shootdown_ipi_recv(void); … … 85 85 extern void tlb_invalidate_all(void); 86 86 extern void tlb_invalidate_asid(asid_t asid); 87 extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt);87 extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, size_t cnt); 88 88 #endif 89 89
Note:
See TracChangeset
for help on using the changeset viewer.