Commit 344391c7 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] bootmem allocator merging fix

Patch from "Juan M. de la Torre" <jmtorre@gmx.net>

If the requested align is PAGE_SIZE, it is impossible to merge with the
previous allocation request, because the allocated area must begin in a
page boundary.
parent 4d840923
...@@ -205,7 +205,7 @@ static void * __init __alloc_bootmem_core (bootmem_data_t *bdata, ...@@ -205,7 +205,7 @@ static void * __init __alloc_bootmem_core (bootmem_data_t *bdata,
* of this allocation's buffer? If yes then we can 'merge' * of this allocation's buffer? If yes then we can 'merge'
* the previous partial page with this allocation. * the previous partial page with this allocation.
*/ */
if (align <= PAGE_SIZE if (align < PAGE_SIZE
&& bdata->last_offset && bdata->last_pos+1 == start) { && bdata->last_offset && bdata->last_pos+1 == start) {
offset = (bdata->last_offset+align-1) & ~(align-1); offset = (bdata->last_offset+align-1) & ~(align-1);
if (offset > PAGE_SIZE) if (offset > PAGE_SIZE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment