mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
lib: Pass the correct align offset to bitmap_find_next_zero_area_off
bitmap_find_next_zero_area_off requires everything to be given in terms of bits. genpool no longer keeps track of everything in terms of bits so the start address must be shifted before passing to bitmap_find_next_zero_area_off. Without this, if the start address is unaligned, the code will not take this into account. Signed-off-by: Laura Abbott <lauraa@codeaurora.org> (cherry picked from commit e8e5365f74e311f5e0dd2513d3321d081355d308) Change-Id: I5eca13f181d50e6f9f8f39c7440c6619a8edc69a Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
This commit is contained in:
parent
f8011ae5d4
commit
969f2c4c1c
1 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ unsigned long gen_pool_alloc_aligned(struct gen_pool *pool, size_t size,
|
|||
retry:
|
||||
start_bit = bitmap_find_next_zero_area_off(chunk->bits, chunk_size,
|
||||
0, nbits, align_mask,
|
||||
chunk->start_addr);
|
||||
chunk->start_addr >> order);
|
||||
if (start_bit >= chunk_size)
|
||||
continue;
|
||||
remain = bitmap_set_ll(chunk->bits, start_bit, nbits);
|
||||
|
|
Loading…
Reference in a new issue