diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-08-17 22:47:15 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-08-17 22:47:15 -0400 |
commit | dbf7603a92cd895b8c1017734bc30fd9a32fd933 (patch) | |
tree | 7e0e8c35d5db964ee43494a721dee3c486e4e458 /mm/vmalloc.c | |
parent | 044c31fdf80ed9d8e6bfb33913d085c3efc6febe (diff) | |
parent | d31bf2883542cd3414674238f94123bd1d9c0b9f (diff) |
Merge commit 'v3.0.3' into linaro-3.0linux-linaro-3.0-2011.08-0
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 1d34d75366a..d3d451bcdf2 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -732,9 +732,10 @@ static void free_unmap_vmap_area_addr(unsigned long addr) #define VMAP_BBMAP_BITS_MIN (VMAP_MAX_ALLOC*2) #define VMAP_MIN(x, y) ((x) < (y) ? (x) : (y)) /* can't use min() */ #define VMAP_MAX(x, y) ((x) > (y) ? (x) : (y)) /* can't use max() */ -#define VMAP_BBMAP_BITS VMAP_MIN(VMAP_BBMAP_BITS_MAX, \ - VMAP_MAX(VMAP_BBMAP_BITS_MIN, \ - VMALLOC_PAGES / NR_CPUS / 16)) +#define VMAP_BBMAP_BITS \ + VMAP_MIN(VMAP_BBMAP_BITS_MAX, \ + VMAP_MAX(VMAP_BBMAP_BITS_MIN, \ + VMALLOC_PAGES / roundup_pow_of_two(NR_CPUS) / 16)) #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE) |