diff options
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index ad567b8d432e..5fa09d141ab7 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -262,7 +262,7 @@ reserve_memory (void) | |||
262 | * appropriate after a kernel panic. | 262 | * appropriate after a kernel panic. |
263 | */ | 263 | */ |
264 | { | 264 | { |
265 | char *from = strstr(saved_command_line, "crashkernel="); | 265 | char *from = strstr(boot_command_line, "crashkernel="); |
266 | unsigned long base, size; | 266 | unsigned long base, size; |
267 | if (from) { | 267 | if (from) { |
268 | size = memparse(from + 12, &from); | 268 | size = memparse(from + 12, &from); |
@@ -463,7 +463,7 @@ setup_arch (char **cmdline_p) | |||
463 | ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); | 463 | ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); |
464 | 464 | ||
465 | *cmdline_p = __va(ia64_boot_param->command_line); | 465 | *cmdline_p = __va(ia64_boot_param->command_line); |
466 | strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE); | 466 | strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE); |
467 | 467 | ||
468 | efi_init(); | 468 | efi_init(); |
469 | io_port_init(); | 469 | io_port_init(); |
@@ -569,34 +569,31 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
569 | { 1UL << 1, "spontaneous deferral"}, | 569 | { 1UL << 1, "spontaneous deferral"}, |
570 | { 1UL << 2, "16-byte atomic ops" } | 570 | { 1UL << 2, "16-byte atomic ops" } |
571 | }; | 571 | }; |
572 | char features[128], *cp, sep; | 572 | char features[128], *cp, *sep; |
573 | struct cpuinfo_ia64 *c = v; | 573 | struct cpuinfo_ia64 *c = v; |
574 | unsigned long mask; | 574 | unsigned long mask; |
575 | unsigned long proc_freq; | 575 | unsigned long proc_freq; |
576 | int i; | 576 | int i, size; |
577 | 577 | ||
578 | mask = c->features; | 578 | mask = c->features; |
579 | 579 | ||
580 | /* build the feature string: */ | 580 | /* build the feature string: */ |
581 | memcpy(features, " standard", 10); | 581 | memcpy(features, "standard", 9); |
582 | cp = features; | 582 | cp = features; |
583 | sep = 0; | 583 | size = sizeof(features); |
584 | for (i = 0; i < (int) ARRAY_SIZE(feature_bits); ++i) { | 584 | sep = ""; |
585 | for (i = 0; i < ARRAY_SIZE(feature_bits) && size > 1; ++i) { | ||
585 | if (mask & feature_bits[i].mask) { | 586 | if (mask & feature_bits[i].mask) { |
586 | if (sep) | 587 | cp += snprintf(cp, size, "%s%s", sep, |
587 | *cp++ = sep; | 588 | feature_bits[i].feature_name), |
588 | sep = ','; | 589 | sep = ", "; |
589 | *cp++ = ' '; | ||
590 | strcpy(cp, feature_bits[i].feature_name); | ||
591 | cp += strlen(feature_bits[i].feature_name); | ||
592 | mask &= ~feature_bits[i].mask; | 590 | mask &= ~feature_bits[i].mask; |
591 | size = sizeof(features) - (cp - features); | ||
593 | } | 592 | } |
594 | } | 593 | } |
595 | if (mask) { | 594 | if (mask && size > 1) { |
596 | /* print unknown features as a hex value: */ | 595 | /* print unknown features as a hex value */ |
597 | if (sep) | 596 | snprintf(cp, size, "%s0x%lx", sep, mask); |
598 | *cp++ = sep; | ||
599 | sprintf(cp, " 0x%lx", mask); | ||
600 | } | 597 | } |
601 | 598 | ||
602 | proc_freq = cpufreq_quick_get(cpunum); | 599 | proc_freq = cpufreq_quick_get(cpunum); |
@@ -612,7 +609,7 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
612 | "model name : %s\n" | 609 | "model name : %s\n" |
613 | "revision : %u\n" | 610 | "revision : %u\n" |
614 | "archrev : %u\n" | 611 | "archrev : %u\n" |
615 | "features :%s\n" /* don't change this---it _is_ right! */ | 612 | "features : %s\n" |
616 | "cpu number : %lu\n" | 613 | "cpu number : %lu\n" |
617 | "cpu regs : %u\n" | 614 | "cpu regs : %u\n" |
618 | "cpu MHz : %lu.%06lu\n" | 615 | "cpu MHz : %lu.%06lu\n" |