|
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 };
|
@@ -653,17 +652,27 @@ static void announce_cpu(int cpu, int apicid)
|
653 | 652 | {
|
654 | 653 | static int current_node = -1;
|
655 | 654 | int node = early_cpu_to_node(cpu);
|
656 |
| - int max_cpu_present = find_last_bit(cpumask_bits(cpu_present_mask), NR_CPUS); |
| 655 | + static int width; |
| 656 | + |
| 657 | + if (!width) |
| 658 | + width = num_digits(num_possible_cpus()) + 1; /* + '#' sign */ |
657 | 659 |
|
658 | 660 | if (system_state == SYSTEM_BOOTING) {
|
659 | 661 | if (node != current_node) {
|
660 | 662 | if (current_node > (-1))
|
661 | 663 | pr_cont(" OK\n");
|
662 | 664 | current_node = node;
|
663 |
| - pr_info("Booting Node %3d, Processors ", node); |
| 665 | + pr_info("Booting Node %3d, Processors:", node); |
664 | 666 | }
|
665 |
| - pr_cont(" #%4d%s", cpu, cpu == max_cpu_present ? " OK\n" : ""); |
666 |
| - return; |
| 667 | + |
| 668 | + /* Add padding for the BSP */ |
| 669 | + if (cpu == 1) |
| 670 | + pr_cont("%*s", width + 1, " "); |
| 671 | + |
| 672 | + pr_cont("%*s#%d", width - num_digits(cpu), " ", cpu); |
| 673 | + |
| 674 | + if (cpu == num_present_cpus() - 1) |
| 675 | + pr_cont(" OK\n"); |
667 | 676 | } else
|
668 | 677 | pr_info("Booting Node %d Processor %d APIC 0x%x\n",
|
669 | 678 | node, cpu, apicid);
|
|
0 commit comments