|
73 | 73 | #include <asm/setup.h> |
74 | 74 | #include <asm/uv/uv.h> |
75 | 75 | #include <linux/mc146818rtc.h> |
76 | | - |
77 | 76 | #include <asm/smpboot_hooks.h> |
78 | 77 | #include <asm/i8259.h> |
79 | | - |
80 | 78 | #include <asm/realmode.h> |
| 79 | +#include <asm/misc.h> |
81 | 80 |
|
82 | 81 | /* State of each CPU */ |
83 | 82 | DEFINE_PER_CPU(int, cpu_state) = { 0 }; |
@@ -648,22 +647,46 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) |
648 | 647 | return (send_status | accept_status); |
649 | 648 | } |
650 | 649 |
|
| 650 | +void smp_announce(void) |
| 651 | +{ |
| 652 | + int num_nodes = num_online_nodes(); |
| 653 | + |
| 654 | + printk(KERN_INFO "x86: Booted up %d node%s, %d CPUs\n", |
| 655 | + num_nodes, (num_nodes > 1 ? "s" : ""), num_online_cpus()); |
| 656 | +} |
| 657 | + |
651 | 658 | /* reduce the number of lines printed when booting a large cpu count system */ |
652 | 659 | static void announce_cpu(int cpu, int apicid) |
653 | 660 | { |
654 | 661 | static int current_node = -1; |
655 | 662 | int node = early_cpu_to_node(cpu); |
656 | | - int max_cpu_present = find_last_bit(cpumask_bits(cpu_present_mask), NR_CPUS); |
| 663 | + static int width, node_width; |
| 664 | + |
| 665 | + if (!width) |
| 666 | + width = num_digits(num_possible_cpus()) + 1; /* + '#' sign */ |
| 667 | + |
| 668 | + if (!node_width) |
| 669 | + node_width = num_digits(num_possible_nodes()) + 1; /* + '#' */ |
| 670 | + |
| 671 | + if (cpu == 1) |
| 672 | + printk(KERN_INFO "x86: Booting SMP configuration:\n"); |
657 | 673 |
|
658 | 674 | if (system_state == SYSTEM_BOOTING) { |
659 | 675 | if (node != current_node) { |
660 | 676 | if (current_node > (-1)) |
661 | | - pr_cont(" OK\n"); |
| 677 | + pr_cont("\n"); |
662 | 678 | current_node = node; |
663 | | - pr_info("Booting Node %3d, Processors ", node); |
| 679 | + |
| 680 | + printk(KERN_INFO ".... node %*s#%d, CPUs: ", |
| 681 | + node_width - num_digits(node), " ", node); |
664 | 682 | } |
665 | | - pr_cont(" #%4d%s", cpu, cpu == max_cpu_present ? " OK\n" : ""); |
666 | | - return; |
| 683 | + |
| 684 | + /* Add padding for the BSP */ |
| 685 | + if (cpu == 1) |
| 686 | + pr_cont("%*s", width + 1, " "); |
| 687 | + |
| 688 | + pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu); |
| 689 | + |
667 | 690 | } else |
668 | 691 | pr_info("Booting Node %d Processor %d APIC 0x%x\n", |
669 | 692 | node, cpu, apicid); |
|
0 commit comments