From: Vivek Goyal <vgoyal@in.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>, fastboot <fastboot@lists.osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
haveblue@us.ibm.com
Subject: [PATCH] Fix for broken kexec on panic
Date: 24 Feb 2005 14:43:53 +0530 [thread overview]
Message-ID: <1109236432.5148.192.camel@terminator.in.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
Hi,
Kexec on panic is broken on i386 in 2.6.11-rc3-mm2 because of
re-organization of boot memory allocator initialization code. Primary
kernel does not boot if kexec is enabled and crashkernel=X@Y command
line parameter is passed. After re-organization, kexec is trying to call
reserve_bootmem before boot memory allocator has initialized.
This patch fixes the problem. I have moved the call to
reserved_bootmem() for kexec for both discontig and contig memory into
new setup_bootmem_allocator().
This patch has been generated against 2.6.11-rc4-mm1
Thanks
Vivek
[-- Attachment #2: kexec-reserve-bootmem-fix.patch --]
[-- Type: text/plain, Size: 2202 bytes --]
Kexec on panic is broken on i386 in 2.6.11-rc3-mm2 because of re-organisation
of boot memory allocator code. Primary kernel does not boot if kexec is enabled
and crashkernel=X@Y command line parameter is passed. After re-organization,
kexec is trying to call reserve_bootmem before boot memory allocator has
initialized.
This patch fixes the problem. I have moved the call to reserved_bootmem() for
kexec for both discontig and contig memory into new setup_bootmem_allocator().
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
linux-2.6.11-rc4-mm1-root/arch/i386/kernel/setup.c | 10 +++++-----
linux-2.6.11-rc4-mm1-root/arch/i386/mm/discontig.c | 5 -----
2 files changed, 5 insertions(+), 10 deletions(-)
diff -puN arch/i386/kernel/setup.c~kexec-reserve-bootmem-fix arch/i386/kernel/setup.c
--- linux-2.6.11-rc4-mm1/arch/i386/kernel/setup.c~kexec-reserve-bootmem-fix 2005-02-23 15:13:03.000000000 +0530
+++ linux-2.6.11-rc4-mm1-root/arch/i386/kernel/setup.c 2005-02-23 15:13:03.000000000 +0530
@@ -987,11 +987,6 @@ unsigned long __init find_max_low_pfn(vo
printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n");
#endif
}
-#ifdef CONFIG_KEXEC
- if (crashk_res.start != crashk_res.end)
- reserve_bootmem(crashk_res.start,
- crashk_res.end - crashk_res.start + 1);
-#endif
return max_low_pfn;
}
@@ -1174,6 +1169,11 @@ void __init setup_bootmem_allocator(void
}
}
#endif
+#ifdef CONFIG_KEXEC
+ if (crashk_res.start != crashk_res.end)
+ reserve_bootmem(crashk_res.start,
+ crashk_res.end - crashk_res.start + 1);
+#endif
}
/*
diff -puN arch/i386/mm/discontig.c~kexec-reserve-bootmem-fix arch/i386/mm/discontig.c
--- linux-2.6.11-rc4-mm1/arch/i386/mm/discontig.c~kexec-reserve-bootmem-fix 2005-02-23 15:13:03.000000000 +0530
+++ linux-2.6.11-rc4-mm1-root/arch/i386/mm/discontig.c 2005-02-23 15:13:03.000000000 +0530
@@ -265,11 +265,6 @@ unsigned long __init setup_memory(void)
find_max_pfn_node(nid);
NODE_DATA(0)->bdata = &node0_bdata;
-#ifdef CONFIG_KEXEC
- if (crashk_res.start != crashk_res.end)
- reserve_bootmem(crashk_res.start,
- crashk_res.end - crashk_res.start + 1);
-#endif
setup_bootmem_allocator();
return max_low_pfn;
}
_
next reply other threads:[~2005-02-24 8:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 9:13 Vivek Goyal [this message]
2005-02-24 9:13 ` Andrew Morton
2005-02-24 12:16 ` [Fastboot] " Maneesh Soni
2005-02-24 13:05 ` Eric W. Biederman
2005-02-24 13:41 ` Maneesh Soni
2005-02-24 12:48 ` Eric W. Biederman
2005-02-24 15:35 ` Dave Hansen
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=1109236432.5148.192.camel@terminator.in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/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®