diff options
Diffstat (limited to 'mm/percpu.c')
-rw-r--r-- | mm/percpu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 8eb536645f68..bf80e55dbed7 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -342,7 +342,7 @@ static void pcpu_chunk_relocate(struct pcpu_chunk *chunk, int oslot) | |||
342 | * @chunk: chunk of interest | 342 | * @chunk: chunk of interest |
343 | * | 343 | * |
344 | * Determine whether area map of @chunk needs to be extended to | 344 | * Determine whether area map of @chunk needs to be extended to |
345 | * accomodate a new allocation. | 345 | * accommodate a new allocation. |
346 | * | 346 | * |
347 | * CONTEXT: | 347 | * CONTEXT: |
348 | * pcpu_lock. | 348 | * pcpu_lock. |
@@ -431,7 +431,7 @@ out_unlock: | |||
431 | * depending on @head, is reduced by @tail bytes and @tail byte block | 431 | * depending on @head, is reduced by @tail bytes and @tail byte block |
432 | * is inserted after the target block. | 432 | * is inserted after the target block. |
433 | * | 433 | * |
434 | * @chunk->map must have enough free slots to accomodate the split. | 434 | * @chunk->map must have enough free slots to accommodate the split. |
435 | * | 435 | * |
436 | * CONTEXT: | 436 | * CONTEXT: |
437 | * pcpu_lock. | 437 | * pcpu_lock. |
@@ -1008,8 +1008,7 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr) | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | if (in_first_chunk) { | 1010 | if (in_first_chunk) { |
1011 | if ((unsigned long)addr < VMALLOC_START || | 1011 | if (!is_vmalloc_addr(addr)) |
1012 | (unsigned long)addr >= VMALLOC_END) | ||
1013 | return __pa(addr); | 1012 | return __pa(addr); |
1014 | else | 1013 | else |
1015 | return page_to_phys(vmalloc_to_page(addr)); | 1014 | return page_to_phys(vmalloc_to_page(addr)); |
@@ -1438,7 +1437,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( | |||
1438 | /* | 1437 | /* |
1439 | * Determine min_unit_size, alloc_size and max_upa such that | 1438 | * Determine min_unit_size, alloc_size and max_upa such that |
1440 | * alloc_size is multiple of atom_size and is the smallest | 1439 | * alloc_size is multiple of atom_size and is the smallest |
1441 | * which can accomodate 4k aligned segments which are equal to | 1440 | * which can accommodate 4k aligned segments which are equal to |
1442 | * or larger than min_unit_size. | 1441 | * or larger than min_unit_size. |
1443 | */ | 1442 | */ |
1444 | min_unit_size = max_t(size_t, size_sum, PCPU_MIN_UNIT_SIZE); | 1443 | min_unit_size = max_t(size_t, size_sum, PCPU_MIN_UNIT_SIZE); |
@@ -1553,7 +1552,7 @@ static struct pcpu_alloc_info * __init pcpu_build_alloc_info( | |||
1553 | * @atom_size: allocation atom size | 1552 | * @atom_size: allocation atom size |
1554 | * @cpu_distance_fn: callback to determine distance between cpus, optional | 1553 | * @cpu_distance_fn: callback to determine distance between cpus, optional |
1555 | * @alloc_fn: function to allocate percpu page | 1554 | * @alloc_fn: function to allocate percpu page |
1556 | * @free_fn: funtion to free percpu page | 1555 | * @free_fn: function to free percpu page |
1557 | * | 1556 | * |
1558 | * This is a helper to ease setting up embedded first percpu chunk and | 1557 | * This is a helper to ease setting up embedded first percpu chunk and |
1559 | * can be called where pcpu_setup_first_chunk() is expected. | 1558 | * can be called where pcpu_setup_first_chunk() is expected. |
@@ -1681,7 +1680,7 @@ out_free: | |||
1681 | * pcpu_page_first_chunk - map the first chunk using PAGE_SIZE pages | 1680 | * pcpu_page_first_chunk - map the first chunk using PAGE_SIZE pages |
1682 | * @reserved_size: the size of reserved percpu area in bytes | 1681 | * @reserved_size: the size of reserved percpu area in bytes |
1683 | * @alloc_fn: function to allocate percpu page, always called with PAGE_SIZE | 1682 | * @alloc_fn: function to allocate percpu page, always called with PAGE_SIZE |
1684 | * @free_fn: funtion to free percpu page, always called with PAGE_SIZE | 1683 | * @free_fn: function to free percpu page, always called with PAGE_SIZE |
1685 | * @populate_pte_fn: function to populate pte | 1684 | * @populate_pte_fn: function to populate pte |
1686 | * | 1685 | * |
1687 | * This is a helper to ease setting up page-remapped first percpu | 1686 | * This is a helper to ease setting up page-remapped first percpu |