aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/setup.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 339e8a54c2f1..69b9bb3fd7c5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -692,12 +692,15 @@ struct seq_operations cpuinfo_op = {
692 .show = show_cpuinfo 692 .show = show_cpuinfo
693}; 693};
694 694
695static char brandname[128]; 695#define MAX_BRANDS 8
696static char brandname[MAX_BRANDS][128];
696 697
697static char * __cpuinit 698static char * __cpuinit
698get_model_name(__u8 family, __u8 model) 699get_model_name(__u8 family, __u8 model)
699{ 700{
701 static int overflow;
700 char brand[128]; 702 char brand[128];
703 int i;
701 704
702 memcpy(brand, "Unknown", 8); 705 memcpy(brand, "Unknown", 8);
703 if (ia64_pal_get_brand_info(brand)) { 706 if (ia64_pal_get_brand_info(brand)) {
@@ -709,12 +712,17 @@ get_model_name(__u8 family, __u8 model)
709 case 2: memcpy(brand, "Madison up to 9M cache", 23); break; 712 case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
710 } 713 }
711 } 714 }
712 if (brandname[0] == '\0') 715 for (i = 0; i < MAX_BRANDS; i++)
713 return strcpy(brandname, brand); 716 if (strcmp(brandname[i], brand) == 0)
714 else if (strcmp(brandname, brand) == 0) 717 return brandname[i];
715 return brandname; 718 for (i = 0; i < MAX_BRANDS; i++)
716 else 719 if (brandname[i][0] == '\0')
717 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";
718} 726}
719 727
720static void __cpuinit 728static void __cpuinit