Commit 9ad1aeec authored by Linus Torvalds's avatar Linus Torvalds

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
parents 718c0ddd 51111dce
...@@ -821,14 +821,6 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) ...@@ -821,14 +821,6 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
return (send_status | accept_status); return (send_status | accept_status);
} }
void smp_announce(void)
{
int num_nodes = num_online_nodes();
printk(KERN_INFO "x86: Booted up %d node%s, %d CPUs\n",
num_nodes, (num_nodes > 1 ? "s" : ""), num_online_cpus());
}
/* reduce the number of lines printed when booting a large cpu count system */ /* reduce the number of lines printed when booting a large cpu count system */
static void announce_cpu(int cpu, int apicid) static void announce_cpu(int cpu, int apicid)
{ {
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
* *
* (C) Jens Axboe <jens.axboe@oracle.com> 2008 * (C) Jens Axboe <jens.axboe@oracle.com> 2008
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/irq_work.h> #include <linux/irq_work.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/rculist.h> #include <linux/rculist.h>
...@@ -543,19 +546,17 @@ void __init setup_nr_cpu_ids(void) ...@@ -543,19 +546,17 @@ void __init setup_nr_cpu_ids(void)
nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
} }
void __weak smp_announce(void)
{
printk(KERN_INFO "Brought up %d CPUs\n", num_online_cpus());
}
/* Called by boot processor to activate the rest. */ /* Called by boot processor to activate the rest. */
void __init smp_init(void) void __init smp_init(void)
{ {
int num_nodes, num_cpus;
unsigned int cpu; unsigned int cpu;
idle_threads_init(); idle_threads_init();
cpuhp_threads_init(); cpuhp_threads_init();
pr_info("Bringing up secondary CPUs ...\n");
/* FIXME: This should be done in userspace --RR */ /* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) { for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus) if (num_online_cpus() >= setup_max_cpus)
...@@ -564,8 +565,13 @@ void __init smp_init(void) ...@@ -564,8 +565,13 @@ void __init smp_init(void)
cpu_up(cpu); cpu_up(cpu);
} }
num_nodes = num_online_nodes();
num_cpus = num_online_cpus();
pr_info("Brought up %d node%s, %d CPU%s\n",
num_nodes, (num_nodes > 1 ? "s" : ""),
num_cpus, (num_cpus > 1 ? "s" : ""));
/* Any cleanup work */ /* Any cleanup work */
smp_announce();
smp_cpus_done(setup_max_cpus); smp_cpus_done(setup_max_cpus);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment