diff options
author | Tejun Heo <tj@kernel.org> | 2009-08-14 02:00:49 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-08-14 02:00:49 -0400 |
commit | 00ae4064b1445524752575dd84df227c0687c99d (patch) | |
tree | bfe3400aed0d9f97c15ac991ba09af32387056ae /arch/x86/kernel/setup_percpu.c | |
parent | 004018e2c06b9c650e88dddd973ae36799ed72b9 (diff) |
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.c | 23 |
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) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | /* | 251 | /* |
252 | * 4k allocator | 252 | * Page allocator |
253 | * | 253 | * |
254 | * Boring fallback 4k allocator. This allocator puts more pressure on | 254 | * Boring fallback 4k page allocator. This allocator puts more |
255 | * PTE TLBs but other than that behaves nicely on both UMA and NUMA. | 255 | * pressure on PTE TLBs but other than that behaves nicely on both UMA |
256 | * and NUMA. | ||
256 | */ | 257 | */ |
257 | static void __init pcpu4k_populate_pte(unsigned long addr) | 258 | static void __init pcpup_populate_pte(unsigned long addr) |
258 | { | 259 | { |
259 | populate_extra_pte(addr); | 260 | populate_extra_pte(addr); |
260 | } | 261 | } |
261 | 262 | ||
262 | static ssize_t __init setup_pcpu_4k(size_t static_size) | 263 | static ssize_t __init setup_pcpu_page(size_t static_size) |
263 | { | 264 | { |
264 | return pcpu_4k_first_chunk(static_size, PERCPU_FIRST_CHUNK_RESERVE, | 265 | return pcpu_page_first_chunk(static_size, PERCPU_FIRST_CHUNK_RESERVE, |
265 | pcpu_fc_alloc, pcpu_fc_free, | 266 | pcpu_fc_alloc, pcpu_fc_free, |
266 | pcpu4k_populate_pte); | 267 | pcpup_populate_pte); |
267 | } | 268 | } |
268 | 269 | ||
269 | /* for explicit first chunk allocator selection */ | 270 | /* for explicit first chunk allocator selection */ |
@@ -307,7 +308,7 @@ void __init setup_per_cpu_areas(void) | |||
307 | */ | 308 | */ |
308 | ret = -EINVAL; | 309 | ret = -EINVAL; |
309 | if (strlen(pcpu_chosen_alloc)) { | 310 | if (strlen(pcpu_chosen_alloc)) { |
310 | if (strcmp(pcpu_chosen_alloc, "4k")) { | 311 | if (strcmp(pcpu_chosen_alloc, "page")) { |
311 | if (!strcmp(pcpu_chosen_alloc, "lpage")) | 312 | if (!strcmp(pcpu_chosen_alloc, "lpage")) |
312 | ret = setup_pcpu_lpage(static_size, true); | 313 | ret = setup_pcpu_lpage(static_size, true); |
313 | else if (!strcmp(pcpu_chosen_alloc, "embed")) | 314 | else if (!strcmp(pcpu_chosen_alloc, "embed")) |
@@ -317,7 +318,7 @@ void __init setup_per_cpu_areas(void) | |||
317 | "specified\n", pcpu_chosen_alloc); | 318 | "specified\n", pcpu_chosen_alloc); |
318 | if (ret < 0) | 319 | if (ret < 0) |
319 | pr_warning("PERCPU: %s allocator failed (%zd), " | 320 | pr_warning("PERCPU: %s allocator failed (%zd), " |
320 | "falling back to 4k\n", | 321 | "falling back to page size\n", |
321 | pcpu_chosen_alloc, ret); | 322 | pcpu_chosen_alloc, ret); |
322 | } | 323 | } |
323 | } else { | 324 | } else { |
@@ -326,7 +327,7 @@ void __init setup_per_cpu_areas(void) | |||
326 | ret = setup_pcpu_embed(static_size, false); | 327 | ret = setup_pcpu_embed(static_size, false); |
327 | } | 328 | } |
328 | if (ret < 0) | 329 | if (ret < 0) |
329 | ret = setup_pcpu_4k(static_size); | 330 | ret = setup_pcpu_page(static_size); |
330 | if (ret < 0) | 331 | if (ret < 0) |
331 | panic("cannot allocate static percpu area (%zu bytes, err=%zd)", | 332 | panic("cannot allocate static percpu area (%zu bytes, err=%zd)", |
332 | static_size, ret); | 333 | static_size, ret); |