Rev 1599 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1599 | Rev 1700 | ||
---|---|---|---|
Line 702... | Line 702... | ||
702 | zone2 = zones.info[z2]; |
702 | zone2 = zones.info[z2]; |
703 | spinlock_lock(&zone1->lock); |
703 | spinlock_lock(&zone1->lock); |
704 | spinlock_lock(&zone2->lock); |
704 | spinlock_lock(&zone2->lock); |
705 | 705 | ||
706 | cframes = SIZE2FRAMES(zone_conf_size(zone2->base+zone2->count-zone1->base)); |
706 | cframes = SIZE2FRAMES(zone_conf_size(zone2->base+zone2->count-zone1->base)); |
- | 707 | if (cframes == 1) |
|
- | 708 | order = 0; |
|
- | 709 | else |
|
707 | order = fnzb(cframes) + 1; |
710 | order = fnzb(cframes - 1) + 1; |
708 | 711 | ||
709 | /* Allocate zonedata inside one of the zones */ |
712 | /* Allocate zonedata inside one of the zones */ |
710 | if (zone_can_alloc(zone1, order)) |
713 | if (zone_can_alloc(zone1, order)) |
711 | pfn = zone1->base + zone_frame_alloc(zone1, order); |
714 | pfn = zone1->base + zone_frame_alloc(zone1, order); |
712 | else if (zone_can_alloc(zone2, order)) |
715 | else if (zone_can_alloc(zone2, order)) |