aboutsummaryrefslogtreecommitdiffstats
path: root/mm/percpu.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-10-12 04:14:18 -0400
committerTejun Heo <tj@kernel.org>2009-10-12 04:14:18 -0400
commitb7a4c946d0dfa91c28029756e8861eaa691fbbc3 (patch)
tree5a7c2b6b4bbef05cebd13b4e8a7a3bc2e4e2da1b /mm/percpu.c
parente800879d50c5a528d40191528557b1bdfbccbd42 (diff)
parent1a0c3298d6c6bfc357c38772e7f32d193c60c77d (diff)
Merge branch 'for-linus' into for-next
Diffstat (limited to 'mm/percpu.c')
-rw-r--r--mm/percpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index e4e08b87b77..ec158bb5f86 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1868,13 +1868,14 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, ssize_t dyn_size,
1868 max_distance = 0; 1868 max_distance = 0;
1869 for (group = 0; group < ai->nr_groups; group++) { 1869 for (group = 0; group < ai->nr_groups; group++) {
1870 ai->groups[group].base_offset = areas[group] - base; 1870 ai->groups[group].base_offset = areas[group] - base;
1871 max_distance = max(max_distance, ai->groups[group].base_offset); 1871 max_distance = max_t(size_t, max_distance,
1872 ai->groups[group].base_offset);
1872 } 1873 }
1873 max_distance += ai->unit_size; 1874 max_distance += ai->unit_size;
1874 1875
1875 /* warn if maximum distance is further than 75% of vmalloc space */ 1876 /* warn if maximum distance is further than 75% of vmalloc space */
1876 if (max_distance > (VMALLOC_END - VMALLOC_START) * 3 / 4) { 1877 if (max_distance > (VMALLOC_END - VMALLOC_START) * 3 / 4) {
1877 pr_warning("PERCPU: max_distance=0x%lx too large for vmalloc " 1878 pr_warning("PERCPU: max_distance=0x%zx too large for vmalloc "
1878 "space 0x%lx\n", 1879 "space 0x%lx\n",
1879 max_distance, VMALLOC_END - VMALLOC_START); 1880 max_distance, VMALLOC_END - VMALLOC_START);
1880#ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK 1881#ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK