All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Falavigna <dktrkranz@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Real-Time Preemption, fixed kexec kernel relocation oops
Date: Mon, 29 Aug 2005 16:04:42 +0000	[thread overview]
Message-ID: <4313321A.9010508@gmail.com> (raw)

This patch, built against kernel version 2.6.13-rc7 (and not against -RT tree
patch, sorry), fixes a few local_irq_disable() calls which leads to an oops
during kernel relocation in kexec subsystem. Currently, only i386 implementation
of kexec is fixed.

Anyway, this patch does not fix a strange behaviour when using kexec with a -RT
kernel. Here is dmesg output:

Uncompressing Linux... OK, booting the kernel.
Unknown interrupt or fault at EIP 00000203 00000060 c011dfe3
Linux version 2.6.13-rc7-rt1 (root@sauron) (gcc version 3.3.4 (Debian
1:3.3.4-13)) #2 Fri Aug 26 16:55:12 UTC 2005
[...]
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
[...]

System is very slow and there are tons of "lost interrupt" messages.



Signed-off-by: Luca Falavigna <dktrkranz@gmail.com>

--- ./arch/i386/kernel/machine_kexec.c.orig	2005-08-28 22:03:52.000000000 +0000
+++ ./arch/i386/kernel/machine_kexec.c	2005-08-28 22:05:28.000000000 +0000
@@ -187,7 +187,7 @@ NORET_TYPE void machine_kexec(struct kim
 	relocate_new_kernel_t rnk;

 	/* Interrupts aren't acceptable while we reboot */
-	local_irq_disable();
+	raw_local_irq_disable();

 	/* Compute some offsets */
 	reboot_code_buffer = page_to_pfn(image->control_code_page)
--- ./arch/i386/kernel/crash.c.orig	2005-08-28 22:04:08.000000000 +0000
+++ ./arch/i386/kernel/crash.c	2005-08-28 22:04:55.000000000 +0000
@@ -143,7 +143,7 @@ static int crash_nmi_callback(struct pt_
 	 */
 	if (cpu == crashing_cpu)
 		return 1;
-	local_irq_disable();
+	raw_local_irq_disable();

 	if (!user_mode(regs)) {
 		crash_setup_regs(&fixed_regs, regs);
@@ -210,7 +210,7 @@ void machine_crash_shutdown(struct pt_re
 	 * an SMP system.
 	 */
 	/* The kernel is broken so disable interrupts */
-	local_irq_disable();
+	raw_local_irq_disable();

 	/* Make a note of crashing cpu. Will be used in NMI callback.*/
 	crashing_cpu = smp_processor_id();




Regards,
-- 
					Luca



                 reply	other threads:[~2005-08-29 17:25 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=4313321A.9010508@gmail.com \
    --to=dktrkranz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.