aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/efi.c')
-rw-r--r--arch/ia64/kernel/efi.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index c485a3b32ba8..9990320b6f9a 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -410,24 +410,16 @@ efi_init (void)
410 efi_config_table_t *config_tables; 410 efi_config_table_t *config_tables;
411 efi_char16_t *c16; 411 efi_char16_t *c16;
412 u64 efi_desc_size; 412 u64 efi_desc_size;
413 char *cp, *end, vendor[100] = "unknown"; 413 char *cp, vendor[100] = "unknown";
414 extern char saved_command_line[]; 414 extern char saved_command_line[];
415 int i; 415 int i;
416 416
417 /* it's too early to be able to use the standard kernel command line support... */ 417 /* it's too early to be able to use the standard kernel command line support... */
418 for (cp = saved_command_line; *cp; ) { 418 for (cp = saved_command_line; *cp; ) {
419 if (memcmp(cp, "mem=", 4) == 0) { 419 if (memcmp(cp, "mem=", 4) == 0) {
420 cp += 4; 420 mem_limit = memparse(cp + 4, &cp);
421 mem_limit = memparse(cp, &end);
422 if (end != cp)
423 break;
424 cp = end;
425 } else if (memcmp(cp, "max_addr=", 9) == 0) { 421 } else if (memcmp(cp, "max_addr=", 9) == 0) {
426 cp += 9; 422 max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
427 max_addr = GRANULEROUNDDOWN(memparse(cp, &end));
428 if (end != cp)
429 break;
430 cp = end;
431 } else { 423 } else {
432 while (*cp != ' ' && *cp) 424 while (*cp != ' ' && *cp)
433 ++cp; 425 ++cp;
@@ -458,7 +450,7 @@ efi_init (void)
458 /* Show what we know for posterity */ 450 /* Show what we know for posterity */
459 c16 = __va(efi.systab->fw_vendor); 451 c16 = __va(efi.systab->fw_vendor);
460 if (c16) { 452 if (c16) {
461 for (i = 0;i < (int) sizeof(vendor) && *c16; ++i) 453 for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i)
462 vendor[i] = *c16++; 454 vendor[i] = *c16++;
463 vendor[i] = '\0'; 455 vendor[i] = '\0';
464 } 456 }