[patch 2/4] remove extra acpi_rsdp command line for efi

dyoung
2013-10-27T04:13:15Z

[-- Attachment #1: 02-kexec-remove-cmdline-add-efi.patch --]
[-- Type: text/plain, Size: 2036 bytes --]

Removing code to pass acpi_rsdp because this
patch series will support efi runtime, it's not
necessary any more. EFI initialization code will
take the functionality.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
include/x86/x86-linux.h | 3 ++-
kexec/arch/i386/crashdump-x86.c | 35 -----------------------------------
kexec/arch/i386/x86-linux-setup.c | 8 ++++++++
3 files changed, 10 insertions(+), 36 deletions(-)

--- kexec-tools.orig/kexec/arch/i386/crashdump-x86.c
+++ kexec-tools/kexec/arch/i386/crashdump-x86.c
@@ -848,40 +848,6 @@ static int cmdline_add_memmap_acpi(char
return 0;
}

-/* Appends 'acpi_rsdp=' commandline for efi boot crash dump */
-static void cmdline_add_efi(char *cmdline)
-{
- FILE *fp;
- int cmdlen, len;
- char line[MAX_LINE], *s;
- const char *acpis = " acpi_rsdp=";
-
- fp = fopen("/sys/firmware/efi/systab", "r");
- if (!fp)
- return;
-
- while(fgets(line, sizeof(line), fp) != 0) {
- /* ACPI20= always goes before ACPI= */
- if ((strstr(line, "ACPI20=")) || (strstr(line, "ACPI="))) {
- line[strlen(line) - 1] = '\0';
- s = strchr(line, '=');
- s += 1;
- len = strlen(s) + strlen(acpis);
- cmdlen = strlen(cmdline) + len;
- if (cmdlen > (COMMAND_LINE_SIZE - 1))
- die("Command line overflow\n");
- strcat(cmdline, acpis);
- strcat(cmdline, s);
- dbgprintf("Command line after adding efi\n");
- dbgprintf("%s\n", cmdline);
-
- break;
- }
- }
-
- fclose(fp);
-}
-
static void get_backup_area(struct kexec_info *info,
struct memory_range *range, int ranges)
{
@@ -1046,7 +1012,6 @@ int load_crashdump_segments(struct kexec
if (delete_memmap(memmap_p, elfcorehdr, memsz) < 0)
return -1;
cmdline_add_memmap(mod_cmdline, memmap_p);
- cmdline_add_efi(mod_cmdline);
cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);

/* Inform second kernel about the presence of ACPI tables. */