summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2005-08-18 12:31:14 +0530
committerEric W. Biederman <ebiederm@xmission.com>2006-07-27 10:31:22 -0600
commitcd18217445dac97c298a9db43ad188ff14d63784 (patch)
treef6705123d042114d9e82afb9895b7192214425de
parent3f22360d1c6a9d8aca77a4f2973cdd54487cf0c3 (diff)
x86-64 compilation failure fix
Hi Eric, I just realized that my recent patches of kdump for i386 broke kexec-tools compilation on x86-64 machine. Here is a patch attached to fix the problem. Thanks Vivek o This patch fixes a x86_64 compilation failure issue. Recent patches changed the function signature of funciton setup_linux_system_parameters(). Additional parameter kexec_flags is being passed now. This patch makes sure that this function is called with appropriate parameters. o x86_64 code also compiles i386 elf32 vmlinux loader code. i386 elf loader code inturn uses crashdump code (crashdump-x86.c). Modified x86_64 makefile to compile crashdump-x86.c as well. o phdr->vaddr size type unsigened int. Did minor modificaition to make sure it compiles without warnings in x86_64 context. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-rw-r--r--kexec/arch/i386/crashdump-x86.c2
-rw-r--r--kexec/arch/x86_64/Makefile1
-rw-r--r--kexec/arch/x86_64/kexec-elf-x86_64.c2
-rw-r--r--kexec/arch/x86_64/kexec-x86_64.c2
4 files changed, 4 insertions, 3 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 9984bec..6837144 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -635,7 +635,7 @@ static int prepare_crash_memory_elf32_headers(struct kexec_info *info,
if (mend <= (MAXMEM - 1))
phdr->p_vaddr = mstart + PAGE_OFFSET;
else
- phdr->p_vaddr = ULONG_MAX;
+ phdr->p_vaddr = UINT_MAX;
phdr->p_paddr = mstart;
phdr->p_filesz = phdr->p_memsz = mend - mstart + 1;
/* Do we need any alignment of segments? */
diff --git a/kexec/arch/x86_64/Makefile b/kexec/arch/x86_64/Makefile
index 366e792..18e1690 100644
--- a/kexec/arch/x86_64/Makefile
+++ b/kexec/arch/x86_64/Makefile
@@ -1,6 +1,7 @@
#
# kexec x86_64 (linux booting linux)
#
+KEXEC_C_SRCS+= kexec/arch/i386/crashdump-x86.c
KEXEC_C_SRCS+= kexec/arch/i386/kexec-elf-x86.c
KEXEC_C_SRCS+= kexec/arch/i386/kexec-bzImage.c
KEXEC_C_SRCS+= kexec/arch/i386/kexec-multiboot-x86.c
diff --git a/kexec/arch/x86_64/kexec-elf-x86_64.c b/kexec/arch/x86_64/kexec-elf-x86_64.c
index 8b15230..5cac0e6 100644
--- a/kexec/arch/x86_64/kexec-elf-x86_64.c
+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
@@ -221,7 +221,7 @@ int elf_x86_64_load(int argc, char **argv, const char *buf, off_t len,
ramdisk_buf, ramdisk_length);
/* Fill in the information bios calls would usually provide */
- setup_linux_system_parameters(&hdr->hdr);
+ setup_linux_system_parameters(&hdr->hdr, info->kexec_flags);
/* Initialize the registers */
elf_rel_get_symbol(&info->rhdr, "entry64_regs", &regs, sizeof(regs));
diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c
index 557a478..6bf1c5b 100644
--- a/kexec/arch/x86_64/kexec-x86_64.c
+++ b/kexec/arch/x86_64/kexec-x86_64.c
@@ -125,7 +125,7 @@ void arch_usage(void)
);
}
-static struct {
+struct {
uint8_t reset_vga;
uint16_t serial_base;
uint32_t serial_baud;