]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - fs/proc/vmcore.c
kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE
[linux-2.6.git] / fs / proc / vmcore.c
index d96050728c43841c048ff3c4a181c1431f918e10..4c65ca432d30797d760493b1fd85bb296fdda1b2 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/mm.h>
 #include <linux/proc_fs.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/elf.h>
 #include <linux/elfcore.h>
 #include <linux/highmem.h>
@@ -33,9 +32,6 @@ static size_t elfcorebuf_sz;
 /* Total size of vmcore file. */
 static u64 vmcore_size;
 
-/* Stores the physical address of elf header of crash image. */
-unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
-
 struct proc_dir_entry *proc_vmcore = NULL;
 
 /* Reads a page from the oldmem device from given offset. */
@@ -166,14 +162,8 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
        return acc;
 }
 
-static int open_vmcore(struct inode *inode, struct file *filp)
-{
-       return 0;
-}
-
 const struct file_operations proc_vmcore_operations = {
        .read           = read_vmcore,
-       .open           = open_vmcore,
 };
 
 static struct vmcore* __init get_new_element(void)
@@ -514,7 +504,7 @@ static int __init parse_crash_elf64_headers(void)
        /* Do some basic Verification. */
        if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 ||
                (ehdr.e_type != ET_CORE) ||
-               !elf_check_arch(&ehdr) ||
+               !vmcore_elf_check_arch(&ehdr) ||
                ehdr.e_ident[EI_CLASS] != ELFCLASS64 ||
                ehdr.e_ident[EI_VERSION] != EV_CURRENT ||
                ehdr.e_version != EV_CURRENT ||