From b521a45ec28db7fd5bf7825f98507810965d25d1 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Tue, 13 Dec 2016 22:24:12 +1300 Subject: [PATCH] Revert "vm: Try harder to allocate early physical pages." This reverts commit 21e3ac6cf52f91dba8217f15fc33dc1d45dffd40, which was accidentally applied twice, missed during rebase. Originally applied in 601b2f7eda4d25b46e7d17e212d22954f28bd0fe. --- src/system/kernel/vm/vm.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 5a148a7ab4..553f937ced 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -3916,26 +3916,6 @@ vm_allocate_early_physical_page(kernel_args* args) } } - // Expanding upwards didn't work, try going downwards. - for (uint32 i = 0; i < args->num_physical_allocated_ranges; i++) { - phys_addr_t nextPage; - - nextPage = args->physical_allocated_range[i].start - B_PAGE_SIZE; - // see if the page after the prev allocated paddr run can be allocated - if (i > 0 && args->physical_allocated_range[i - 1].size != 0) { - // see if the next page will collide with the next allocated range - if (nextPage < args->physical_allocated_range[i-1].start + args->physical_allocated_range[i-1].size) - continue; - } - // see if the next physical page fits in the memory block - if (is_page_in_physical_memory_range(args, nextPage)) { - // we got one! - args->physical_allocated_range[i].start -= B_PAGE_SIZE; - args->physical_allocated_range[i].size += B_PAGE_SIZE; - return nextPage / B_PAGE_SIZE; - } - } - return 0; // could not allocate a block }