summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-25 05:30:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-25 05:30:00 +0000
commitee355114ec6062d00c1376b184b886a39e74fd4e (patch)
treeda9330872894208b121ac18e2abbc801b67f1509 /fs/proc
parentd1003cbd87479d4962fe017c0f913dde9c4d026a (diff)
Merge with Linux 2.4.0-test6-pre9.
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/kcore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 01db469da..fe944bab6 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -17,6 +17,7 @@
#include <linux/elfcore.h>
#include <linux/vmalloc.h>
#include <asm/uaccess.h>
+#include <asm/io.h>
static int open_kcore(struct inode * inode, struct file * filp)
@@ -47,7 +48,7 @@ static ssize_t read_kcore(struct file *file, char *buf, size_t count, loff_t *pp
memset(&dump, 0, sizeof(struct user));
dump.magic = CMAGIC;
- dump.u_dsize = max_mapnr;
+ dump.u_dsize = (virt_to_phys(high_memory) >> PAGE_SHIFT);
#if defined (__i386__)
dump.start_code = PAGE_OFFSET;
#endif
@@ -55,7 +56,7 @@ static ssize_t read_kcore(struct file *file, char *buf, size_t count, loff_t *pp
dump.start_data = PAGE_OFFSET;
#endif
- memsize = (max_mapnr + 1) << PAGE_SHIFT;
+ memsize = virt_to_phys(high_memory);
if (p >= memsize)
return 0;
if (count > memsize - p)