diff options
author | Joe Perches <joe@perches.com> | 2016-03-17 17:19:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 18:09:34 -0400 |
commit | 870d4b12ad15d21c5db67b373bdc2f62cfe2ec64 (patch) | |
tree | b19d76445eb20b54fc48b4c4129befa71b6ca0db /mm/percpu.c | |
parent | 1170532bb49f9468aedabdc1d5a560e2521a2bcc (diff) |
mm: percpu: use pr_fmt to prefix output
Use the normal mechanism to make the logging output consistently
"percpu:" instead of a mix of "PERCPU:" and "percpu:"
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/percpu.c')
-rw-r--r-- | mm/percpu.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index c987fd4d539d..0c59684f1ff2 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -53,6 +53,8 @@ | |||
53 | * setup the first chunk containing the kernel static percpu area | 53 | * setup the first chunk containing the kernel static percpu area |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
57 | |||
56 | #include <linux/bitmap.h> | 58 | #include <linux/bitmap.h> |
57 | #include <linux/bootmem.h> | 59 | #include <linux/bootmem.h> |
58 | #include <linux/err.h> | 60 | #include <linux/err.h> |
@@ -1033,11 +1035,11 @@ fail_unlock: | |||
1033 | spin_unlock_irqrestore(&pcpu_lock, flags); | 1035 | spin_unlock_irqrestore(&pcpu_lock, flags); |
1034 | fail: | 1036 | fail: |
1035 | if (!is_atomic && warn_limit) { | 1037 | if (!is_atomic && warn_limit) { |
1036 | pr_warn("PERCPU: allocation failed, size=%zu align=%zu atomic=%d, %s\n", | 1038 | pr_warn("allocation failed, size=%zu align=%zu atomic=%d, %s\n", |
1037 | size, align, is_atomic, err); | 1039 | size, align, is_atomic, err); |
1038 | dump_stack(); | 1040 | dump_stack(); |
1039 | if (!--warn_limit) | 1041 | if (!--warn_limit) |
1040 | pr_info("PERCPU: limit reached, disable warning\n"); | 1042 | pr_info("limit reached, disable warning\n"); |
1041 | } | 1043 | } |
1042 | if (is_atomic) { | 1044 | if (is_atomic) { |
1043 | /* see the flag handling in pcpu_blance_workfn() */ | 1045 | /* see the flag handling in pcpu_blance_workfn() */ |
@@ -1538,8 +1540,8 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, | |||
1538 | 1540 | ||
1539 | #define PCPU_SETUP_BUG_ON(cond) do { \ | 1541 | #define PCPU_SETUP_BUG_ON(cond) do { \ |
1540 | if (unlikely(cond)) { \ | 1542 | if (unlikely(cond)) { \ |
1541 | pr_emerg("PERCPU: failed to initialize, %s", #cond); \ | 1543 | pr_emerg("failed to initialize, %s\n", #cond); \ |
1542 | pr_emerg("PERCPU: cpu_possible_mask=%*pb\n", \ | 1544 | pr_emerg("cpu_possible_mask=%*pb\n", \ |
1543 | cpumask_pr_args(cpu_possible_mask)); \ | 1545 | cpumask_pr_args(cpu_possible_mask)); \ |
1544 | pcpu_dump_alloc_info(KERN_EMERG, ai); \ | 1546 | pcpu_dump_alloc_info(KERN_EMERG, ai); \ |
1545 | BUG(); \ | 1547 | BUG(); \ |
@@ -1723,7 +1725,7 @@ static int __init percpu_alloc_setup(char *str) | |||
1723 | pcpu_chosen_fc = PCPU_FC_PAGE; | 1725 | pcpu_chosen_fc = PCPU_FC_PAGE; |
1724 | #endif | 1726 | #endif |
1725 | else | 1727 | else |
1726 | pr_warn("PERCPU: unknown allocator %s specified\n", str); | 1728 | pr_warn("unknown allocator %s specified\n", str); |
1727 | 1729 | ||
1728 | return 0; | 1730 | return 0; |
1729 | } | 1731 | } |
@@ -2016,7 +2018,7 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, | |||
2016 | 2018 | ||
2017 | /* warn if maximum distance is further than 75% of vmalloc space */ | 2019 | /* warn if maximum distance is further than 75% of vmalloc space */ |
2018 | if (max_distance > VMALLOC_TOTAL * 3 / 4) { | 2020 | if (max_distance > VMALLOC_TOTAL * 3 / 4) { |
2019 | pr_warn("PERCPU: max_distance=0x%zx too large for vmalloc space 0x%lx\n", | 2021 | pr_warn("max_distance=0x%zx too large for vmalloc space 0x%lx\n", |
2020 | max_distance, VMALLOC_TOTAL); | 2022 | max_distance, VMALLOC_TOTAL); |
2021 | #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK | 2023 | #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK |
2022 | /* and fail if we have fallback */ | 2024 | /* and fail if we have fallback */ |
@@ -2025,7 +2027,7 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, | |||
2025 | #endif | 2027 | #endif |
2026 | } | 2028 | } |
2027 | 2029 | ||
2028 | pr_info("PERCPU: Embedded %zu pages/cpu @%p s%zu r%zu d%zu u%zu\n", | 2030 | pr_info("Embedded %zu pages/cpu @%p s%zu r%zu d%zu u%zu\n", |
2029 | PFN_DOWN(size_sum), base, ai->static_size, ai->reserved_size, | 2031 | PFN_DOWN(size_sum), base, ai->static_size, ai->reserved_size, |
2030 | ai->dyn_size, ai->unit_size); | 2032 | ai->dyn_size, ai->unit_size); |
2031 | 2033 | ||
@@ -2099,7 +2101,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, | |||
2099 | 2101 | ||
2100 | ptr = alloc_fn(cpu, PAGE_SIZE, PAGE_SIZE); | 2102 | ptr = alloc_fn(cpu, PAGE_SIZE, PAGE_SIZE); |
2101 | if (!ptr) { | 2103 | if (!ptr) { |
2102 | pr_warn("PERCPU: failed to allocate %s page for cpu%u\n", | 2104 | pr_warn("failed to allocate %s page for cpu%u\n", |
2103 | psize_str, cpu); | 2105 | psize_str, cpu); |
2104 | goto enomem; | 2106 | goto enomem; |
2105 | } | 2107 | } |
@@ -2139,7 +2141,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, | |||
2139 | } | 2141 | } |
2140 | 2142 | ||
2141 | /* we're ready, commit */ | 2143 | /* we're ready, commit */ |
2142 | pr_info("PERCPU: %d %s pages/cpu @%p s%zu r%zu d%zu\n", | 2144 | pr_info("%d %s pages/cpu @%p s%zu r%zu d%zu\n", |
2143 | unit_pages, psize_str, vm.addr, ai->static_size, | 2145 | unit_pages, psize_str, vm.addr, ai->static_size, |
2144 | ai->reserved_size, ai->dyn_size); | 2146 | ai->reserved_size, ai->dyn_size); |
2145 | 2147 | ||