Changeset f5935ed in mainline
- Timestamp:
- 2006-02-06T15:09:58Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 021d471
- Parents:
- c7ec94a4
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/mm/page.c
rc7ec94a4 rf5935ed 44 44 45 45 if (config.cpu_active == 1) { 46 page_ operations = &page_pt_operations;46 page_mapping_operations = &pt_mapping_operations; 47 47 48 48 /* -
arch/ia32/src/mm/page.c
rc7ec94a4 rf5935ed 48 48 49 49 if (config.cpu_active == 1) { 50 page_ operations = &page_pt_operations;50 page_mapping_operations = &pt_mapping_operations; 51 51 52 52 /* -
arch/ia64/src/mm/page.c
rc7ec94a4 rf5935ed 48 48 void page_arch_init(void) 49 49 { 50 page_ operations = &page_ht_operations;50 page_mapping_operations = &ht_mapping_operations; 51 51 pk_disable(); 52 52 set_environment(); -
arch/mips32/src/mm/page.c
rc7ec94a4 rf5935ed 33 33 void page_arch_init(void) 34 34 { 35 page_ operations = &page_pt_operations;35 page_mapping_operations = &pt_mapping_operations; 36 36 } -
arch/ppc32/src/mm/page.c
rc7ec94a4 rf5935ed 36 36 void page_arch_init(void) 37 37 { 38 page_ operations = &page_pt_operations;38 page_mapping_operations = &pt_mapping_operations; 39 39 } -
arch/sparc64/src/mm/frame.c
rc7ec94a4 rf5935ed 34 34 { 35 35 /* 36 * Workaround to prevent slab allocator from allocating fram 0,37 * which is not , at that time, mapped.36 * Workaround to prevent slab allocator from allocating frame 0, 37 * which is not mapped by OFW. 38 38 */ 39 39 frame_region_not_free(0, FRAME_SIZE); -
arch/sparc64/src/mm/page.c
rc7ec94a4 rf5935ed 32 32 void page_arch_init(void) 33 33 { 34 page_ operations = &page_ht_operations;34 page_mapping_operations = &ht_mapping_operations; 35 35 } -
genarch/include/mm/page_ht.h
rc7ec94a4 rf5935ed 58 58 }; 59 59 60 extern page_ operations_t page_ht_operations;60 extern page_mapping_operations_t ht_mapping_operations; 61 61 extern spinlock_t page_ht_lock; 62 63 62 extern hash_table_t page_ht; 64 63 extern hash_table_operations_t ht_operations; -
genarch/include/mm/page_pt.h
rc7ec94a4 rf5935ed 85 85 #define SET_FRAME_FLAGS(ptl3, i, x) SET_FRAME_FLAGS_ARCH(ptl3, i, x) 86 86 87 extern page_ operations_t page_pt_operations;87 extern page_mapping_operations_t pt_mapping_operations; 88 88 89 89 extern void page_mapping_insert_pt(as_t *as, __address page, __address frame, int flags); -
genarch/src/mm/page_ht.c
rc7ec94a4 rf5935ed 68 68 }; 69 69 70 page_operations_t page_ht_operations = { 70 /** Page mapping operations for page hash table architectures. */ 71 page_mapping_operations_t ht_mapping_operations = { 71 72 .mapping_insert = ht_mapping_insert, 72 73 .mapping_find = ht_mapping_find … … 120 121 * Convert item to PTE. 121 122 */ 122 t = list_get_instance(item, pte_t, link);123 t = hash_table_get_instance(item, pte_t, link); 123 124 124 125 if (keys == PAGE_HT_KEYS) { … … 142 143 * Convert item to PTE. 143 144 */ 144 t = list_get_instance(item, pte_t, link);145 t = hash_table_get_instance(item, pte_t, link); 145 146 146 147 free(t); … … 200 201 hlp = hash_table_find(&page_ht, key); 201 202 if (hlp) 202 t = list_get_instance(hlp, pte_t, link);203 t = hash_table_get_instance(hlp, pte_t, link); 203 204 204 205 spinlock_unlock(&page_ht_lock); -
genarch/src/mm/page_pt.c
rc7ec94a4 rf5935ed 41 41 static pte_t *pt_mapping_find(as_t *as, __address page); 42 42 43 page_ operations_t page_pt_operations = {43 page_mapping_operations_t pt_mapping_operations = { 44 44 .mapping_insert = pt_mapping_insert, 45 45 .mapping_find = pt_mapping_find -
generic/include/adt/hash_table.h
rc7ec94a4 rf5935ed 67 67 }; 68 68 69 #define hash_table_get_instance(item, type,member) list_get_instance((item),(type),(member))69 #define hash_table_get_instance(item, type, member) list_get_instance((item), type, member) 70 70 71 71 extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op); -
generic/include/mm/page.h
rc7ec94a4 rf5935ed 61 61 62 62 /** Operations to manipulate page mappings. */ 63 struct page_ operations {63 struct page_mapping_operations { 64 64 void (* mapping_insert)(as_t *as, __address page, __address frame, int flags); 65 65 pte_t *(* mapping_find)(as_t *as, __address page); 66 66 }; 67 typedef struct page_ operations page_operations_t;67 typedef struct page_mapping_operations page_mapping_operations_t; 68 68 69 extern page_ operations_t *page_operations;69 extern page_mapping_operations_t *page_mapping_operations; 70 70 71 71 extern void page_init(void); -
generic/src/mm/page.c
rc7ec94a4 rf5935ed 44 44 45 45 /** Virtual operations for page subsystem. */ 46 page_ operations_t *page_operations = NULL;46 page_mapping_operations_t *page_mapping_operations = NULL; 47 47 48 48 void page_init(void) … … 86 86 void page_mapping_insert(as_t *as, __address page, __address frame, int flags) 87 87 { 88 ASSERT(page_ operations);89 ASSERT(page_ operations->mapping_insert);88 ASSERT(page_mapping_operations); 89 ASSERT(page_mapping_operations->mapping_insert); 90 90 91 page_ operations->mapping_insert(as, page, frame, flags);91 page_mapping_operations->mapping_insert(as, page, frame, flags); 92 92 } 93 93 … … 105 105 pte_t *page_mapping_find(as_t *as, __address page) 106 106 { 107 ASSERT(page_ operations);108 ASSERT(page_ operations->mapping_find);107 ASSERT(page_mapping_operations); 108 ASSERT(page_mapping_operations->mapping_find); 109 109 110 return page_ operations->mapping_find(as, page);110 return page_mapping_operations->mapping_find(as, page); 111 111 }
Note:
See TracChangeset
for help on using the changeset viewer.