Commit 9d78f43d authored by Zou Nan hai's avatar Zou Nan hai Committed by Tony Luck

[IA64] Fix wrong use of memparse in efi.c

The check of (end != cp) after memparse in efi.c looks wrong to me.
The result is that we can't use mem= and max_addr= kernel parameter at
the same time.

The following patch removed the check just like other arches do.
Signed-off-by: default avatarZou Nan hai <nanhai.zou@intel.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ecdd5dab
...@@ -410,24 +410,16 @@ efi_init (void) ...@@ -410,24 +410,16 @@ efi_init (void)
efi_config_table_t *config_tables; efi_config_table_t *config_tables;
efi_char16_t *c16; efi_char16_t *c16;
u64 efi_desc_size; u64 efi_desc_size;
char *cp, *end, vendor[100] = "unknown"; char *cp, vendor[100] = "unknown";
extern char saved_command_line[]; extern char saved_command_line[];
int i; int i;
/* it's too early to be able to use the standard kernel command line support... */ /* it's too early to be able to use the standard kernel command line support... */
for (cp = saved_command_line; *cp; ) { for (cp = saved_command_line; *cp; ) {
if (memcmp(cp, "mem=", 4) == 0) { if (memcmp(cp, "mem=", 4) == 0) {
cp += 4; mem_limit = memparse(cp + 4, &cp);
mem_limit = memparse(cp, &end);
if (end != cp)
break;
cp = end;
} else if (memcmp(cp, "max_addr=", 9) == 0) { } else if (memcmp(cp, "max_addr=", 9) == 0) {
cp += 9; max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
max_addr = GRANULEROUNDDOWN(memparse(cp, &end));
if (end != cp)
break;
cp = end;
} else { } else {
while (*cp != ' ' && *cp) while (*cp != ' ' && *cp)
++cp; ++cp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment