diff options
Diffstat (limited to 'kernel/profile.c')
| -rw-r--r-- | kernel/profile.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index 68afe121e507..fb660c7d35ba 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | * to resolve timer interrupt livelocks, William Irwin, Oracle, 2004 | 13 | * to resolve timer interrupt livelocks, William Irwin, Oracle, 2004 |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/config.h> | ||
| 17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 18 | #include <linux/profile.h> | 17 | #include <linux/profile.h> |
| 19 | #include <linux/bootmem.h> | 18 | #include <linux/bootmem.h> |
| @@ -299,7 +298,7 @@ out: | |||
| 299 | } | 298 | } |
| 300 | 299 | ||
| 301 | #ifdef CONFIG_HOTPLUG_CPU | 300 | #ifdef CONFIG_HOTPLUG_CPU |
| 302 | static int profile_cpu_callback(struct notifier_block *info, | 301 | static int __devinit profile_cpu_callback(struct notifier_block *info, |
| 303 | unsigned long action, void *__cpu) | 302 | unsigned long action, void *__cpu) |
| 304 | { | 303 | { |
| 305 | int node, cpu = (unsigned long)__cpu; | 304 | int node, cpu = (unsigned long)__cpu; |
| @@ -310,13 +309,17 @@ static int profile_cpu_callback(struct notifier_block *info, | |||
| 310 | node = cpu_to_node(cpu); | 309 | node = cpu_to_node(cpu); |
| 311 | per_cpu(cpu_profile_flip, cpu) = 0; | 310 | per_cpu(cpu_profile_flip, cpu) = 0; |
| 312 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { | 311 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { |
| 313 | page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); | 312 | page = alloc_pages_node(node, |
| 313 | GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, | ||
| 314 | 0); | ||
| 314 | if (!page) | 315 | if (!page) |
| 315 | return NOTIFY_BAD; | 316 | return NOTIFY_BAD; |
| 316 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); | 317 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); |
| 317 | } | 318 | } |
| 318 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { | 319 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { |
| 319 | page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); | 320 | page = alloc_pages_node(node, |
| 321 | GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, | ||
| 322 | 0); | ||
| 320 | if (!page) | 323 | if (!page) |
| 321 | goto out_free; | 324 | goto out_free; |
| 322 | per_cpu(cpu_profile_hits, cpu)[0] = page_address(page); | 325 | per_cpu(cpu_profile_hits, cpu)[0] = page_address(page); |
| @@ -492,12 +495,16 @@ static int __init create_hash_tables(void) | |||
| 492 | int node = cpu_to_node(cpu); | 495 | int node = cpu_to_node(cpu); |
| 493 | struct page *page; | 496 | struct page *page; |
| 494 | 497 | ||
| 495 | page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); | 498 | page = alloc_pages_node(node, |
| 499 | GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, | ||
| 500 | 0); | ||
| 496 | if (!page) | 501 | if (!page) |
| 497 | goto out_cleanup; | 502 | goto out_cleanup; |
| 498 | per_cpu(cpu_profile_hits, cpu)[1] | 503 | per_cpu(cpu_profile_hits, cpu)[1] |
| 499 | = (struct profile_hit *)page_address(page); | 504 | = (struct profile_hit *)page_address(page); |
| 500 | page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); | 505 | page = alloc_pages_node(node, |
| 506 | GFP_KERNEL | __GFP_ZERO | GFP_THISNODE, | ||
| 507 | 0); | ||
| 501 | if (!page) | 508 | if (!page) |
| 502 | goto out_cleanup; | 509 | goto out_cleanup; |
| 503 | per_cpu(cpu_profile_hits, cpu)[0] | 510 | per_cpu(cpu_profile_hits, cpu)[0] |
