diff options
Diffstat (limited to 'kernel/profile.c')
-rw-r--r-- | kernel/profile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index dfadc5b729f1..b22a899934cc 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -365,14 +365,14 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info, | |||
365 | switch (action) { | 365 | switch (action) { |
366 | case CPU_UP_PREPARE: | 366 | case CPU_UP_PREPARE: |
367 | case CPU_UP_PREPARE_FROZEN: | 367 | case CPU_UP_PREPARE_FROZEN: |
368 | node = cpu_to_node(cpu); | 368 | node = cpu_to_mem(cpu); |
369 | per_cpu(cpu_profile_flip, cpu) = 0; | 369 | per_cpu(cpu_profile_flip, cpu) = 0; |
370 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { | 370 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { |
371 | page = alloc_pages_exact_node(node, | 371 | page = alloc_pages_exact_node(node, |
372 | GFP_KERNEL | __GFP_ZERO, | 372 | GFP_KERNEL | __GFP_ZERO, |
373 | 0); | 373 | 0); |
374 | if (!page) | 374 | if (!page) |
375 | return NOTIFY_BAD; | 375 | return notifier_from_errno(-ENOMEM); |
376 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); | 376 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); |
377 | } | 377 | } |
378 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { | 378 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { |
@@ -388,7 +388,7 @@ out_free: | |||
388 | page = virt_to_page(per_cpu(cpu_profile_hits, cpu)[1]); | 388 | page = virt_to_page(per_cpu(cpu_profile_hits, cpu)[1]); |
389 | per_cpu(cpu_profile_hits, cpu)[1] = NULL; | 389 | per_cpu(cpu_profile_hits, cpu)[1] = NULL; |
390 | __free_page(page); | 390 | __free_page(page); |
391 | return NOTIFY_BAD; | 391 | return notifier_from_errno(-ENOMEM); |
392 | case CPU_ONLINE: | 392 | case CPU_ONLINE: |
393 | case CPU_ONLINE_FROZEN: | 393 | case CPU_ONLINE_FROZEN: |
394 | if (prof_cpu_mask != NULL) | 394 | if (prof_cpu_mask != NULL) |
@@ -567,7 +567,7 @@ static int create_hash_tables(void) | |||
567 | int cpu; | 567 | int cpu; |
568 | 568 | ||
569 | for_each_online_cpu(cpu) { | 569 | for_each_online_cpu(cpu) { |
570 | int node = cpu_to_node(cpu); | 570 | int node = cpu_to_mem(cpu); |
571 | struct page *page; | 571 | struct page *page; |
572 | 572 | ||
573 | page = alloc_pages_exact_node(node, | 573 | page = alloc_pages_exact_node(node, |