diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-12 13:02:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-12 13:02:01 -0500 |
commit | 9ad1aeecdbbf002637f0466e8935a3248d1843ad (patch) | |
tree | 01f884f3a62331273c2b07a16a5deb5b58174c1f | |
parent | 718c0ddd6aa911fd2a6fb1b6e050fbaee8060e61 (diff) | |
parent | 51111dce2509506d16efd321939895ff7ffe1dc2 (diff) |
Merge branch 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull SMP bootup updates from Ingo Molnar:
"Three changes to unify/standardize some of the bootup message printing
in kernel/smp.c between architectures"
* 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
kernel/smp: Tell the user we're bringing up secondary CPUs
kernel/smp: Make the SMP boot message common on all arches
kernel/smp: Define pr_fmt() for smp.c
-rw-r--r-- | arch/x86/kernel/smpboot.c | 8 | ||||
-rw-r--r-- | kernel/smp.c | 18 |
2 files changed, 12 insertions, 14 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 42f5eb7b4f6c..b9f02383f372 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -821,14 +821,6 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | |||
821 | return (send_status | accept_status); | 821 | return (send_status | accept_status); |
822 | } | 822 | } |
823 | 823 | ||
824 | void smp_announce(void) | ||
825 | { | ||
826 | int num_nodes = num_online_nodes(); | ||
827 | |||
828 | printk(KERN_INFO "x86: Booted up %d node%s, %d CPUs\n", | ||
829 | num_nodes, (num_nodes > 1 ? "s" : ""), num_online_cpus()); | ||
830 | } | ||
831 | |||
832 | /* reduce the number of lines printed when booting a large cpu count system */ | 824 | /* reduce the number of lines printed when booting a large cpu count system */ |
833 | static void announce_cpu(int cpu, int apicid) | 825 | static void announce_cpu(int cpu, int apicid) |
834 | { | 826 | { |
diff --git a/kernel/smp.c b/kernel/smp.c index bba3b201668d..77fcdb9f2775 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * (C) Jens Axboe <jens.axboe@oracle.com> 2008 | 4 | * (C) Jens Axboe <jens.axboe@oracle.com> 2008 |
5 | */ | 5 | */ |
6 | |||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
8 | |||
6 | #include <linux/irq_work.h> | 9 | #include <linux/irq_work.h> |
7 | #include <linux/rcupdate.h> | 10 | #include <linux/rcupdate.h> |
8 | #include <linux/rculist.h> | 11 | #include <linux/rculist.h> |
@@ -543,19 +546,17 @@ void __init setup_nr_cpu_ids(void) | |||
543 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | 546 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; |
544 | } | 547 | } |
545 | 548 | ||
546 | void __weak smp_announce(void) | ||
547 | { | ||
548 | printk(KERN_INFO "Brought up %d CPUs\n", num_online_cpus()); | ||
549 | } | ||
550 | |||
551 | /* Called by boot processor to activate the rest. */ | 549 | /* Called by boot processor to activate the rest. */ |
552 | void __init smp_init(void) | 550 | void __init smp_init(void) |
553 | { | 551 | { |
552 | int num_nodes, num_cpus; | ||
554 | unsigned int cpu; | 553 | unsigned int cpu; |
555 | 554 | ||
556 | idle_threads_init(); | 555 | idle_threads_init(); |
557 | cpuhp_threads_init(); | 556 | cpuhp_threads_init(); |
558 | 557 | ||
558 | pr_info("Bringing up secondary CPUs ...\n"); | ||
559 | |||
559 | /* FIXME: This should be done in userspace --RR */ | 560 | /* FIXME: This should be done in userspace --RR */ |
560 | for_each_present_cpu(cpu) { | 561 | for_each_present_cpu(cpu) { |
561 | if (num_online_cpus() >= setup_max_cpus) | 562 | if (num_online_cpus() >= setup_max_cpus) |
@@ -564,8 +565,13 @@ void __init smp_init(void) | |||
564 | cpu_up(cpu); | 565 | cpu_up(cpu); |
565 | } | 566 | } |
566 | 567 | ||
568 | num_nodes = num_online_nodes(); | ||
569 | num_cpus = num_online_cpus(); | ||
570 | pr_info("Brought up %d node%s, %d CPU%s\n", | ||
571 | num_nodes, (num_nodes > 1 ? "s" : ""), | ||
572 | num_cpus, (num_cpus > 1 ? "s" : "")); | ||
573 | |||
567 | /* Any cleanup work */ | 574 | /* Any cleanup work */ |
568 | smp_announce(); | ||
569 | smp_cpus_done(setup_max_cpus); | 575 | smp_cpus_done(setup_max_cpus); |
570 | } | 576 | } |
571 | 577 | ||