diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:45:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:45:43 -0500 |
commit | 5cbb3d216e2041700231bcfc383ee5f8b7fc8b74 (patch) | |
tree | a738fa82dbcefa9bd283c08bc67f38827be63937 /kernel/cpu.c | |
parent | 9bc9ccd7db1c9f043f75380b5a5b94912046a60e (diff) | |
parent | 4e9b45a19241354daec281d7a785739829b52359 (diff) |
Merge branch 'akpm' (patches from Andrew Morton)
Merge first patch-bomb from Andrew Morton:
"Quite a lot of other stuff is banked up awaiting further
next->mainline merging, but this batch contains:
- Lots of random misc patches
- OCFS2
- Most of MM
- backlight updates
- lib/ updates
- printk updates
- checkpatch updates
- epoll tweaking
- rtc updates
- hfs
- hfsplus
- documentation
- procfs
- update gcov to gcc-4.7 format
- IPC"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (269 commits)
ipc, msg: fix message length check for negative values
ipc/util.c: remove unnecessary work pending test
devpts: plug the memory leak in kill_sb
./Makefile: export initial ramdisk compression config option
init/Kconfig: add option to disable kernel compression
drivers: w1: make w1_slave::flags long to avoid memory corruption
drivers/w1/masters/ds1wm.cuse dev_get_platdata()
drivers/memstick/core/ms_block.c: fix unreachable state in h_msb_read_page()
drivers/memstick/core/mspro_block.c: fix attributes array allocation
drivers/pps/clients/pps-gpio.c: remove redundant of_match_ptr
kernel/panic.c: reduce 1 byte usage for print tainted buffer
gcov: reuse kbasename helper
kernel/gcov/fs.c: use pr_warn()
kernel/module.c: use pr_foo()
gcov: compile specific gcov implementation based on gcc version
gcov: add support for gcc 4.7 gcov format
gcov: move gcov structs definitions to a gcc version specific file
kernel/taskstats.c: return -ENOMEM when alloc memory fails in add_del_listener()
kernel/taskstats.c: add nla_nest_cancel() for failure processing between nla_nest_start() and nla_nest_end()
kernel/sysctl_binary.c: use scnprintf() instead of snprintf()
...
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 63aa50d7ce1e..973d034acf84 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -437,11 +437,6 @@ int cpu_up(unsigned int cpu) | |||
437 | { | 437 | { |
438 | int err = 0; | 438 | int err = 0; |
439 | 439 | ||
440 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
441 | int nid; | ||
442 | pg_data_t *pgdat; | ||
443 | #endif | ||
444 | |||
445 | if (!cpu_possible(cpu)) { | 440 | if (!cpu_possible(cpu)) { |
446 | printk(KERN_ERR "can't online cpu %d because it is not " | 441 | printk(KERN_ERR "can't online cpu %d because it is not " |
447 | "configured as may-hotadd at boot time\n", cpu); | 442 | "configured as may-hotadd at boot time\n", cpu); |
@@ -452,27 +447,9 @@ int cpu_up(unsigned int cpu) | |||
452 | return -EINVAL; | 447 | return -EINVAL; |
453 | } | 448 | } |
454 | 449 | ||
455 | #ifdef CONFIG_MEMORY_HOTPLUG | 450 | err = try_online_node(cpu_to_node(cpu)); |
456 | nid = cpu_to_node(cpu); | 451 | if (err) |
457 | if (!node_online(nid)) { | 452 | return err; |
458 | err = mem_online_node(nid); | ||
459 | if (err) | ||
460 | return err; | ||
461 | } | ||
462 | |||
463 | pgdat = NODE_DATA(nid); | ||
464 | if (!pgdat) { | ||
465 | printk(KERN_ERR | ||
466 | "Can't online cpu %d due to NULL pgdat\n", cpu); | ||
467 | return -ENOMEM; | ||
468 | } | ||
469 | |||
470 | if (pgdat->node_zonelists->_zonerefs->zone == NULL) { | ||
471 | mutex_lock(&zonelists_mutex); | ||
472 | build_all_zonelists(NULL, NULL); | ||
473 | mutex_unlock(&zonelists_mutex); | ||
474 | } | ||
475 | #endif | ||
476 | 453 | ||
477 | cpu_maps_update_begin(); | 454 | cpu_maps_update_begin(); |
478 | 455 | ||