diff options
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 7d6fe65c93f4..dc7dd7648ec5 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -91,8 +91,6 @@ static struct resource code_resource = { | |||
91 | .name = "Kernel code", | 91 | .name = "Kernel code", |
92 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM | 92 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM |
93 | }; | 93 | }; |
94 | extern void efi_initialize_iomem_resources(struct resource *, | ||
95 | struct resource *); | ||
96 | extern char _text[], _end[], _etext[]; | 94 | extern char _text[], _end[], _etext[]; |
97 | 95 | ||
98 | unsigned long ia64_max_cacheline_size; | 96 | unsigned long ia64_max_cacheline_size; |
@@ -642,7 +640,7 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
642 | "features : %s\n" | 640 | "features : %s\n" |
643 | "cpu number : %lu\n" | 641 | "cpu number : %lu\n" |
644 | "cpu regs : %u\n" | 642 | "cpu regs : %u\n" |
645 | "cpu MHz : %lu.%06lu\n" | 643 | "cpu MHz : %lu.%03lu\n" |
646 | "itc MHz : %lu.%06lu\n" | 644 | "itc MHz : %lu.%06lu\n" |
647 | "BogoMIPS : %lu.%02lu\n", | 645 | "BogoMIPS : %lu.%02lu\n", |
648 | cpunum, c->vendor, c->family, c->model, | 646 | cpunum, c->vendor, c->family, c->model, |
@@ -694,12 +692,15 @@ struct seq_operations cpuinfo_op = { | |||
694 | .show = show_cpuinfo | 692 | .show = show_cpuinfo |
695 | }; | 693 | }; |
696 | 694 | ||
697 | static char brandname[128]; | 695 | #define MAX_BRANDS 8 |
696 | static char brandname[MAX_BRANDS][128]; | ||
698 | 697 | ||
699 | static char * __cpuinit | 698 | static char * __cpuinit |
700 | get_model_name(__u8 family, __u8 model) | 699 | get_model_name(__u8 family, __u8 model) |
701 | { | 700 | { |
701 | static int overflow; | ||
702 | char brand[128]; | 702 | char brand[128]; |
703 | int i; | ||
703 | 704 | ||
704 | memcpy(brand, "Unknown", 8); | 705 | memcpy(brand, "Unknown", 8); |
705 | if (ia64_pal_get_brand_info(brand)) { | 706 | if (ia64_pal_get_brand_info(brand)) { |
@@ -711,12 +712,17 @@ get_model_name(__u8 family, __u8 model) | |||
711 | case 2: memcpy(brand, "Madison up to 9M cache", 23); break; | 712 | case 2: memcpy(brand, "Madison up to 9M cache", 23); break; |
712 | } | 713 | } |
713 | } | 714 | } |
714 | if (brandname[0] == '\0') | 715 | for (i = 0; i < MAX_BRANDS; i++) |
715 | return strcpy(brandname, brand); | 716 | if (strcmp(brandname[i], brand) == 0) |
716 | else if (strcmp(brandname, brand) == 0) | 717 | return brandname[i]; |
717 | return brandname; | 718 | for (i = 0; i < MAX_BRANDS; i++) |
718 | else | 719 | if (brandname[i][0] == '\0') |
719 | return kstrdup(brand, GFP_KERNEL); | 720 | return strcpy(brandname[i], brand); |
721 | if (overflow++ == 0) | ||
722 | printk(KERN_ERR | ||
723 | "%s: Table overflow. Some processor model information will be missing\n", | ||
724 | __FUNCTION__); | ||
725 | return "Unknown"; | ||
720 | } | 726 | } |
721 | 727 | ||
722 | static void __cpuinit | 728 | static void __cpuinit |