From 8ddec5b565ddd1ed108a39425f42df348b215c75 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 6 Nov 2012 19:40:47 +0100 Subject: [PATCH] vm_page_allocate_page_run: fix previous commit * remove superfluous codes * when aligning, sPhysicalPageOffset would be substracted twice +alpha4 Signed-off-by: Ingo Weinhold --- src/system/kernel/vm/vm_page.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/vm/vm_page.cpp b/src/system/kernel/vm/vm_page.cpp index 29df4e1a92..007aacdae9 100644 --- a/src/system/kernel/vm/vm_page.cpp +++ b/src/system/kernel/vm/vm_page.cpp @@ -3862,9 +3862,8 @@ vm_page_allocate_page_run(uint32 flags, page_num_t length, page_num_t offsetStart = start + sPhysicalPageOffset; // enforce alignment - if (alignmentMask != 0 && (offsetStart & alignmentMask) != 0) { - offsetStart = ((offsetStart + alignmentMask) & ~alignmentMask) - - sPhysicalPageOffset; + if ((offsetStart & alignmentMask) != 0) { + offsetStart = (offsetStart + alignmentMask) & ~alignmentMask; } // enforce boundary @@ -3919,7 +3918,7 @@ vm_page_allocate_page_run(uint32 flags, page_num_t length, freeClearQueueLocker.Lock(); } - start += max_c(i, alignmentMask) + 1; + start += i + 1; } }