Skip to content

Commit

Permalink
[IA64] Take defensive stance on ia64_pal_get_brand_info()
Browse files Browse the repository at this point in the history
Stephane thought he saw a problem here (but was just confused
by the return value from ia64_pal_get_brand_info()).  But we
should be more defensive here in case an prototype PAL for
a future processor doesn't implement this PAL call.

Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Tony Luck committed Dec 12, 2006
1 parent a460ef8 commit 75f6a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,15 +674,15 @@ get_model_name(__u8 family, __u8 model)
{
char brand[128];

memcpy(brand, "Unknown", 8);
if (ia64_pal_get_brand_info(brand)) {
if (family == 0x7)
memcpy(brand, "Merced", 7);
else if (family == 0x1f) switch (model) {
case 0: memcpy(brand, "McKinley", 9); break;
case 1: memcpy(brand, "Madison", 8); break;
case 2: memcpy(brand, "Madison up to 9M cache", 23); break;
} else
memcpy(brand, "Unknown", 8);
}
}
if (brandname[0] == '\0')
return strcpy(brandname, brand);
Expand Down

0 comments on commit 75f6a1d

Please sign in to comment.