Changeset 9b9e385 in mainline
- Timestamp:
- 2006-02-05T16:08:27Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 266294a9
- Parents:
- 328e0d3
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/src/mm/page.c
r328e0d3 r9b9e385 90 90 * Allocate VHPT and invalidate all its entries. 91 91 */ 92 page_ht = (pte_t *) frame_alloc( FRAME_KA, VHPT_WIDTH - FRAME_WIDTH, NULL, NULL);92 page_ht = (pte_t *) frame_alloc(VHPT_WIDTH - FRAME_WIDTH, FRAME_KA); 93 93 memsetb((__address) page_ht, VHPT_SIZE, 0); 94 94 ht_invalidate_all(); -
genarch/src/mm/as_ht.c
r328e0d3 r9b9e385 54 54 { 55 55 if (!page_ht) { 56 page_ht = (pte_t *) frame_alloc( FRAME_KA | FRAME_PANIC, HT_WIDTH - FRAME_WIDTH, NULL, NULL);56 page_ht = (pte_t *) frame_alloc(HT_WIDTH - FRAME_WIDTH, FRAME_KA | FRAME_PANIC); 57 57 memsetb((__address) page_ht, HT_SIZE, 0); 58 58 } -
genarch/src/mm/as_pt.c
r328e0d3 r9b9e385 57 57 ipl_t ipl; 58 58 59 dst_ptl0 = (pte_t *) frame_alloc( FRAME_KA | FRAME_PANIC, ONE_FRAME, NULL, NULL);59 dst_ptl0 = (pte_t *) frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC); 60 60 61 61 if (flags & FLAG_AS_KERNEL) { -
genarch/src/mm/page_pt.c
r328e0d3 r9b9e385 66 66 67 67 if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) { 68 newpt = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);68 newpt = frame_alloc(ONE_FRAME, FRAME_KA); 69 69 memsetb(newpt, PAGE_SIZE, 0); 70 70 SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt)); … … 75 75 76 76 if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) { 77 newpt = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);77 newpt = frame_alloc(ONE_FRAME, FRAME_KA); 78 78 memsetb(newpt, PAGE_SIZE, 0); 79 79 SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt)); … … 84 84 85 85 if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) { 86 newpt = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);86 newpt = frame_alloc(ONE_FRAME, FRAME_KA); 87 87 memsetb(newpt, PAGE_SIZE, 0); 88 88 SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt)); -
generic/include/mm/frame.h
r328e0d3 r9b9e385 62 62 #define ZONE_BLACKLIST_SIZE 8 63 63 64 #define frame_alloc(order, flags) frame_alloc_generic(order, flags, NULL, NULL) 65 #define frame_alloc_rc(order, flags, status) frame_alloc_generic(order, flags, status, NULL) 66 #define frame_alloc_rc_zone(order, flags, status, zone) frame_alloc_generic(order, flags, status, zone) 67 64 68 struct zone { 65 69 link_t link; /**< link to previous and next zone */ … … 102 106 extern void frame_initialize(frame_t *frame, zone_t *zone); 103 107 104 __address frame_alloc(int flags, __u8 order, int * status, zone_t **pzone); 108 __address frame_alloc_generic(__u8 order, int flags, int * status, zone_t **pzone); 109 110 105 111 extern void frame_free(__address addr); 106 112 -
generic/src/cpu/cpu.c
r328e0d3 r9b9e385 62 62 63 63 for (i=0; i < config.cpu_count; i++) { 64 cpus[i].stack = (__u8 *) frame_alloc( FRAME_KA | FRAME_PANIC, ONE_FRAME, NULL, NULL);64 cpus[i].stack = (__u8 *) frame_alloc(ONE_FRAME, FRAME_KA | FRAME_PANIC); 65 65 66 66 cpus[i].id = i; -
generic/src/mm/as.c
r328e0d3 r9b9e385 257 257 * the different causes 258 258 */ 259 frame = frame_alloc( 0, ONE_FRAME, NULL, NULL);259 frame = frame_alloc(ONE_FRAME, 0); 260 260 memsetb(PA2KA(frame), FRAME_SIZE, 0); 261 261 -
generic/src/mm/frame.c
r328e0d3 r9b9e385 110 110 * @return Allocated frame. 111 111 */ 112 __address frame_alloc (int flags, __u8 order, int * status, zone_t **pzone)112 __address frame_alloc_generic(__u8 order, int flags, int * status, zone_t **pzone) 113 113 { 114 114 ipl_t ipl; -
generic/src/mm/slab.c
r328e0d3 r9b9e385 156 156 frame_t *frame; 157 157 158 data = (void *)frame_alloc (FRAME_KA | flags, cache->order, &status, &zone);158 data = (void *)frame_alloc_rc_zone(cache->order, FRAME_KA | flags, &status, &zone); 159 159 if (status != FRAME_OK) { 160 160 return NULL; -
generic/src/proc/thread.c
r328e0d3 r9b9e385 167 167 spinlock_initialize(&t->lock, "thread_t_lock"); 168 168 169 frame_ks = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);169 frame_ks = frame_alloc(ONE_FRAME, FRAME_KA); 170 170 if (THREAD_USER_STACK & flags) { 171 frame_us = frame_alloc( FRAME_KA, ONE_FRAME, NULL,NULL);171 frame_us = frame_alloc(ONE_FRAME, FRAME_KA); 172 172 } 173 173 -
test/mm/falloc1/test.c
r328e0d3 r9b9e385 56 56 allocated = 0; 57 57 for (i = 0; i < MAX_FRAMES >> order; i++) { 58 frames[allocated] = frame_alloc (FRAME_ATOMIC | FRAME_KA, order, &status, NULL);58 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); 59 59 60 60 if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { -
test/mm/falloc2/test.c
r328e0d3 r9b9e385 61 61 for (run = 0; run < THREAD_RUNS; run++) { 62 62 for (order = 0; order <= MAX_ORDER; order++) { 63 printf("Thread #%d : Allocating %d frames blocks ... \n", THREAD->tid, 1 << order);63 printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); 64 64 allocated = 0; 65 65 for (i = 0; i < (MAX_FRAMES >> order); i++) { 66 frames[allocated] = frame_alloc (FRAME_ATOMIC | FRAME_KA, order, &status, NULL);66 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); 67 67 if (status == 0) { 68 68 memsetb(frames[allocated], FRAME_SIZE << order, val); … … 72 72 } 73 73 } 74 printf("Thread #%d : %d blocks allocated.\n", THREAD->tid, allocated);74 printf("Thread #%d (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); 75 75 76 printf("Thread #%d : Deallocating ... \n", THREAD->tid);76 printf("Thread #%d (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id); 77 77 for (i = 0; i < allocated; i++) { 78 78 for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) { 79 79 if (((__u8 *) frames[i])[k] != val) { 80 printf("Thread #%d : Unexpected data (%d) in block %P offset %X\n", THREAD->tid, ((char *) frames[i])[k], frames[i], k);80 printf("Thread #%d (cpu%d): Unexpected data (%d) in block %P offset %X\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); 81 81 failed(); 82 82 } … … 84 84 frame_free(frames[i]); 85 85 } 86 printf("Thread #%d : Finished run.\n", val);86 printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); 87 87 } 88 88 } 89 89 90 90 free(frames); 91 91 printf("Thread #%d (cpu%d): Exiting\n", THREAD->tid, CPU->id); 92 92 atomic_dec(&thread_count); 93 93 } -
test/mm/mapping1/test.c
r328e0d3 r9b9e385 48 48 printf("Memory management test mapping #1\n"); 49 49 50 frame0 = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);51 frame1 = frame_alloc( FRAME_KA, ONE_FRAME, NULL, NULL);50 frame0 = frame_alloc(ONE_FRAME, FRAME_KA); 51 frame1 = frame_alloc(ONE_FRAME, FRAME_KA); 52 52 53 53 printf("Writing %L to physical address %P.\n", VALUE0, KA2PA(frame0));
Note:
See TracChangeset
for help on using the changeset viewer.