[PATCH] zoned vm counters: split NR_ANON_PAGES off from NR_FILE_MAPPED
[pandora-kernel.git] / fs / proc / vmcore.c
index 3b2e7b6..20d4b22 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/a.out.h>
 #include <linux/elf.h>
 #include <linux/elfcore.h>
-#include <linux/proc_fs.h>
 #include <linux/highmem.h>
 #include <linux/bootmem.h>
 #include <linux/init.h>
@@ -35,11 +34,14 @@ 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. */
 static ssize_t read_from_oldmem(char *buf, size_t count,
-                            loff_t *ppos, int userbuf)
+                               u64 *ppos, int userbuf)
 {
        unsigned long pfn, offset;
        size_t nr_bytes;
@@ -101,8 +103,8 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
                                size_t buflen, loff_t *fpos)
 {
        ssize_t acc = 0, tmp;
-       size_t tsz, nr_bytes;
-       u64 start;
+       size_t tsz;
+       u64 start, nr_bytes;
        struct vmcore *curr_m = NULL;
 
        if (buflen == 0 || *fpos >= vmcore_size)
@@ -170,7 +172,7 @@ static int open_vmcore(struct inode *inode, struct file *filp)
        return 0;
 }
 
-struct file_operations proc_vmcore_operations = {
+const struct file_operations proc_vmcore_operations = {
        .read           = read_vmcore,
        .open           = open_vmcore,
 };