Changeset e5a2ee8 in mainline
- Timestamp:
- 2006-11-18T12:36:06Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 79f119b9
- Parents:
- 73a1fe5
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/fb/fb.c
r73a1fe5 re5a2ee8 383 383 break; 384 384 default: 385 panic("Unsupported bpp ");385 panic("Unsupported bpp.\n"); 386 386 } 387 387 … … 416 416 order = 0; 417 417 else 418 order = fnzb(pages -1)+1;419 420 dbbuffer = frame_alloc(order, FRAME_ATOMIC | FRAME_KA);418 order = fnzb(pages - 1) + 1; 419 420 dbbuffer = frame_alloc(order, FRAME_ATOMIC | FRAME_KA); 421 421 if (!dbbuffer) 422 422 printf("Failed to allocate scroll buffer.\n"); -
kernel/generic/src/mm/frame.c
r73a1fe5 re5a2ee8 231 231 * @param pzone Pointer to preferred zone or NULL, on return contains zone number 232 232 */ 233 static zone_t * find_free_zone_ lock(uint8_t order, int *pzone)233 static zone_t * find_free_zone_and_lock(uint8_t order, int *pzone) 234 234 { 235 235 int i; … … 326 326 if (is_left) { 327 327 index = (frame_index(zone, frame)) + (1 << frame->buddy_order); 328 } else { // if (is_right)328 } else { /* if (is_right) */ 329 329 index = (frame_index(zone, frame)) - (1 << frame->buddy_order); 330 330 } … … 947 947 * First, find suitable frame zone. 948 948 */ 949 zone = find_free_zone_ lock(order, pzone);949 zone = find_free_zone_and_lock(order, pzone); 950 950 951 951 /* If no memory, reclaim some slab memory, … … 954 954 freed = slab_reclaim(0); 955 955 if (freed) 956 zone = find_free_zone_ lock(order, pzone);956 zone = find_free_zone_and_lock(order, pzone); 957 957 if (!zone) { 958 958 freed = slab_reclaim(SLAB_RECLAIM_ALL); 959 959 if (freed) 960 zone = find_free_zone_ lock(order, pzone);960 zone = find_free_zone_and_lock(order, pzone); 961 961 } 962 962 } … … 1049 1049 1050 1050 for (i=0; i < count; i++) { 1051 zone = find_zone_and_lock(start +i,&prefzone);1051 zone = find_zone_and_lock(start + i, &prefzone); 1052 1052 if (!zone) /* PFN not found */ 1053 1053 continue; 1054 zone_mark_unavailable(zone, start +i-zone->base);1054 zone_mark_unavailable(zone, start + i - zone->base); 1055 1055 1056 1056 spinlock_unlock(&zone->lock); … … 1066 1066 if (config.cpu_active == 1) { 1067 1067 zones.count = 0; 1068 spinlock_initialize(&zones.lock, "zones_glob_lock");1068 spinlock_initialize(&zones.lock, "zones.lock"); 1069 1069 } 1070 1070 /* Tell the architecture to create some memory */
Note:
See TracChangeset
for help on using the changeset viewer.