summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_percpu.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-08-14 08:00:49 +0200
committerTejun Heo <tj@kernel.org>2009-08-14 08:00:49 +0200
commit00ae4064b1445524752575dd84df227c0687c99d (patch)
treebfe3400aed0d9f97c15ac991ba09af32387056ae /arch/x86/kernel/setup_percpu.c
parentpercpu: improve boot messages (diff)
downloadlinux-00ae4064b1445524752575dd84df227c0687c99d.tar.xz
linux-00ae4064b1445524752575dd84df227c0687c99d.zip
percpu: rename 4k first chunk allocator to page
Page size isn't always 4k depending on arch and configuration. Rename 4k first chunk allocator to page. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/x86/kernel/setup_percpu.c')
-rw-r--r--arch/x86/kernel/setup_percpu.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index a26ff61e2fb0..1e17711c29d6 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -249,21 +249,22 @@ static ssize_t __init setup_pcpu_embed(size_t static_size, bool chosen)
}
/*
- * 4k allocator
+ * Page allocator
*
- * Boring fallback 4k allocator. This allocator puts more pressure on
- * PTE TLBs but other than that behaves nicely on both UMA and NUMA.
+ * Boring fallback 4k page allocator. This allocator puts more
+ * pressure on PTE TLBs but other than that behaves nicely on both UMA
+ * and NUMA.
*/
-static void __init pcpu4k_populate_pte(unsigned long addr)
+static void __init pcpup_populate_pte(unsigned long addr)
{
populate_extra_pte(addr);
}
-static ssize_t __init setup_pcpu_4k(size_t static_size)
+static ssize_t __init setup_pcpu_page(size_t static_size)
{
- return pcpu_4k_first_chunk(static_size, PERCPU_FIRST_CHUNK_RESERVE,
- pcpu_fc_alloc, pcpu_fc_free,
- pcpu4k_populate_pte);
+ return pcpu_page_first_chunk(static_size, PERCPU_FIRST_CHUNK_RESERVE,
+ pcpu_fc_alloc, pcpu_fc_free,
+ pcpup_populate_pte);
}
/* for explicit first chunk allocator selection */
@@ -307,7 +308,7 @@ void __init setup_per_cpu_areas(void)
*/
ret = -EINVAL;
if (strlen(pcpu_chosen_alloc)) {
- if (strcmp(pcpu_chosen_alloc, "4k")) {
+ if (strcmp(pcpu_chosen_alloc, "page")) {
if (!strcmp(pcpu_chosen_alloc, "lpage"))
ret = setup_pcpu_lpage(static_size, true);
else if (!strcmp(pcpu_chosen_alloc, "embed"))
@@ -317,7 +318,7 @@ void __init setup_per_cpu_areas(void)
"specified\n", pcpu_chosen_alloc);
if (ret < 0)
pr_warning("PERCPU: %s allocator failed (%zd), "
- "falling back to 4k\n",
+ "falling back to page size\n",
pcpu_chosen_alloc, ret);
}
} else {
@@ -326,7 +327,7 @@ void __init setup_per_cpu_areas(void)
ret = setup_pcpu_embed(static_size, false);
}
if (ret < 0)
- ret = setup_pcpu_4k(static_size);
+ ret = setup_pcpu_page(static_size);
if (ret < 0)
panic("cannot allocate static percpu area (%zu bytes, err=%zd)",
static_size, ret);