From: Andi Kleen <ak@suse.de>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix /proc/kcore for i386
Date: Tue, 17 Jun 2003 15:58:55 +0200 [thread overview]
Message-ID: <20030617135855.GA19808@wotan.suse.de> (raw)
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.
There is still another problem in /proc/kcore for which I am submitting a
separate patch.
-Andi
diff -u linux-2.5.72-work/arch/i386/mm/init.c-o linux-2.5.72-work/arch/i386/mm/init.c
--- linux-2.5.72-work/arch/i386/mm/init.c-o 2003-05-27 03:00:45.000000000 +0200
+++ linux-2.5.72-work/arch/i386/mm/init.c 2003-06-17 15:55:03.000000000 +0200
@@ -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 @@
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 @@
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),
reply other threads:[~2003-06-17 13:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030617135855.GA19808@wotan.suse.de \
--to=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®