Commit 98c94255 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix /proc/kcore for i386

From: Andi Kleen <ak@suse.de>

The recent IA64 changes for /proc/kcore broke the access on i386.
Currently no notes are written for the direct mapped or vmalloced memory,
which makes gdb reject it.

This patch fixes it.  Other ports probably need to do the same changes.
parent 25a8424c
......@@ -27,6 +27,7 @@
#include <linux/pagemap.h>
#include <linux/bootmem.h>
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <asm/processor.h>
#include <asm/system.h>
......@@ -425,6 +426,8 @@ static void __init set_max_mapnr_init(void)
extern void set_max_mapnr_init(void);
#endif /* !CONFIG_DISCONTIGMEM */
static struct kcore_list kcore_mem, kcore_vmalloc;
void __init mem_init(void)
{
extern int ppro_with_ram_bug(void);
......@@ -477,6 +480,10 @@ void __init mem_init(void)
datasize = (unsigned long) &_edata - (unsigned long) &_etext;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
VMALLOC_END-VMALLOC_START);
printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
(unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
num_physpages << (PAGE_SHIFT-10),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment